-
Notifications
You must be signed in to change notification settings - Fork 66
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 revision of diabatic_aux #443
+*Non-Boussinesq revision of diabatic_aux #443
Conversation
This commit changes differential_diffuse_TS, diagnoseMLDbyDensityDifference, diagnoseMLDbyEnergy and applyBoundaryFluxesInOut to make them appropriate for use in non-Boussinesq mode, and to eliminate dependencies on the Boussinesq reference density when in that mode. It also adds a new optional argument to extract_optics_slice to enable the use of the layer specific volumes to translate opacities into thickness-based units. The specific set of changes include: - Add the optional argument SpV_avg to extract_optics_slice and use it along with an appropriate value for opacity_scale to optionally convert the units of opacity from [Z-1 ~> m-1] to [H-1 ~> m-1 or m2 kg-1] in non-Boussinesq mode without making use of the Boussinesq reference density. - Use thickness_to_dz and work with internal variables in vertical distances in the denominator of diffusive flux calculations in differential_diffuse_T_S, diagnoseMLDbyDensityDifference and diagnoseMLDbyEnergy. - Refactored diagnoseMLDbyEnergy for probable efficiencies by calling the equation of state with contiguous arguments. - Use specific volume derivatives to calculate non-Boussinesq mode buoyancy fluxes in calculateBuoyancy_Flux1d and applyBoudaryFluxesInOut. - Use the inverse of SpV_avg rather than Rho0 in the calculation of the energy input used to drive river mixing when in non-Boussinesq mode. There are now separate thickness and depth change internal variables in several places to avoid any dependency on the Boussinesq reference density when in non-Boussinesq mode. A total of 8 rescaling factors were eliminated, and in one place, GV%Rho0 was replaced with GV%H_to_RZ. All Boussinesq answers are bitwise identical, but non-Boussinesq answers will change and become less dependent on the Boussinesq reference density, and there is a new optional argument to a publicly visible subroutine.
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #443 +/- ##
============================================
+ Coverage 36.72% 37.90% +1.17%
============================================
Files 267 270 +3
Lines 77021 78100 +1079
Branches 14420 14436 +16
============================================
+ Hits 28287 29602 +1315
+ Misses 43309 43122 -187
+ Partials 5425 5376 -49
... and 9 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
8a66adc
to
9de6ce7
Compare
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.
OBO @breichl
Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/20776 ✔️ |
This commit changes differential_diffuse_TS, diagnoseMLDbyDensityDifference, diagnoseMLDbyEnergy and applyBoundaryFluxesInOut to make them appropriate for use in non-Boussinesq mode, and to eliminate dependencies on the Boussinesq reference density when in that mode. It also adds a new optional argument to extract_optics_slice to enable the use of the layer specific volumes to translate opacities into thickness-based units.
The specific set of changes include:
Add the optional argument SpV_avg to extract_optics_slice and use it along with an appropriate value for opacity_scale to optionally convert the units of opacity from [Z-1 ~> m-1] to [H-1 ~> m-1 or m2 kg-1] in non-Boussinesq mode without making use of the Boussinesq reference density.
Use thickness_to_dz and work with internal variables in vertical distances in the denominator of diffusive flux calculations in differential_diffuse_T_S, diagnoseMLDbyDensityDifference and diagnoseMLDbyEnergy.
Refactored diagnoseMLDbyEnergy for probable efficiencies by calling the equation of state with contiguous arguments.
Use specific volume derivatives to calculate non-Boussinesq mode buoyancy fluxes in calculateBuoyancy_Flux1d and applyBoudaryFluxesInOut.
Use the inverse of SpV_avg rather than Rho0 in the calculation of the energy input used to drive river mixing when in non-Boussinesq mode.
There are now separate thickness and depth change internal variables in several places to avoid any dependency on the Boussinesq reference density when in non-Boussinesq mode. A total of 8 rescaling factors were eliminated, and in one place, GV%Rho0 was replaced with GV%H_to_RZ.
All Boussinesq answers are bitwise identical, but non-Boussinesq answers will change and become less dependent on the Boussinesq reference density, and there is a new optional argument to a publicly visible subroutine.