title: CMAQ Dust Emulator
author: Barron H. Henderson
organization: US EPA
last updated: 2025-11-03
github.com/USEPA/CMAQ/emis/emis/DUST_EMIS.F routines and functions converted
| __doc__ = """ | |
| INTEGRATE CMAQ Columns | |
| ====================== | |
| --- | |
| author: Barron H. Henderson | |
| last-updated: 2026-07-17 | |
| --- | |
| Integrate columns from CMAQ using GRIDCRO2D, METCRO3D, and CONC files. |
| __doc__ = """ | |
| Requires pycno, pandas, matplotlib, xarray and the airnowcompare.py gist. | |
| pip install pycno pyproj pandas matplotlib xarray | |
| wget -N https://gist.githubusercontent.com/barronh/945df1b465905b0f5454258b317cee1b/raw/airnowcompare.py | |
| """ | |
| import airnowcompare | |
| import pycno | |
| import pandas as pd | |
| import matplotlib.animation as ani |
| #!/usr/bin/python | |
| __doc__ = """ | |
| Relies on NASA credentials in .netrc and tested with | |
| harmony-py==1.3.4 | |
| pandas==2.3.1 | |
| """ | |
| import logging | |
| from harmony import BBox, Client, Collection, Request, Environment | |
| import os | |
| import pandas as pd |
| def xmlcmap2cmap(xmlcmap): | |
| import numpy as np | |
| import matplotlib.colors as mc | |
| inf = np.inf | |
| nan = np.nan | |
| for elem in xmlcmap: | |
| if elem.tag == 'Entries': | |
| los = [] | |
| his = [] | |
| rgbs = [] |
| #!/usr/bin/env bash | |
| INPATH=${1?Required input CMAQ File} | |
| if [[ ${INPATH} == "-h" || ${INPATH} == "--help" ]]; then | |
| echo $0 [-h] INPATH INVAR [OUTPATH] | |
| echo "Convert CMAQ IOAPI meta data to SRS and create raster using gdal_translate" | |
| echo " -h --help: print this help menu" | |
| echo " INPATH : path to CMAQ input/output file" | |
| echo " INVAR : name of variable in INPATH" | |
| echo " OUTPATH : Path for output raster (default: INPATH_INVAR.tif)" | |
| exit |
| def get_epacmapnorm(spc, freq): | |
| """ | |
| Arguments | |
| --------- | |
| spc : str | |
| choices 'pm25' or 'o3' | |
| freq : str | |
| choices '1h', '24h' (pm-only), '8h' (o3-only), 'mda8' (o3-only) | |
| Returns |
The incomplete spatial coverage of monitors is a good motivation for data fusion. Monitors cover less than 30% of US counties, but more like 70% of the population. This is because dense populations often coincide with sources of polution and, therefore, are better monitored. The precise coverage of monitoring data depends on the period of interest. For example, ozone monitors are often not depolyed during winter.
| """ | |
| # Convert a CMAQ IOAPI File to a GeoTiff | |
| --- | |
| author: Barron H. Henderson | |
| last updated: 2025-09-05 | |
| --- | |
| Demonstrates converting a CMAQ file to a GeoTiff. GeoTiff is useful for ArcGIS or QGIS. |