# EQUATES grid coordinates

**URL:** <https://forum.cmascenter.org/t/equates-grid-coordinates/3018>\
**Category:** Post-processing\
**Tags:** equates\
**Created:** [February 19, 2022, 12:45am UTC](https://forum.cmascenter.org/t/equates-grid-coordinates/3018 "2022-02-19T00:45:22Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![foley.kristen](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@foley.kristen](https://forum.cmascenter.org/u/foley.kristen)\
**Post date:** [February 22, 2022, 2:10pm UTC](https://forum.cmascenter.org/t/equates-grid-coordinates/3018/3 "2022-02-22T14:10:38Z")

</div>

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.

> [@Sample R code for reading EQUATES CMAQ output (netcdf files)](https://forum.cmascenter.org/t/sample-r-code-for-reading-equates-cmaq-output-netcdf-files/3007):
>
> Attached is some sample R code for accessing the 2017 EQUATES CMAQ daily average output netcdf file located in [this Google Drive folder](https://drive.google.com/drive/folders/1VnSxXL3MTovGuBAN__8T4nO3LsAkoB0T?usp=sharing). The script shows how to: open the netcdf file extract the variable names and units, as well as the date and model grid information read in the daily average PM2.5 data and calculate the annual mean PM2.5 for each grid cell plot the annual average PM2. 5 data on a map [sample\_Rcode\_for\_EQUATES\_CMAQ\_data.txt](https://forum.cmascenter.org/uploads/short-url/plOl051T4Z0HjnftJqYYw0fM7Xt.txt) (5.0 KB)

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

---

_[View the full topic](https://forum.cmascenter.org/t/equates-grid-coordinates/3018)._
