-
Notifications
You must be signed in to change notification settings - Fork 59
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
Use bottom pressure anomaly for self-attraction and loading #731
base: dev/gfdl
Are you sure you want to change the base?
Conversation
Self-attraction and loading calculation in Boussinesq pressure gradient force is refactored to be consistent with the algorithm in non-Boussinesq version.
Using SSH to calculate self-attraction and loading (SAL) is only accurate for barotropic flows. Bottom pressure anomaly should really be used for general purposes. * New runtime parameter A runtime parameter SAL_USE_BPA is added to use bottom pressure anomaly. The option requires an input file for long term mean reference bottom pressure. The reference bottom pressure field is stored with SAL_CS. * Refactor SAL and tides in Boussinesq mode As the total bottom pressure is needed for bottom pressure anomaly, SAL calculation in Boussinesq mode needs to be refactored. In addition, there is a longstanding bug in Boussinesq mode that interface height is modified by SAL and tides, and the modified interface height is erroneously used for density and pressure calculation later on. Therefore the SAL and tides are refactored by moving their calculations after pressure is calculated. Tide answers before 20230630 is retained. Answers after 20230630 are changed for Boussinesq mode.
SSH is renamed to pbot_anom. Tides related variable names are also changed in order to be less confusing. Notably, e_sal_tide is renamed to e_sal_and_tide (the summation of sal and tide), not to be confused with e_tide_sal, which is renamed to e_tidal_sal (sal from tides).
The term was not assigned if tide answer date is >20230630.
Add an alternative method for SAL and tides in Boussinesq mode. The current method adjusts interface heights with geopotential height anomaly for SAL and tides. For non-Boussinesq mode, the current method is algebraically the same as taking the gradient of SAL and tide geopotential (body forcing). For Boussinesq mode, there is a baroclinic component of tidal forcing and SAL. The alternative method is added to calculate the gradient of tidal forcing and SAL directly at the cost of additional multiplications. The new method is controlled by runtime parameter BOUSSINESQ_SAL_TIDES.
9762fdf
to
aca2291
Compare
src/core/MOM_PressureForce_FV.F90
Outdated
enddo ; enddo | ||
call calc_SAL(SSH, e_sal, G, CS%SAL_CSp, tmp_scale=US%Z_to_m) | ||
if (CS%sal_use_bpa) then | ||
I_g_rho = 1.0 / (GV%rho0*GV%g_Earth) |
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.
The Boussinesq reference density, GV%rho0
, should never be used in non-Boussinesq mode.
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.
Fixed.
Instead of rescaling bottom pressure to height unit, calc_Loving_scaling is modified to be conditionally dimensional. When calculating self-attraction and loading, Love numbers are now dimensional when bottom pressure anomaly is used as an input. This change eliminate Love numbers' dependence on mean seawater density. A new coefficient called linear_scaling is added to SAL CS for the same purpose, although to use bottom pressure anomaly for scalar approximation is not quite justifiable. A WARNING is given when users try to do that.
In MOM_self_attr_load module.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev/gfdl #731 +/- ##
============================================
- Coverage 36.68% 36.61% -0.07%
============================================
Files 274 274
Lines 84037 84211 +174
Branches 15808 15854 +46
============================================
+ Hits 30829 30835 +6
- Misses 47393 47547 +154
- Partials 5815 5829 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This PR adds the option of using bottom pressure anomaly to calculate self-attraction and loading (SAL). Currently, sea surface height (SSH) is used for SAL, which is only accurate for barotropic flows. (SSH is the barotropic equivalent of bottom pressure anomaly.)
A new runtime parameter
SAL_USE_BPA
is added to use bottom pressure anomaly. The option requires an input file for long term mean reference bottom pressure.SAL_CS
rather thanPressureForce_FV_CS
.SAL_USE_BPA
is true, total bottom pressure field is used as the input for subroutinecalc_SAL
(), the reference pressure is subtracted within the subroutine.SAL calculation in Boussinesq mode is refactored in order to
SSH_IN_EOS_PRESSURE_FOR_PGF
also fix this bug, the refactor avoids having SAL code appear in multiple places.Add an alternative method for SAL and tides in Boussinesq mode, controlled by runtime parameter
BOUSSINESQ_SAL_TIDES
(default=False). The current method in Boussinesq mode has a baroclinic component of tidal forcing and SAL. While it is arguably consistent with the Boussinesq approximation, it might also be confusing. The alternative method directly calculate the gradients of tidal forcing and SAL and add them toPF[uv]
.Old answers with
TIDES_ANSWER_DATE
<=20230630 are not changed. But answers withTIDES_ANSWER_DATE
>20230630 in Boussinesq mode are changed at bit-level. Since the default ofTIDES_ANSWER_DATE
is currently 20230630, there is probably no compelling reason to preserve answers after that date.