Skip to content

Conversation

iangrooms
Copy link

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.

Hallberg-NOAA and others added 2 commits June 10, 2025 14:35
  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.
This commit pre-computes the weights used to smooth the dissipation
rate before using it to construct the backscatter amplitude. It also
adds documentation to the module.
@Hallberg-NOAA
Copy link

I agree with the changes in this PR, many of which I did add to the version of PR #367 that got merged into dev/ncar, but perhaps these additions were based on an earlier version of https://github.com/iangrooms/MOM6/tree/stochastics_unit_conv_ncar that did not go as far as the final version.

Looking at the results of "Resolve conflicts", there are a number of mostly minor conflicts, for example in the formatting of comments describing functions or in pre-calculating the time-invariant inverse of some areas that are used with SKEB. After the conflicts are resolved between this PR and dev/ncar, there will still be a number of valuable additions that are associated with this PR that will remain. I agree with all of these additions.

@alperaltuntas alperaltuntas merged commit 83cd133 into NCAR:dev/ncar Aug 27, 2025
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants