NGEET / fates

repository for the Functionally Assembled Terrestrial Ecosystem Simulator (FATES)
Other
105 stars 92 forks source link

Fix write of inventory init files #1244

Closed JessicaNeedham closed 3 weeks ago

JessicaNeedham commented 2 months ago

This PR fixes inventory initialization so that cohort and patch files can be written when do_inventory_out is true. After the refactor, either dbh or height needs to be negative in the cohort file, so this PR sets cohort height to -3.0 when writing the cohort file. It also changes formatting of file names (which seemed to work before but were broken by me in the last refactor I think). Not tested yet.

Collaborators:

Expectation of Answer Changes:

Should be bfb in all respects except that if do_inventory_out is true then files will be written out correctly rather than crashing the model.

Checklist

If this is your first time contributing, please read the CONTRIBUTING document.

All checklist items must be checked to enable merging this pull request:

Contributor

Integrator

Documentation

Test Results:

Not tested

glemieux commented 3 weeks ago

Regression testing underway on derecho. We don't have an inventory test, so it would be good to spot check this with an example.

glemieux commented 3 weeks ago

All expected fates regression tests on derecho passed b4b. Next, I'll spot check using the BCI inventory data.

glemieux commented 3 weeks ago

Spot check on lobata validated the changes. Thanks @JessicaNeedham for the support.