- sum various EDGAR-4.2 N2O emission inventories (in netCDF format). These inventories cover sectors/processes of N2O production other than those involving biomass burning, oceans, and soils.
- "reunit": convert from (per-gridcell) flux rate (
kg/m^2/s) to molar-mass rate (
moles/sec, which CMAQ wants).
- 2D-regrid from global/unprojected to a projected subdomain (AQMEII-NA).
- "retemporalize" from annual timestep to hourly (and tweak metadata)
- check that mass is (more or less) conserved in all of the above
creating CMAQ-style emissions files (e.g., this, when
gunziped) containing hourly emissions usable for any day in the year. Currently does not provide a clean or general-purpose (much less packaged) solution! but merely shows how to do these tasks using NCL (tested with version=6.1.2) and R (tested with version=2.15.2) and R packages including
The simplest way to run this code is to download and run uber_driver.sh, which automates the following steps. (Be sure to edit it, as discussed in the file, to match your local conditions and intentions!) Alternatively, one may manually
git clonethis repo.
cdto its working directory (where you cloned it to).
- Open the driver (bash) script in an editor! You will probably need to edit it to make it work on your platform. Notably you will probably want to point it to your R executable and PDF viewer.
- Run the driver:
- This will download input, then run
- an R script to sum the raw inputs, convert that intermediate product from mass flux to molar-mass rate, and plot it. The driver should display a global plot if properly configured.
- an R script to regrid the previous product, and plot the output. The driver should display an AQMEII plot if properly configured.
- an NCL script to generate hourly output suitable for input to CMAQ.
an NCL script to check conservation of mass from input to output. Given that the output domain (AQMEII-NA) is significantly smaller than the input domain (global), it merely reports the fraction of mass (as
kg) in output vs input, and compares that to an estimate of the land area of the output domain relative to the input domain (since these emissions seem overwhelmingly land-based). Current output is
Is N2O conserved from input to output? units=kg N2O (note (US land area)/(earth land area) ~= 6.15e-02) input input output output global NAs AQMEII-NA NAs out/in 4.55e+09 0 4.38e+08 0 9.64e-02