Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates MOM_kappa_shear averaging and diagnostics. #846

Merged

Conversation

breichl
Copy link

@breichl breichl commented Mar 3, 2025

  • Update to horizontal averaging procedure in MOM_kappa_shear for VERTEX_SHEAR = True.
  • Adds geometric and thickness weighted averages for moving diffusivity from vertices to tracer points.
  • Adds new diagnostics of N2, S2, Kd, and TKE both with and without VERTEX_SHEAR, useful for debugging.
  • Bitwise reproduces OM5 config w/ VERTEX_SHEAR = True.

@breichl breichl requested a review from Hallberg-NOAA March 3, 2025 20:26
brandon.reichl added 2 commits March 4, 2025 15:13
- Update to horizontal averaging procedure in MOM_kappa_shear for VERTEX_SHEAR = True.
- Adds geometric and thickness weighted averages for moving diffusivity from vertices to tracer points.
- Adds new diagnostics of N2, S2, Kd, and TKE both with and without VERTEX_SHEAR, useful for debugging.
@Hallberg-NOAA Hallberg-NOAA force-pushed the user/bgr/Kappa_Shear_HorzAvg branch from ed026dc to c79c5f6 Compare March 4, 2025 20:13
- Fix OMP directives for new diagnostics
- Remove quasi-2d fields that broke OMP threading
- Reworking horizontal averaging algorithm.
@breichl breichl marked this pull request as draft March 5, 2025 14:00
@breichl
Copy link
Author

breichl commented Mar 5, 2025

The code now passes all OMP tests. I've moved the PR to draft until I finish evaluating that the new features still work as intended.

brandon.reichl and others added 2 commits March 5, 2025 15:12
  Revised the Calc_kappa_shear_vertex code where it averages the diffusivities
at the vertices back to the tracer points when there is either a geometric mean
being used or thickness weighting.  With these changes, the code should now pass
dimensional consistency testing, work properly with openMP threading enabled,
and give sensible values of the diffusivity for massless layers.  Also corrected
the indenting of several recently added lines to follow the MOM6 2-space
indenting convention.  This commit can change answers slightly in some cases
where VERTEX_SHEAR = True, especially if VERTEX_SHEAR_GEOMETRIC_MEAN = True or
VERTEX_SHEAR_THICKNESS_MEAN = True.  The recently added runtime parameter
VERTEX_SHEAR_KD_MEAN_ANSWER_DATE (which has not yet been added to the dev/gfdl
branch of the code) was no longer needed and has been eliminated.
@Hallberg-NOAA Hallberg-NOAA added enhancement New feature or request Parameter change Input parameter changes (addition, removal, or description) labels Mar 6, 2025
Copy link

codecov bot commented Mar 6, 2025

Codecov Report

Attention: Patch coverage is 25.85034% with 109 lines in your changes missing coverage. Please review.

Project coverage is 38.05%. Comparing base (53bcb50) to head (1e37421).
Report is 1 commits behind head on dev/gfdl.

Files with missing lines Patch % Lines
src/parameterizations/vertical/MOM_kappa_shear.F90 25.85% 87 Missing and 22 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           dev/gfdl     #846      +/-   ##
============================================
- Coverage     38.07%   38.05%   -0.02%     
============================================
  Files           298      298              
  Lines         87830    87955     +125     
  Branches      16467    16516      +49     
============================================
+ Hits          33440    33470      +30     
- Misses        48352    48425      +73     
- Partials       6038     6060      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@breichl
Copy link
Author

breichl commented Mar 6, 2025

I did a layout test in OM5 (with VERTEX_SHEAR = True, VERTEX_SHEAR_GEOMETRIC_MEAN = True, and VERTEX_SHEAR_THICKNESS_MEAN = True), which reproduced. I also checked that the effects of turning the new averaging on in a 1 month run are consistent with my developmental code and tests. I think this is now ready.

@breichl breichl marked this pull request as ready for review March 6, 2025 14:49
Copy link
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have carefully examined these changes, and agree that they are correct.

@Hallberg-NOAA
Copy link
Member

This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/26630 with the expected warnings about new runtime parameters and additional diagnostics.

@Hallberg-NOAA Hallberg-NOAA merged commit 4f0c1c6 into NOAA-GFDL:dev/gfdl Mar 6, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Parameter change Input parameter changes (addition, removal, or description)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants