EDGAR-4.2_minus_soil_and_biomass_to_AQMEII-NA /

Filename Size Date modified Message
104 B
33.2 KB
5.8 KB
11.1 KB
10.3 KB
9.9 KB
8.1 KB
2.7 KB

Uses NCL and R code to

  1. 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.
  2. "reunit": convert from (per-gridcell) flux rate (kg/m^2/s) to molar-mass rate (moles/sec, which CMAQ wants).
  3. 2D-regrid from global/unprojected to a projected subdomain (AQMEII-NA).
  4. "retemporalize" from annual timestep to hourly (and tweak metadata)
  5. 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, 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

  1. git clone this repo.
  2. cd to its working directory (where you cloned it to).
  3. 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.
  4. Run the driver: $ ./
  5. 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