Improvements in the gradient Ri # calculation/diagnosis (MOM_CVMix_shear)#225
Merged
Merged
Conversation
In preparation for implementing the option to apply a vertical smooth filter in the Richardson number multiple times, the parameter SMOOTH_RI (logical) was renamed to N_SMOOTH_RI (interger). If N_SMOOTH_RI = 0 (default), smoothing is not performed. If N_SMOOTH_RI > 0, smoothing will be applied N_SMOOTH_RI times.
Currently, there are two diagnostics related to the gradient Richarson number and these are described as follows: * ri_grad_shear : Gradient Richarson number used by MOM_CVMix_shear module; * ri_grad_shear_smooth : Smoothed gradient Richarson number used by MOM_CVMix_shear module. The description for ri_grad_shear is misleading. If smoothing is applied, ri_grad_shear *is not* the RI number used by MOM_CVMix_shear module. In this commit. I propose to avoid this potential confusion by renaming ri_grad_shear_smooth to ri_grad_shear_orig and, if N_SMOOTH_RI > 0, use ri_grad_shear to store the smoothed profiles. * ri_grad_shear_orig : Original gradient Richarson number, before smoothing was applied. This is part of the MOM_CVMix_shear module and only available when N_SMOOTH_RI > 0. No change in answers for GMOM.
This commit adds the option to smooth the gradient Richardson number multiple times using a 1-2-1 filter. The number of times that the filter is applied is controlled by parameter N_SMOOTH_RI.
Codecov ReportBase: 37.22% // Head: 37.22% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev/ncar #225 +/- ##
============================================
- Coverage 37.22% 37.22% -0.01%
============================================
Files 261 261
Lines 72319 72323 +4
Branches 13533 13534 +1
============================================
Hits 26921 26921
- Misses 40407 40411 +4
Partials 4991 4991
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
alperaltuntas
added a commit
that referenced
this pull request
Apr 2, 2026
* diag_table updates:
- introduce feature to specify field-specific reduction method.
- changes in field list:
-min/max mlotst and oml in both daily (sfc) and monthly (native)
-sst_global, sss_global in monthly
-zos and zossq in daily (sfc)
-Drop SSH in daily (sfc) and keep it in the monthly (native)
-Drop mass_wt in daily and keep it in the monthly (native)
-Add tos and sos min/max in daily (sfc) and monthly (native)
-Add MEKE in monthly (native)
-C_P and Rho_0 add to static
-Geo_heat (when turned on) add to static
-Add penetrating solar flux (3D. Diag variable) rsdo Comment end
* add geo_head to static diag file when available
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 PR adds the following improvements in the calculation and diagnosis of the gradient Richardson number in the MOM_CVMix_shear module:
To recover previous answers,
SMOOTH_RI = Truemust be replaced byN_SMOOTH_RI = 1. I verified that this PR does not change answers for GMOM/JRA.