PecanProject / pecan

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

`model2netcdf.ED2()` calculations for -E- files are incorrect #3126

Closed Aariq closed 1 year ago

Aariq commented 1 year ago

Bug Description

When I re-wrote code in read_E_files(), I didn't have a full understanding of the .h5 files output by ED2 (also the metadata in those files was wrong). The PFT-level monthly variables output in the .nc files should not be trusted. I know how to do the calculations correctly now (I'm fairly certain), so I'll make a PR shortly.

Screenshots

Here's some comparisons of data calculated (correctly) from the .h5 files vs. what's in the .nc files. Screenshot 2023-03-02 at 10 36 06 AM Screenshot 2023-03-02 at 10 45 54 AM

Aariq commented 1 year ago

Calculations done correctly (I hope) here: https://github.com/cct-datascience/ed2-mandifore/blob/main/R/extract_E_files.R

KristinaRiemer commented 1 year ago

Can this be moved to closed?