PecanProject / pecan

The Predictive Ecosystem Analyzer (PEcAn) is an integrated ecological bioinformatics toolbox.
www.pecanproject.org
Other
202 stars 234 forks source link

Change `model2netcdf.ED2()` to include more variables from monthly -E- files and group by PFT #3021

Closed Aariq closed 1 year ago

Aariq commented 2 years ago

Mainly tackling https://github.com/PecanProject/pecan/issues/2997. Likely fixing other issues and changing some behaviors along the way.

Description

Motivation and Context

Only a small number of variables were being read from monthly E files and put into the .nc files output by model2netcdf.ED() and they were not being converted to PEcAn standard. This PR adds more variables to that list and hopefully establishes some generalizable patterns for adding more variables in the future.

Closes #2997

Review Time Estimate

Types of changes

Checklist:

Aariq commented 2 years ago

Just for the record, I think it's pretty hard to work on this group of functions because read_*_files() does some conversions and put_*_values() does additional conversions and adds the units. I think it would be a lot simpler and easier to work on if the "read" and "put" steps were combined, but that would be a much bigger re-write than I'm already doing.

Aariq commented 2 years ago

Ok, all tests are passing (not check() though). I think the only thing left is to name the pft-level variables pulled from the monthly E files something standard and then deal with devtools::check() issues.