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

Use bottom pressure anomaly for self-attraction and loading #731

Open
wants to merge 7 commits into
base: dev/gfdl
Choose a base branch
from

Conversation

herrwang0
Copy link

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.

    • The reference bottom pressure field is stored with SAL_CS rather than PressureForce_FV_CS.
    • When SAL_USE_BPA is true, total bottom pressure field is used as the input for subroutine calc_SAL(), the reference pressure is subtracted within the subroutine.
  • SAL calculation in Boussinesq mode is refactored in order to

    1. calculate SAL after bottom pressure is calculated.
    2. fix a longstand bug that SAL and tides geopotential height anomaly is added to interface height before density is calculated. Note that even though the newly-added parameter 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 to PF[uv].

  • Old answers with TIDES_ANSWER_DATE<=20230630 are not changed. But answers with TIDES_ANSWER_DATE>20230630 in Boussinesq mode are changed at bit-level. Since the default of TIDES_ANSWER_DATE is currently 20230630, there is probably no compelling reason to preserve answers after that date.

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.
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)
Copy link
Member

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.

Copy link
Author

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.
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.61%. Comparing base (df2cd12) to head (9f6c39b).
Report is 7 commits behind head on dev/gfdl.

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     
Flag Coverage Δ
?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants