-
Notifications
You must be signed in to change notification settings - Fork 60
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
*Non-Boussinesq refactoring of entrain_diffusive #439
*Non-Boussinesq refactoring of entrain_diffusive #439
Conversation
This commit refactors entrainment_diffusive to avoid any dependencies on the Boussinesq reference density when in non-Boussinesq mode, including using calculate_specific_vol_derivs for one diagnostic when non-Boussinesq. This commit includes making the formerly optional arguments kb_out, Kd_Lay and Kd_int to entrainment_diffusive non-optional, as they have been used in all calls to this routine for many years. Layer target density differences are now used in place of g_prime in entrainment_diffusive in mathematically equivalent expressions for the density difference ratios when non-Boussinesq. The non-Boussinesq upper layer buoyancy flux with entrainment_diffusive was revised to avoid using the Boussinesq reference density when the model is in layered mode but there is no equation of state or bulk mixed layer in use. The units of 3 internal variables were changed and there are 3 new internal variables as a part of these changes, and 4 thickness rescaling factors were eliminated. A default private setting is used to simplify a block of OMP directives. All answers are bitwise identical in Boussinesq mode, but they can change for some non-Boussinesq configurations, and three previously optional arguments have been made mandatory.
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #439 +/- ##
============================================
+ Coverage 38.05% 47.10% +9.05%
============================================
Files 269 41 -228
Lines 77389 4583 -72806
Branches 14292 806 -13486
============================================
- Hits 29453 2159 -27294
+ Misses 42591 2242 -40349
+ Partials 5345 182 -5163 see 255 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any errors due to the change from Z2 T-1 to HZ T-1 diffusion. I assume that the new expressions (e.g. ds_dsp1) are valid approximations.
Using allocate()
for flow control seems dangerous to me, but we can leave it for now.
Idt
seems to be more than just "The inverse of the time step" due to the H-to-Z conversion, but I suppose it's fine.
Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/20343 ✔️ |
This commit refactors entrainment_diffusive to avoid any dependencies on the Boussinesq reference density when in non-Boussinesq mode, including using calculate_specific_vol_derivs for one diagnostic when non-Boussinesq.
This commit includes making the formerly optional arguments kb_out, Kd_Lay and Kd_int to entrainment_diffusive non-optional, as they have been used in all calls to this routine for many years.
Layer target density differences are now used in place of g_prime in entrainment_diffusive in mathematically equivalent expressions for the density difference ratios when non-Boussinesq.
The non-Boussinesq upper layer buoyancy flux with entrainment_diffusive was revised to avoid using the Boussinesq reference density when the model is in layered mode but there is no equation of state or bulk mixed layer in use.
The units of 3 internal variables were changed and there are 3 new internal variables as a part of these changes, and 4 thickness rescaling factors were eliminated. A default private setting is used to simplify a block of OMP directives.
All answers are bitwise identical in Boussinesq mode, but they can change for some non-Boussinesq configurations, and three previously optional arguments have been made mandatory.