I am trying to use shp2cmaq to create a county mask file to use with DESID. I would then use DESID to reduce emissions in a group of counties that would be a region family. I am trying to create the mask for the CMAQ version 5.5 benchmark which uses the 2018_12NE3 grid. The county shape file I am using comes from a US Census tigerline file:
The tiger file contains the 5 digit state/county fips code in a column called GEOID. I call shp2cmaq using the tigerline zipfile with attrkey=‘GEOID’, gdnam=‘2018_12NE3’,
gdpath=‘/…/CMAQv5.4_2018_12NE3_Benchmark_2Day_Input/2018_12NE3/GRIDDESC’,
outpath=‘/…/CountyMask.nc’,
outformat=‘NETCDF3_CLASSIC’, srckey=‘intersection_area’,overwrite=True,verbose=1. The crs for the file is EPSG:4269.
The CountyMask.nc file that is created does not seem to function properly. Examining it with Panoply shows that the counties are overlapped with the grid in unknown units. Panoply output:
netcdf /home/…/CountyMask.nc {
dimensions:
TSTEP = 1;
VAR = 667;
DATE-TIME = 2;
LAY = 1;
ROW = 105;
COL = 100;
variables:
int TFLAG(TSTEP=1, VAR=667, DATE-TIME=2);
:units = “<YYYYJJJ,HHMMSS>”;
:long_name = "TFLAG ";
:var_desc = "TFLAG ";
float GEOID_09001(TSTEP=1, LAY=1, ROW=105, COL=100);
:_FillValue = NaNf; // float
:long_name = "GEOID_09001 ";
:var_desc = "Fractional overlap of GEOID_09001 with 2018_12NE3 ";
:unit = "1 ";
:units = "unknown";
float GEOID_09003(TSTEP=1, LAY=1, ROW=105, COL=100);
:_FillValue = NaNf; // float
:long_name = "GEOID_09003 ";
:var_desc = "Fractional overlap of GEOID_09003 with 2018_12NE3 ";
:unit = "1 ";
:units = "unknown";
Whereas Panoply indicates that the gridmask for states that comes with the Benchmark has the units of “fraction” as below:
netcdf /data1/CMAQ/DATA/CMAQv5.4_2018_12NE3_Benchmark_2Day_Input/2018_12NE3/GRIDMASK_STATES_12NE3.nc {
dimensions:
TSTEP = 1;
DATE-TIME = 2;
LAY = 1;
VAR = 49;
ROW = 105;
COL = 100;
variables:
int TFLAG(TSTEP=1, VAR=49, DATE-TIME=2);
:units = “<YYYYDDD,HHMMSS>”;
:long_name = "TFLAG ";
:var_desc = "Timestep-valid flags: (1) YYYYDDD or (2) HHMMSS ";
float AL(TSTEP=1, LAY=1, ROW=105, COL=100);
:long_name = "AL ";
:units = "fraction";
:var_desc = "AL fractional area per grid cell ";
float AZ(TSTEP=1, LAY=1, ROW=105, COL=100);
:long_name = "AZ ";
:units = "fraction";
:var_desc = "AZ fractional area per grid cell ";
How am I misusing shp2cmaq?
Thank you.