Skip to content

Baroclinic sea level calculation#1104

Open
c2xu wants to merge 4 commits into
NOAA-GFDL:dev/gfdlfrom
c2xu:c2xu/bsl2
Open

Baroclinic sea level calculation#1104
c2xu wants to merge 4 commits into
NOAA-GFDL:dev/gfdlfrom
c2xu:c2xu/bsl2

Conversation

@c2xu
Copy link
Copy Markdown

@c2xu c2xu commented May 4, 2026

This replaces PR #984 and is based on algorithms in a manuscript that we plan to submit to JPO. Reference to this work will be added as soon as it's available.

@c2xu c2xu marked this pull request as draft May 7, 2026 16:30
c2xu added 3 commits May 7, 2026 11:51
Algorithms implemented in MOM_interface_heights.F90
Implemented in MOM_diagnostics.F90
Implemented for harmonic analysis
@c2xu c2xu marked this pull request as ready for review May 7, 2026 18:40
* Rewrite algorithm for the EOS and non-Boussinesq case.

* Skip calculations at grid points with potentially zero depth.
gz, & ! Geopotential at the bottom of a layer [L2 T-2 ~> m2 s-2]
dp, & ! Pressure change across a layer in Boussinesq mode [R L2 T-2 ~> Pa]
dg, & ! Geopotential change across a layer in non-Boussinesq mode [L2 T-2 ~> m2 s-2]
dp_int, & ! Layer-integrated pressure change in Boussinesq mode [R L T-2 ~> Pa m]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The units of dp_int should be [R L2 Z T-1 ~> Pa m].

dg, & ! Geopotential change across a layer in non-Boussinesq mode [L2 T-2 ~> m2 s-2]
dp_int, & ! Layer-integrated pressure change in Boussinesq mode [R L T-2 ~> Pa m]
dg_int, & ! Layer-integrated geopotential change in non-Boussinesq mode [L2 T-2 Z ~> m3 s-2]
p_int ! Vertical integral of pressure at the bottom of a layer [R L2 T-2 Z ~> Pa m]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is useful to follow a standard order of the units when grepping for strange (and usually wrong) units, so we always list the units in the numerator before those in the denominator. The unit description for dg_int should be [Z L2 T-2 ~> m3 s-2], while that for p_int could be [R L2 Z T-2 ~> Pa m].


I_gEarth = 1.0 / GV%g_Earth

Rho0 = GV%Rlay(1) ; SpV0 = 1.0 / GV%Rlay(1)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The target potential density (often sigma-2) of the surface layer is usually not a physically meaningful quantity. We often simply set it to be light enough to ensure that there is not a big gap in resolution in fresh marginal seas, and in z-coordinate mode it might not be set at all! If Rho0 here needs to be a global constant, it should be set explicitly via a separate run-time parameter, and it should not be called Rho0 to avoid confusion with the Boussinesq reference density, which should never be used in non-Boussinesq mode. If this can be spatially and temporally varying, perhaps it should be set to the local surface density.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spv0 is only used in int_specific_vol_dp (non-Boussinesq cases), and in other calls to this routine its value is either 0.0 or 1.0 / CS%rho_ref.

Rho0 is used in int_density_dz, and in other calls to this routine its value is GV%Rho0, the Boussinesq reference density. This is certainly the correct value here.

Rho0 is also used to convert a pressure to a height. In Boussinesq cases this should be the Boussinesq reference density. In non-Boussinesq cases, this might be the average density of the water column i.e. a 2-D field. In cases without an equation of state, Rho0 might be GV%Rho0 or perhaps the average density of the water column i.e. a 2-D field.

This calculation is effectively using PRESSURE_RECONSTRUCTION_SCHEME=0 (PCM or no reconstruction), but almost all actual cases are using 1 (PLM reconstruction). I don't know if this makes a difference or not.

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.

4 participants