PecanProject / pecan

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

Bugfix for `model2netcdf.ED2()`—missing PFTs cause incorrect dimensions #3140

Closed Aariq closed 1 year ago

Aariq commented 1 year ago

Description

Fixes a bug in model2netcdf.ED2() where put_E_values() would fail because the dimensions were wrong when a PFT was missing from ED2 output .h5 files.

Motivation and Context

I was previously making the assumption that all PFTs would show up in all outputs, but apparently they can "disappear" for a few months and then come back. This may be an ED2 bug, but for now, I figured it would be best to write NAs for temporarily missing PFTs so that the dimensions get figured out correctly and .nc files get created.

Review Time Estimate

Types of changes

Checklist: