NGEET / fates

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

Make sure to define `state_vector` if not in land use mode #1223

Closed glemieux closed 4 months ago

glemieux commented 4 months ago

Description:

This is a bug fix for #1221 which came in with the latest tag sci.1.77.0_api.36.0.0. The local variable state_vector is undefined in disturbance_rates if land use mode is off. To avoid indexing into an array of NaN we need to define values for state_vector. The fix proposed here is to set it by getting the current state vector, which is called at the top of the subroutine.

Collaborators:

Expectation of Answer Changes:

Answer changes are not expected

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:

CTSM (or) E3SM (specify which) test hash-tag: 12c60f3de477bbdaa2cf7a8afe0d089886d2c960

CTSM (or) E3SM (specify which) baseline hash-tag: 12c60f3de477bbdaa2cf7a8afe0d089886d2c960

FATES baseline hash-tag: sci.1.77.0_api.36.0.0

Test Output: TBD

glemieux commented 4 months ago

Testing the previously failing tests on perlmutter results in those tests passing now.

Location: /pscratch/sd/g/glemieux/e3sm-tests/pr6353-fates_lu-nanfix-fld.fates.pm-cpu..E6d21ce5657-Fa2b71d0d

Waiting for derecho to come back up to access izumi tests results.

glemieux commented 4 months ago

Izumi testing of the failed case now passes.

Location: /scratch/cluster/glemieux/ctsm-tests/tests_0717-114533iz

glemieux commented 4 months ago

Regression testing against the PR baseline generated for derecho is b4b for all expected tests:

Location: /glade/derecho/scratch/glemieux/ctsm-tests/tests_pr1223-fates