Conditional registration of FrictWorkMax with MEKE#946
Merged
Conversation
The FrictWorkMax diagnostic requires that MEKE be enabled and that MEKE%MEKE field be allocated and defined. It is currently possible to register this diagnostic, even when MEKE is disabled. This patch prevents the registration of FrictWorkMax when MEKE is turned off.
Collaborator
Author
|
GitLab testing here: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/8446 |
Collaborator
Author
|
GitLab tests have passed. |
Hallberg-NOAA
added a commit
to Hallberg-NOAA/MOM6
that referenced
this pull request
Sep 6, 2025
…n#946) * Added a 7th-, 5th- and 3rd-order WENO schemes to reconstruct the PV and added the Koren scheme to reconstruct the kinetic energy in MOM_CoriolisAdv: - Set CORIOLIS_SCHEME = "WENOVI7TH_PV_ENSTRO", "WENOVI5TH_PV_ENSTRO", :WENOVI3RD_PV_ENSTRO" to use a 7th-, 5th-, and 3rd-order WENO scheme, respectively, to reconstruct PV. - Set KE_SCHEME = "KE_UP3" to use a third-order upwind scheme with the Koren flux limiter to reconstruct the kinetic energy. Set KE_USE_LIMITER = False (default is True) to not use the flux limiter. The KE_UP3 scheme is recommended to be used along with the WENO Coriolis schemes. - Set WENO_VELOCITY_SMOOTH = True to use the velocity field to estimate the smoothness indicator for WENO. This scheme tends to yield higher-order of accuracy and thus more energetic eddy fields. - The WENO schemes conduct a thickness-weighted reconstruction for PV to avoid PV singularities. - The order of WENO is reduced to 5th, 3rd, and 1st subsequently when it approaches lateral boundaries - The halo size is 4 and 5 for the 7th- and 5th-order WENO schemes. When they are used, parameters USE_WENO and WENO_stencil are passed to MOM_dynamics_split_RK2 to increase the halo update size. Only MOM_dynamics_split_RK2 is changed now. The other RK2 modules will need to be updated later. * Replaced the WENO_stencil by the CorAdv_stencil function that is passed to MOM_dynamics_split_RK2 * Debug * Replaced a few ratios to variables. Corrected the unit of some variables * Changed adding area_tiny and h_tiny to taking the max * Removed the dimensional constant in WENO weighting * Added stencil in $OMP(shared). Added additional comments * Removed trailing space * Changed the zero check if statement for fac_fn. Changed Jsq, Jeq, Isq, Ieq to private variables * Addressed couple of rotational symmetry issues * Removed commented lines in RK2 and added WENO stencil information to RK2B * Added Is_q, Ie_q, Js_q, Je_q to set bounds for Coriolis schemes * Enlarged halo update size for WENO schemes in dynamic_unsplit modules * Removed trailing space * Moved the update of h to a group pass in RK2 module * Removed unnecessary lines --------- Co-authored-by: Alistair Adcroft <Alistair.Adcroft@noaa.gov> and Robert Hallberg <Robert.Hallberg@noaa.gov>
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.
The
FrictWorkMaxdiagnostic requires that MEKE be enabled and thatMEKE%MEKEfield be allocated and defined. It is currently possible to register this diagnostic, even when MEKE is disabled.This patch prevents the registration of
FrictWorkMaxwhen MEKE is turned off.