Comment and refactor ghgvc() function
Closed this issue · 3 comments
dlebauer commented
This script is pretty much a direct translation of the original matlab code.
- combine ghgvc and ghgvc2 functions
- fix: Variable names are obtuse, rationale behind looping is obscure, use of NaN's inappropriate.
- use MsTMIP variable names from http://nacp.ornl.gov/MsTMIP_variables.shtml
- PEcAn provides these in the PEcAn.utils package: https://github.com/PecanProject/pecan/blob/master/utils/data/mstmip_vars.csv and https://github.com/PecanProject/pecan/blob/master/utils/data/mstmip_local.csv
- put plots and write output from src/ghgvc_script.R as separate function
- remove all use of default values from src/ghgvc_script.R. The fix will be to have the calculator provide defaults
potterzot commented
Other items on the list:
- Test
ghgvc_plot()
andghgvc_write()
use insrc/ghgvc_script.R
once ghgvc and ghgvc2 rewrite is done.
potterzot commented
@dlebauer Nearly done with the last couple of points in this issue. Hoping to wrap that up with a few more hours of work. I'm at about 11 right now. I've significantly reduced the unnecessary code, repeated allocation of matrices where not needed, looping as opposed to the use of lapply, etc... Seems much cleaner. I'm hoping by Saturday I can make a working commit that will pass the test script.
potterzot commented
Closing, moving the renaming to a separate issue to deal with later.