Skip to content

In UpdateState_TopLayerFluxes, h2osoi_ice occasionally goes more negative than currently allowed #988

@billsacks

Description

@billsacks

Brief summary of bug

Once in a while, h2osoi_ice can go more negative than currently allowed in UpdateState_TopLayerFluxes, triggering the run to abort.

General bug information

CTSM version you are using: Discovered in ctsm1.0.dev079, but this presumably affects ctsm1.0.dev060 through the latest version of master.

Does this bug cause significantly incorrect results in the model's science? No

Configurations affected: Potentially all

Details of bug

See https://bb.cgd.ucar.edu/cesm/threads/negative-h2osoi_ice-about-300-years-into-a-ctsm-standalone-spin-up.5183/ for details.

This error check was introduced in ctsm1.0.dev060. As I noted in the ChangeLog entry for that tag:

It's possible that the extra error checks I have added (to ensure we don't have greater-than-roundoff-level negative residuals) will be triggered in rare circumstances in a production run, even though they were never triggered in the test suite.

And now that seems to have happened. The value in this case just slightly exceeds the 1e-13 threshold. Changing this to 1e-12 seems safe here, and it could possibly even go a bit larger.

I will add an argument to the truncate function that allows different tolerance values in different circumstances, and use 1e-12 rather than the default 1e-13 here.

Important details of your setup / configuration so we can reproduce the bug

(See thread in forums.)

cc @olyson @adamrher

Metadata

Metadata

Assignees

Labels

bugsomething is working incorrectlypriority: highHigh priority to fix/merge soon, e.g., because it is a problem in important configurations

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions