NGEET / fates

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

comprehensive correction for singularity in two-stream #1277

Open rgknox opened 3 weeks ago

rgknox commented 3 weeks ago

Description:

This adds a more thorough correction to avoid singularities in the two-stream radiation. To be specific, we make sure that a correction made in the near-infrared band does not create a singularity in the visible band.

Fixes: #1276

Collaborators:

Expectation of Answer Changes:

Its possible but unlikely we would see differences in a test. Any test that was vulnerable would probably had failed. This is more about future-proofing the code.

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:

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

FATES baseline hash-tag:

Test Output:

glemieux commented 2 days ago

Regression testing underway on derecho.

glemieux commented 2 days ago

Regression testing against sci.1.80.1_api.37.0.0 is complete. All expected tests pass B4B with the exception of the FatesColdTwoStream tests. The difference show up on the first time step after initialization (t_index = 2) and appear to be round off (< E-13). The following variables are different:

FATES_GPP
FATES_GPP_CANOPY
FATES_HET_RESP
FATES_LBLAYER_COND
FATES_MAINT_RESP
FATES_NEP
FATES_STOMATAL_COND

Note that of the above, only FATES_STOMATAL_COND and FATES_LBLAYER_COND are greater than round off. After this time step, more differences propagate.

I decided to double check the original commit cd33abc9676b5178d5839eddbd347285f3a89abb against the baseline to make sure that my later refactor didn't inject the differences. The results are showing the same differing variables and similar RMS values.

@rgknox I'm not sure why these particular variables would be impacted by this update. I spot checked the baseline to make sure it was return b4b, so I'm pretty sure the issue isn't there. Thoughts?

Results: /glade/u/home/glemieux/scratch/ctsm-tests/tests_pr1277

rgknox commented 1 day ago

THe differences in FATES_HET_RESP are kind of suspicious... That is soil respiration. I suppose radiation scattering differences could affect soil heating, which affects respiration rates. But it seems unlikely in this case?