EQUATES grid coordinates

I am working with some yearly .nc files for daily average surface output at 12km resolution from the EQUATES project, but noticed these files have no explicit variables for longitude and latitude of the gridded data.

Is there a place where I can download the corresponding grids for lat and lon, or a way to extract this from the file’s metadata? I am working in R.

I have reconstructed the coordinates from the lat and lon fields in the monthly .csv files, but would like to confirm that the arrays I created are in the right order. Also, are the coordinates on the .csv files corresponding to the center of each gridcell?

Thank you,

Mariana

These files are not Lat-Lon-gridded files; instead, they are gridded in terms of some conformal map projection such as Lambert Conformal Conic or Polar Stereographic.

What does the command ncdump -h say about the metadata for these files?

Are they I/O API files? If so, see

https://cjcoats.github.io/ioapi/AA.html#conventions

or

https://www.cmascenter.org/ioapi/documentation/all_versions/html/AA.html#conventions

Or if they are CF-convention netCDF, see https://cfconventions.org/

You need to do all the mapping and grid-display in terms of the appropriate map projection, not in terms of Lat-Lon.

Hi Mariana,
Thank you for your interest in the CMAQ output. For the EQUATES .csv files with daily average data, yes, the long/lat coordinates are for the grid cell centers.

For the .nc files, as Carlie has noted, these netcdf formatted files use I/O API data structure and the grid information is contained in the global attributes fields (referred to as the ‘header’ information). The IOAPI documentation is very helpful for learning how to access or manipulate these type of files.

For the specific data you are working with, the EQUATES CMAQ output is on a Lambert Conformal projected grid with a regular horizontal grid spacing of 12kmx12km.

The attributes within the netcdf file that will give you the grid information are:

XORIG, YORIG (lower left corner of lower left grid cell in projected coordinate; units = meters)

NCOLS, NROWS (number of columns (x coordinates) and number of row (y coordinates) in the regular grid)

XCELL, YCELL (x and y dimension of the grid cells in meters)

I’ve included the global attributes for the EQUATES 12km CMAQ simulations below.

The proj string for the domain used in the CMAQ simulations that can be used for reprojecting to another coordinate system (such as long/lat) is:

“+proj=lcc +lat_1=33 +lat_2=45 +lat_0=40 +lon_0=-97 +a=6370000 +b=6370000”

This post includes sample R code that works with the 2017 EQUATES CMAQ output. Line 58 is the line that does the projection to long/lat but the rest of the script also shows some other convenient functions for reading in and plotting the data.

Example global attributes from EQUATES 12km CMAQ output:
IOAPI_VERSION: [depends on the file you are looking at]
EXEC_ID: ???
FTYPE: [depends on the file you are looking at]
CDATE: [depends on the file you are looking at]
CTIME: [depends on the file you are looking at]
WDATE: [depends on the file you are looking at]
WTIME: [depends on the file you are looking at]
SDATE: [depends on the file you are looking at]
STIME: [depends on the file you are looking at]
TSTEP: [depends on the file you are looking at]
NTHIK: 1
NCOLS: 459
NROWS: 299
NLAYS: 1
NVARS: [depends on the file you are looking at]
GDTYP: 2
P_ALP: 33
P_BET: 45
P_GAM: -97
XCENT: -97
YCENT: 40
XORIG: -2556000
YORIG: -1728000
XCELL: 12000
YCELL: 12000
VGTYP: -9999
VGTOP: 5000
VGLVLS: 1
VGLVLS: 0.997500002384186
GDNAM: 12US1

1 Like

And one additional way to obtain information on the latitudes and longitudes of each grid cell center and the associated four grid cell corners would be to download the EQUATES MCIP files for a single day and look for the variables “LAT” and “LON” in the GRIDCRO2D_{DATE}.nc4 file and the variables “LATD” and “LOND” in the GRIDDOT2D_{DATE}.nc4 file for the day you downloaded.

The daily tar files containing these MCIP files can be found in the
EQUATES folder of the CMAS data warehouse, browsing to “CMAQ_12US1” → INPUT → {YEAR} (e.g. 2016) → met → mcip_v51_wrf_v411_noltng → {MONTH} (e.g. 01)

1 Like