# Content of CMAQ netCDF files metadata

**URL:** <https://forum.cmascenter.org/t/content-of-cmaq-netcdf-files-metadata/3777>\
**Category:** Post-processing\
**Tags:** cmaq\
**Created:** [December 14, 2022, 9:07pm UTC](https://forum.cmascenter.org/t/content-of-cmaq-netcdf-files-metadata/3777 "2022-12-14T21:07:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![afernandez](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@afernandez](https://forum.cmascenter.org/u/afernandez)\
**Post date:** [December 14, 2022, 9:07pm UTC](https://forum.cmascenter.org/t/content-of-cmaq-netcdf-files-metadata/3777/1 "2022-12-14T21:07:27Z")

</div>

Hello,  
I’m trying to dig a bit deeper into the output files (for cases with a Lambert projection) but something is not exactly clicking with me. I’m used to the WRF output files where the corner locations (in lat/lot) are stored at XLONG\_U & XLAT\_U (for the X velocity component). For example for a CONUS simulation the corners (for U) are at (-115.788,13.204;-78.211,13.204; -131.373,51.295; -62.6265,51.295). I was expecting something similar for CMAQ but the metadata contained in the netCDF files seems to be slimmer. My question are whether I’m missing anything and if it’s possible to find the domain corners from the output files or if one needs to go back to the simulation inputs (my understanding is that WRF and CMAQ use the same map projection). Thanks.

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [December 14, 2022, 9:45pm UTC](https://forum.cmascenter.org/t/content-of-cmaq-netcdf-files-metadata/3777/2 "2022-12-14T21:45:27Z")

</div>

Others like @cjcoats would have more solid and detailed answers, but here is my take:

- It’s not really an issue of metadata. When you describe the WRF output files, the latitude and longitude information isn’t part of the metadata, either, it’s stored in variables XLONG\_U and XLAT\_U which have dimensions Time, south\_north, and west\_east\_stag. CMAQ output files do not have variables with latitude and longitude information, but CMAQ input files (specifically MCIP files) do. The relevant variables in these input files are LAT and LON in GRIDCRO2D and LATU, LONU, LATV, and LONV in GRIDDOT2D.

- the metadata relating to the horizontal grid in the CMAQ output files follows the [I/O API standard for the definition of horizontal coordinates and grids](https://www.cmascenter.org/ioapi/documentation/all_versions/html/GRIDS.html). For a Lambert grid, you can compute the corners of the grid in projected space using the attributes XORIG, YORIG, XCELL, YCELL, NCOLS, and NROWS.

- to calculate latitudes and longitudes for a given projection and grid as defined by I/O API metadata, I believe you can use m3tools program [latlon](https://www.cmascenter.org/ioapi/documentation/all_versions/html/LATLON.html)

---

<div class="post-metadata">

**Author:** ![afernandez](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@afernandez](https://forum.cmascenter.org/u/afernandez)\
**Post date:** [December 15, 2022, 4:04am UTC](https://forum.cmascenter.org/t/content-of-cmaq-netcdf-files-metadata/3777/3 "2022-12-15T04:04:36Z")

</div>

Thanks. This clarifies my doubt as it seems that you need something extra (to find the domain corners) besides the netCDF output file, either input data in another file or perform some calculation with the given parameters. [My use of ‘metadata’ was pretty broad, just anything that is not the variables output, but I get your point]
