-
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 kappa_shear #436
*Non-Boussinesq revision of kappa_shear #436
Conversation
Remove dependency on the Boussinesq reference density in MOM_kappa_shear when in fully non-Boussinesq mode. This is done by using calls to calculate_density and calculate_specific_vol_derivs to calculate the thermal expansion and haline contraction coefficients, and by using thickness_to_dz to convert layer thicknesses to vertical distances. A large part of the changes to the kappa_shear code involved refactoring it to differentiate between thicknesses and geometric heights by working internally with dynamic viscosities and diffusivities in non-Boussinesq mode, and to keep thicknesses in thickness units rather than converting them to distances in height units. The internal variable dz was renamed to h_lay in Calculate_kappa_shear and Calc_kappa_shear_vertex for greater clarity. The scaling factor for dz_massless is now set to (US%Z_to_m*GV%m_to_H) in Calculate_kappa_shear to reduce the dependency on the Boussinesq reference density; this does not impact answers if RHO_0 = RHO_KV_CONVERT. The internal changes related to this are extensive. This commit includes changing the units of 63 internal variables, and the addition or renaming of 17 internal variables. There are 2 new arguments to find_kappa_tke (one is necessary to differentiate thicknesses from vertical distances and while the other is used to preserve Boussinesq-mode answers), and 1 new argument to kappa_shear_column plus the renaming of another. The units of 13 internal subroutine arguments and 3 elements of the Kappa_shear_CS type change. A total of 6 thickness unit conversion factors were eliminated with these changes. The answers will change in non-Boussinesq mode when the Jackson et al. shear mixing parameterization is in use, but they are bitwise identical in all Boussinesq test cases. There are no changes to external interfaces.
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #436 +/- ##
=========================================
Coverage 38.02% 38.03%
=========================================
Files 269 269
Lines 77508 77554 +46
Branches 14315 14319 +4
=========================================
+ Hits 29475 29495 +20
- Misses 42683 42707 +24
- Partials 5350 5352 +2
📣 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 did not inspect every expression, but the dz to thickness changes look correct to me.
Remove dependency on the Boussinesq reference density in MOM_kappa_shear when in fully non-Boussinesq mode. This is done by using calls to calculate_density and calculate_specific_vol_derivs to calculate the thermal expansion and haline contraction coefficients, and by using thickness_to_dz to convert layer thicknesses to vertical distances.
A large part of the changes to the kappa_shear code involved refactoring it to differentiate between thicknesses and geometric heights by working internally with dynamic viscosities and diffusivities in non-Boussinesq mode, and to keep thicknesses in thickness units rather than converting them to distances in height units. The internal variable dz was renamed to h_lay in Calculate_kappa_shear and Calc_kappa_shear_vertex for greater clarity.
The scaling factor for dz_massless is now set to (US%Z_to_m*GV%m_to_H) in Calculate_kappa_shear to reduce the dependency on the Boussinesq reference density; this does not impact answers if RHO_0 = RHO_KV_CONVERT.
The internal changes related to this are extensive. This commit includes changing the units of 63 internal variables, and the addition or renaming of 17 internal variables. There are 2 new arguments to find_kappa_tke (one is necessary to differentiate thicknesses from vertical distances and while the other is used to preserve Boussinesq-mode answers), and 1 new argument to kappa_shear_column plus the renaming of another. The units of 13 internal subroutine arguments and 3 elements of the Kappa_shear_CS type change. A total of 6 thickness unit conversion factors were eliminated with these changes.
The answers will change in non-Boussinesq mode when the Jackson et al. shear mixing parameterization is in use, but they are bitwise identical in all Boussinesq test cases. There are no changes to external interfaces.