Stochastic GM+E efficiency & docs#378
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.
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.
|
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. |
This PR does two things
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.