Tom Roche committed 776252e

README: replace handwaving with detailed plan (hopefully not BDUF) for computing EPIC emissions, after re-familiarization with old code

  • Participants
  • Parent commits cf90df9

Comments (0)

Files changed (1)

     1. [... and visualize it][visualization of global EDGAR].
 1. *(completed)* 2D-regrid the EDGAR inventory from global/unprojected to a projected subdomain ([AQMEII-NA][]).
     1. [... and visualize it][visualization of AQMEII-NA EDGAR].
-1. *(in process)* Overlay the EDGAR data with [EPIC][EPIC overview] data on CONUS ag soils.
-    1. Process the raw EPIC data.
+1. *(in process)* Process [BELD][BELD overview] crop-coverage data needed to process [EPIC][EPIC overview] data.
+    1. Read a BELD [CSV][epic_site_crops_0529_USA_2Ellen.csv.gz] with structure `{row=GRIDID, col=crop}`, where
+        * each `crop` maps one-to-one to a layer in the EPIC netCDF
+        * each `GRIDID` maps one-to-one to an individual gridcell in the EPIC netCDF
+        * each `{GRIDID,crop}` tuple is the percentage (0 .. 100) of the gridcell area devoted to that crop (i.e., the crop's coverage of that gridcell).
+    1. Write [RDS][R internals::Serialization Formats] with structure `{col=AQMEII gridcell col, row=AQMEII gridcell row, layer=EPIC crop layer}` such that
+        * the index of each `{col,row}` tuple matches the corresponding gridcell in the EPIC data.
+        * the index of each `layer` matches the corresponding crop layer in the EPIC data.
+        * each `{col,row,layer}` tuple is the coverage of that gridcell=`{col,row}` by that crop=`layer` as a proportion (0 .. 1).
+1. Obtain EPIC N2O emissions:
+    1. Read per-crop N2O emittivity from the raw EPIC netCDF. (Unfortunately too large to post here--it contains many species of emissions besides N2O.) The `emittivity` of a crop is, here, the amount of N2O the crop would produce over the given timestep in the given gridcell if the full area of the gridcell was devoted to that crop.
+    1. "Demonotonicize" the current N2O emittivities. Consider the 2D spatial grid to be "flattened" into a 1D vector, and to be "desparsified" such that all missing values are removed. The current dataset has the unfortunate problem that, for each crop/layer, each observation in the gridcell/vector was summed with all its predecessors, instead of being recorded separately. E.g., if the true observations were `a[i]==u`, `a[j]==v`, and `a[k]==w` (for vector indices `i < j < k`), the data values given are `a[i]==u`, `a[j]==u+v`, and `a[k]==u+v+w`.
+    1. Obtain the `crop N2O-emittivity vector` from each gridcell's EPIC data: a vector of the N2O emittivities of all the crops over that gridcell during that timestep.
+    1. Obtain the `crop coverage vector` from each gridcell's BELD data: a vector of the coverages of all the crops over that gridcell during that timestep.
+    1. Write to output, for each gridcell, the scalar of EPIC N2O emissions for that gridcell (i.e., the scalar product of the crop N2O-emittivity vector and the crop coverage vector). I.e., for output dimensions=(TSTEP, LAY, ROW, COL),
+        1. ∀ `TSTEP`=0 (annual value)
+        1. ∀ `LAY`=0 (corresponding to a surface/vertical layer--semantics of 'layer' revert back to "the usual")
+        1. `(ROW, COL)` is the AQMEII-NA grid
+        1. `value(TSTEP, LAY, ROW, COL)` is the amount of N2O due to agriculture attributed by EPIC to that gridcell over that timestep
+1. *(planned)* Overlay the EDGAR data with [EPIC][EPIC overview] data on CONUS ag soils.
     1. For each gridcell in AQMEII-NA: if it has values for both EDGAR and EPIC, use only the EPIC value. 
     1. [Visualize the combined AQMEII-NA data][visualization of AQMEII-NA combined].
 1. *(planned)* Create [CMAQ][CMAQ @ CMAS]-style emissions files (e.g., [this][hourly emissions for 1 Jan 2008], when `gunzip`ed) containing emissions for every hour in 2008 (the model year).
 [EDGAR 4.2 overview]:
+[BELD overview]: TODO!
 [EPIC overview]: TODO!
+[R internals::Serialization Formats]:
 [visualization of global EDGAR]:
 [visualization of AQMEII-NA EDGAR]:
 [visualization of AQMEII-NA EPIC]: TODO!