Skip to content

+Refactor stochastics for dimensional consistency#367

Merged
alperaltuntas merged 1 commit into
NCAR:dev/ncarfrom
Hallberg-NOAA:stochastics_unit_conv_ncar
Jul 24, 2025
Merged

+Refactor stochastics for dimensional consistency#367
alperaltuntas merged 1 commit into
NCAR:dev/ncarfrom
Hallberg-NOAA:stochastics_unit_conv_ncar

Conversation

@Hallberg-NOAA
Copy link
Copy Markdown

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.

  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.
@Hallberg-NOAA
Copy link
Copy Markdown
Author

This PR would address most or all of the concerns discussed at #354.

@alperaltuntas alperaltuntas merged commit 5d53c36 into NCAR:dev/ncar 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.
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.

2 participants