+Refactor stochastics for dimensional consistency#367
Merged
alperaltuntas merged 1 commit intoJul 24, 2025
Conversation
Refactored MOM_stochastics for dimensional and rotational consistency. This involved correcting the dimensions of a hard-coded area, adding missing conversion factors to the register_diag_field calls for 6 stochastics diagnostics, and adding descriptions of the units in comments describing 7 variables in MOM_stochastics. This commit also adds the new runtime parameter STOCHASTICS_ANSWER_DATE that can be set to a value of 20250701 or higher to use rotationally symmetric expressions. The stochastic physics package itself is external to MOM6 and works in unscaled mks units, so fields passed to it (such as the timestep) need to be unscaled back to mks units. As a part of this change, new unit_scale_type arguments were added to stochastics_init and apply_skeb. By default the answers should be bitwise identical in cases without dimensional consistency testing, but the diagnostic conversion factors should correct the problems with dimensional rescaling.
Author
|
This PR would address most or all of the concerns discussed at #354. |
alperaltuntas
approved these changes
Jul 24, 2025
alperaltuntas
pushed a commit
that referenced
this pull request
Aug 27, 2025
This PR does two things It pre-calculates some coefficients in the stochastic GM+E parameterization, which reduces computational cost. This will change answers when stochastic GM+E is in use, but only due to roundoff. It adds docs to the MOM_stochastics module. Originally this was aimed at Bob's fork, to go in with his PR #367 (see comment). Since that PR has been merged, I'm re-directing this PR directly to dev/ncar.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactored
MOM_stochasticsfor dimensional and rotational consistency. This involved correcting the dimensions of a hard-coded area, adding missing conversion factors to theregister_diag_field()calls for 6 stochastics diagnostics, and adding descriptions of the units in comments describing 7 variables inMOM_stochastics. This commit also adds the new runtime parameterSTOCHASTICS_ANSWER_DATEthat can be set to a value of 20250701 or higher to use rotationally symmetric expressions. The stochastic physics package itself is external to MOM6 and works in unscaled mks units, so fields passed to it (such as the timestep) need to be unscaled back to mks units. As a part of this change, newunit_scale_typearguments were added tostochastics_init()andapply_skeb(). By default the answers should be bitwise identical in cases without dimensional consistency testing, but the diagnostic conversion factors should correct the problems with dimensional rescaling.