EXTRACT a certain domain from EDGAR_v8.1 dataset

Dear Huy,

Thank you very much for the instructions. I noticed that HTAP_processing.py uses the sellonlatbox command, and I implemented it in the same way (for a selected subset of the grid rather than the full domain).

This time Smkinven stopped with the error message: “Bad NDIMS

My intention in creating a subset of HTAP or EDGAR was to reduce the size of the temporal output files when running all sectors and pollutants together (by using a single arinv list). Otherwise, the total size of the ATMP and ATSUP files reaches ~90 GB per day. However, I still encountered an error in Grdmat (by applying a single arinv list for all pollutants and sectors). The error did not occur for the parent domain, but it appeared for the inner domains. Below is the error for your review:

 Generating gridding matrix…
 "GRIDMASK" opened as OLD:READ-ONLY
 File name "/home/cmaq/smoke/data/ge_dat/EDGAR/GRIDMASK_EDGAR.ncf"
 File type GRDDED3
 Execution ID "????????????????"
 Grid name "LATLON_EDGAR0.1"
 Dimensions: 1800 rows, 3600 cols, 1 lays, 2 vbles
 NetCDF ID:    131072  opened as READONLY
 Time-independent data.

 "GRID_CRO_2D" opened as OLD:READ-ONLY
 File type GRDDED3
 Execution ID "mcip"
 Grid name "2025_d02"
 Dimensions: 108 rows, 108 cols, 1 lays, 6 vbles
 NetCDF ID:    196608  opened as READONLY
 Time-independent data.
 This file seems to use WMO-style "longitude" that violates ISO Standard 6709
 Number of coeffs     11664
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image             PC                Routine            Line        Source
libc.so.6         000014AE47A19520  Unknown               Unknown  Unknown
grdmat            0000000000416CB3  genlgmat                  434  genlgmat.f
grdmat            0000000000423B43  grdmat                    716  grdmat.f
grdmat            000000000040DA0D  Unknown               Unknown  Unknown
libc.so.6         000014AE47A00D90  Unknown               Unknown  Unknown
libc.so.6         000014AE47A00E40  __libc_start_main     Unknown  Unknown
grdmat            000000000040D925  Unknown               Unknown  Unknown

I tried to resolve the issue but realized it might be due to the the way the inner DO loop is defined in genlgmat.f. The loop might iterate over NCOEF instead of N, which leads to out-of-bounds access of arrays, and causes K to exceed its allocated size.

Eventually, I decided to follow the @james.beidler advice and run sector by sector.

Mason