DESID mask file (binary vs. fraction)
When I try to run CMAQ DESID region option, the mask file with (binary 0 and 1 only) is not working in CMAQ.
Specifically, when I checked the log, it looked like CMAQ could not read that variable (SD).
So I made a fraction mask file with the same shape file, and then it was working.
The problem might be coming from
- My binary file problem
- CMAQ DESID cannot read a variable from a binary file.
Binary file using Spatial Allocator with same shapefile.
Fraction file using Spatial Allocator with same shapefile.
What variable type (integer, float, …) does ncdump -h ocean_file_BOS_1km_land_overlap_SD_Frac.ncf
show for variable SD?
DESID expects gridmask file variables used to define regions to be single precision real variables:
“Each variable is a gridded field of real numbers from 0.0 to 1.0, with 0.0 outside of the region of interest and 1.0 completely inside the region.” (DESID documentation)
I cannot see any variable type by using ncdump.
if the binary file has an integer variable, it might be true.
Binary (SD)
Fraction (SD_01)
“int SD” means that variable SD in the first file is of type integer, which is why it cannot be used by DESID as noted in the user guide. “float SD_1” means that variable “SD_1” is of type real (single precision) and therefore can be used by DESID.
As a side note, you might be confusing the values of the variable (either discrete values of 0 and 1, or fractions between 0.0 and 1.0) with the file format when you say “binary file”. netcdf files are binary files, regardless of whether the variables defined in it are integer, real, or any other supported variable type. You can certainly provide DESID with a mask variable consisting only of discrete values of 0 and 1, but these still need to be stored as real rather than integer values in the gridmask file.
Also see these earlier discussions on the variable type required for variables in the gridmask file:
CCTM output is all 0 after running CMAQ
What’s the maskdata’s format?
4 Likes