Add entrainment rule BLD calculation to KPP#379
Merged
alperaltuntas merged 8 commits intoNCAR:dev/ncarfrom Sep 18, 2025
Merged
Conversation
This commit introduces an alternative method for computing the boundary layer depth (BLD) in KPP, based on the entrainment rule. This method is activated when the non-solar surface buoyancy flux (surfBuoy_NS) is negative and STOKES_MOST = True. In all other cases, the standard Richardson Number-based method is used. The non-solar surface buoyancy flux is estimated internally using an exponential attenuation function, since only the total surface buoyancy flux (solar + non-solar) is currently available to the module. Ideally, the non-solar component should be provided explicitly. Several new diagnostics have been added, and some of the existing ones have been updated. Specifically, the parameterized shear, buoyancy, and Stokes TKE production terms are calculated. We conducted multiple tests where these terms are passed to the MLE module and used in the denominator of the Bodner streamfunction. However, because of the small Cr value we adopted (0.01), this had minimal effect on the solutions, so we decided to keep the original simpler implementation and not pursue this option for now. This commit should be evaluated together with CVMix/CVMix-src#106.
There was a problem hiding this comment.
Pull Request Overview
This PR adds an alternative entrainment rule (ER) method for computing the boundary layer depth (BLD) in KPP, which is activated when the non-solar surface buoyancy flux is negative and STOKES_MOST = True. It introduces several new diagnostics including parameterized TKE production terms and implements internal estimation of non-solar surface buoyancy flux using exponential attenuation.
Key changes include:
- Implementation of entrainment rule boundary layer depth calculation as an alternative to Richardson Number method
- Addition of parameterized shear, Stokes, and buoyancy TKE production diagnostics
- Internal estimation of non-solar surface buoyancy flux using exponential decay approximation
Include new entreinment rule depth changes.
mnlevy1981
reviewed
Sep 9, 2025
- Removed unused `ustar` array from KPP_CS type. - Restricted registration, allocation, and posting of StokesMOST diagnostics (`StokesXI`, `Lam2`, `BEdE_ER`, `ERdepth`, `RNdepth`, `PU_TKE`, `PS_TKE`, `PB_TKE`) to cases when `CS%StokesMOST` is enabled. - Moved allocations of related arrays inside StokesMOST conditional block. - Updated condition for calculating `surfBuoy_NS` to avoid division by zero in alog(buoyFlux(i,j,2)/buoyFlux(i,j,3)). - Wrapped diagnostic and debug checks in `if (CS%StokesMOST)` conditions. - Minor cleanup of comments and diagnostic labeling.
Collaborator
Author
|
This PR introduces expected answer changes for /glade/derecho/scratch/gmarques/cesm.tests/pr_mom/alpha07c_dev_ncar--kpp_ER_depth.intel |
alperaltuntas
approved these changes
Sep 18, 2025
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.
This commit introduces an alternative method for computing the boundary layer depth (BLD) in KPP, based on the entrainment rule. This method is activated when the non-solar surface buoyancy flux (
surfBuoy_NS) is negative andSTOKES_MOST = True. In all other cases, the standard Richardson Number-based method is used.The non-solar surface buoyancy flux is estimated internally using an exponential attenuation function, since only the total surface buoyancy flux (solar + non-solar) is currently available to the module. Ideally, the non-solar component should be provided explicitly.
Several new diagnostics have been added, and some of the existing ones have been updated. Specifically, the parameterized shear, buoyancy, and Stokes TKE production terms are calculated. We conducted multiple tests where these terms are passed to the MLE module and used in the denominator of the Bodner streamfunction. However, because of the small Cr value we adopted (0.01), this had minimal effect on the solutions, so we decided to keep the original simpler implementation and not pursue this option for now.
This commit should be evaluated together with CVMix/CVMix-src#106.