Closed Aariq closed 1 year ago
Looks like maybe this was a planned feature already: https://github.com/PecanProject/pecan/blob/01b370430304dfd965aa7b31e15f209ecc78775e/models/ed/R/model2netcdf.ED2.R#L903
FWIW, the older version of the read-E-files
function used to be able to group outputs in the -E-
files by PFT. We had a discussion in the slack channel a while ago, here is my last comment there:
but the current version is broken, and unfortunately I'm not familiar with the new changes, even the function arguments have changed, before
pfts
waspft_names
and it was passed via upstream functions as a vectorBut now the code is changed to behave differently
Bug Description
The .nc files resulting from conversion from ED2 output have variables that could be split up by PFT but aren't. For example NPP in the .nc file only has the dimensions lat, lon, and time but it is possible to split up by PFT in the .h5 files produced by ED2. The only variables that have PFT as a dimension are DBH, rate of change of DBH and plant density.
To Reproduce
Expected behavior
It would be helpful for at least the option to split variables up by PFT. One way to do this to ensure backwards compatibility would be to add an argument
by_pft = FALSE
that changes nothing if kept default, but adds PFT as a dimension wherever possible whenTRUE