Commits

Tom Roche committed bb513be

added "standard" TOC and section=TODOs, switched github references to bitbucket (live ones, anyway), "CLM-CN" -> "CLM-CN-N2O"

  • Participants
  • Parent commits d0b1277

Comments (0)

Files changed (1)

+*(part of the [AQMEII-NA_N2O][AQMEII-NA_N2O wiki home] family of projects)*
+
+**table of contents**
+
+[TOC]
+
+# description
+
 Uses [bash][bash @ wikipedia] to drive [NCL][NCL @ wikipedia] and [R][R @ wikipedia] code to
 
-1. "reunit" the data from CLM-CN's `mgN/m^2` to `molN2O/s` (what CMAQ wants).
-1. 2D-regrid [CLM-CN][] data (in [netCDF][] format) from global/unprojected to a projected subdomain ([AQMEII-NA][]).
+1. "reunit" the data from [CLM-CN-N2O][]'s `mgN/m^2` to `molN2O/s` (what CMAQ wants).
+1. 2D-regrid the data (in [netCDF][] format) from global/unprojected to a projected subdomain ([AQMEII-NA][]).
 1. "retemporalize" from monthly timestep to hourly, creating CMAQ-style emissions files (e.g., [this][emis_mole_N2O_200801_12US1_cmaq_cb05_soa_2008ab_08c.ncf.gz], when `gunzip`ed) containing hourly emissions usable for any day in the month labeled (e.g., `200801` in the link).
 1. check that mass is (more or less) conserved in all of the above
 
 [NCL @ wikipedia]: http://en.wikipedia.org/wiki/NCAR_Command_Language
 [R @ wikipedia]: http://en.wikipedia.org/wiki/R_%28programming_language%29
 [netCDF]: http://en.wikipedia.org/wiki/NetCDF#Format_description
-[CLM-CN]: https://github.com/TomRoche/cornbeltN2O/wiki/Simulation-of-N2O-Production-and-Transport-in-the-US-Cornbelt-Compared-to-Tower-Measurements#wiki-CLM-CN-N2O
-[AQMEII-NA]: https://github.com/TomRoche/cornbeltN2O/wiki/AQMEII-North-American-domain
+[CLM-CN-N2O]: https://bitbucket.org/tlroche/aqmeii-na_n2o/wiki/N2O_emission_inventories_over_AQMEII-NA_2008#!clm-cn-35-dndc-based-process-model
+[AQMEII-NA]: https://bitbucket.org/tlroche/aqmeii-na_n2o/wiki/AQMEII-NA_spatial_domain
 [emis_mole_N2O_200801_12US1_cmaq_cb05_soa_2008ab_08c.ncf.gz]: https://bitbucket.org/tlroche/clm_cn_global_to_aqmeii-na/downloads/emis_mole_N2O_200801_12US1_cmaq_cb05_soa_2008ab_08c.ncf.gz
 [ncdf4]: http://cran.r-project.org/web/packages/ncdf4/
 [raster]: http://cran.r-project.org/web/packages/raster/
 [rasterVis]: http://cran.r-project.org/web/packages/rasterVis/
 
+# operation
+
 To run this code,
 
 1. `git clone` this repo.
 1. Run the driver:
     `$ ./CLMCN_driver.sh`
         This will download input, then run
-    * an [NCL script][reunit.ncl] to [convert raw-input concentrations][CLM-CN input processing @ project wiki] to units appropriate for [CMAQ][CMAQ @ CMAS].
+    * an [NCL script][reunit.ncl] to convert raw-input concentrations to units appropriate for [CMAQ][CMAQ @ CMAS].
     * an [R script][regrid_global_to_AQMEII.r] to plot the reunit-ed netCDF data, regrid it, and plot the output. The driver should display [an input PDF][global plot] and [an output PDF][AQMEII plot] if properly configured.
     * an [NCL script][retemp.ncl] to "retemporalize" the regridded output into monthly files (since the input is monthly) with hourly timesteps (since at this point we have "flat temporality": we assume emission at constant `mol/s` for each hour of the month).
     * an [NCL script][check_conservation.ncl] 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 mgN) in output vs input, and compares that to an estimation of the land area of the output domain relative to the input domain. Current output is
 [regrid_global_to_AQMEII.r]: https://bitbucket.org/tlroche/clm_cn_global_to_aqmeii-na/src/29b5c47d54df595c3d93c4f3d679e398e01c775b/regrid_global_to_AQMEII.r?at=master
 [retemp.ncl]: https://bitbucket.org/tlroche/clm_cn_global_to_aqmeii-na/src/9c77b06be6a99319059057cccf36425734d4e264/retemp.ncl?at=master
 [check_conservation.ncl]: https://bitbucket.org/tlroche/clm_cn_global_to_aqmeii-na/src/828a83545a6c47aeeee674d57813c30f2662f060/check_conservation.ncl?at=master
-[CLM-CN input processing @ project wiki]: https://github.com/TomRoche/cornbeltN2O/wiki/Simulation-of-N2O-Production-and-Transport-in-the-US-Cornbelt-Compared-to-Tower-Measurements#wiki-input-processing-CLM-CNv3.5
+[CLM-CN-N2O input processing @ project wiki]: https://github.com/TomRoche/cornbeltN2O/wiki/Simulation-of-N2O-Production-and-Transport-in-the-US-Cornbelt-Compared-to-Tower-Measurements#wiki-input-processing-CLM-CNv3.5
 [CMAQ @ CMAS]: http://www.cmaq-model.org/
 [global plot]: https://bitbucket.org/tlroche/clm_cn_global_to_aqmeii-na/downloads/2008PTONCLMCNN2O_reunit.pdf
 [AQMEII plot]: https://bitbucket.org/tlroche/clm_cn_global_to_aqmeii-na/downloads/2008PTONCLMCNN2O_reunit_regrid.pdf
+
+# TODOs
+
+1. move all these TODOs to [issue tracker][CLM-CN-N2O issues]
+1. create common project for `regrid_resources` à la [regrid_utils][], so I don't hafta hunt down which resource is in which project
+1. all regrids: how to nudge off/onshore as required? e.g., soil or burning emissions should never be offshore, marine emissions should never be onshore.
+1. all regrid maps: add Caribbean islands (esp Bahamas! for offshore burning), Canadian provinces, Mexican states
+1. complain to ncl-talk about NCL "unsupported extensions," e.g., .ncf and <null/> (e.g., MCIP output)
+1. determine why '<-' assignment is occasionally required in calls to visualize.*(...)
+1. fully document platform versions (e.g., linux, compilers, bash, NCL, R)
+1. test on
+    * tlrPanP5 (which now has R package=ncdf4, but readAsciiTable of input .txt's is very slow compared to terrae)
+    * HPCC (once problem with ncdf4 on amad1 is debugged: in process with JOB and KMF)
+
+[CLM-CN-N2O issues]: https://bitbucket.org/tlroche/clm_cn_global_to_aqmeii-na/issues
+[regrid_utils]: https://bitbucket.org/tlroche/regrid_utils