-
Notifications
You must be signed in to change notification settings - Fork 7
Description
As @katsmith133 mentioned when reviewing the EOS PR, the Eos checks assume "reasonable" values of T,S (the state variables of Conservative Temperature and Absolute Salinity). Testing the code with unphysical values fails but is not accounted for by the Eos bounds which were designed assuming physical T,S values.
We could add extra bounds or error/warnings in the Eos code, but I would rather add a separate check on the ocean state, as was done in MPAS-Ocean. This should be run at each time step to pick up on any corrupted state value.
Possible improvements on the MPAS-Ocean ocn_validate_state() include:
- further restricting the valid bounds for T,S.
in its current state, we typically check for NaNs, which tend to be widespread by the time the model fails. Narrower bounds would help find the location of the instability faster. - make sure we abort globally as soon as the check fails and output a single block; or expand logging to include locations of invalid values.
Long-standing issue should be solved by PR#7457.
@jonbob is the single block output sufficient for debugging? I.e. we had talked about outputting the locations of warning/bounds exceeded but I reckon the global abort (and thus single problematic block output) gets us most of the way there?