Skip to content

Add Omega horizontal pressure gradient tests#465

Draft
xylar wants to merge 53 commits intoE3SM-Project:mainfrom
xylar:add-omega-two-column
Draft

Add Omega horizontal pressure gradient tests#465
xylar wants to merge 53 commits intoE3SM-Project:mainfrom
xylar:add-omega-two-column

Conversation

@xylar
Copy link
Copy Markdown
Collaborator

@xylar xylar commented Feb 18, 2026

This merge adds three horiz_press_grad tests for the horizontal pressure-gradient acceleration (HPGA) in Omega:

  • salinity_gradient - salinity varies horizontally; temperature varies only with depth and layer pseudo-thicknesses are uniform
  • temperature_gradient - temperature varies horizontally; salinity varies only with depth and layer pseudo-thicknesses are uniform
  • ztilde_gradient - pseudo-height of layers are sloped; temperature and salinity vary only with depth (thus, HPGA should be close to zero)

The tests include :

  • a reference step that computes a high-fidelity reference solution (numerical quadrature in the vertical; a 4th-order gradient in the horizontal)
  • init steps at each of a list of horizontal and vertical resolutions that provide initial conditions and a Python implementation of the centered, 2nd-order HPGA
  • forward steps at each resolution that just computes the HPGA (in NormalVelocityTend) in Omega
  • an analysis step that checks the RMS difference between the Omega and Polaris centered HPGA (verification of the implementation) and plots the convergence of the HPGA with respect to the reference solution. Errors are raised if the Omega solution diverges too much from the Python implementation at any resolution or from the reference solution at the highest resolution. An error is also raised if the convergence rate is too poor.

Checklist

  • Developer's Guide has been updated
  • API documentation in the Developer's Guide (api.md) has any new or modified class, method and/or functions listed
  • Documentation has been built locally and changes look as expected
  • Testing comment in the PR documents testing used to verify the changes
  • New tests have been added to a test suite

@xylar
Copy link
Copy Markdown
Collaborator Author

xylar commented Feb 18, 2026

This is build off of #464 so I will hold off a bit on asking for reviews and rebase once that (hopefully) goes in.

@xylar xylar added enhancement New feature or request ocean Related to the ocean component Omega PR required The polaris changes won't work with the current Omega submodule and require an update labels Feb 19, 2026
@xylar xylar self-assigned this Feb 19, 2026
@xylar xylar requested a review from sbrus89 February 19, 2026 07:27
@xylar
Copy link
Copy Markdown
Collaborator Author

xylar commented Mar 11, 2026

This needs to be updated to not use the Density0 Omega config option to be consistent with E3SM-Project/Omega#358.

xylar added 20 commits April 12, 2026 10:18
For now, just creates initial conditions in each column, including
specific volume.
The vertical coordinate is z-tilde, but the z-tilde at the sea
floor has to be found iteratively such that the geometric
water-column thickness is as expected
The init steps support a sequence of resolutions for a convergence
test.
At least for now, it will be too confusing to have this capability
in the ocean component's framework since it is used for verification
only.
Also, switch to a more realistic CT and SA profile.
xylar added 25 commits April 12, 2026 10:18
Fix some confusing references to z-levels
We can't compare the Omega and reference solutions too close to
the bathymetry because the reference solution isn't good enough
(4th-order gradient breaks down) and doesn't have data at the same
locations as the Omega solution.
The analysis fails if errors exceed the thresholds or if the
convergence rate is outside the expected range.
Limit the convergence analysis to 6 km and higher.

Add absolute error threshold for situations where the HPGA is
too small for the normalize error to be useful.
Add 0.5 km resolution and lower convergence fit to <= 4 km.

Switch reference solution to higher res (0.25 km).

Adjust convergence thresholds.
This makes the problem more numerically challenging.
Drop coarsest resolutions (16, 8, 6 km) and add more fine resolutions
(1.5 and 0.75 km).
@xylar xylar force-pushed the add-omega-two-column branch from 5edaee3 to a385f6b Compare April 12, 2026 08:18
@cbegeman
Copy link
Copy Markdown
Collaborator

cbegeman commented Apr 13, 2026

Updated
I think the order of integration related to testing the pressure gradient might be

  1. Turn off HPG term in tests that do not require it #529 with submodule update to include Add centered pressure gradient Omega#353
  2. this PR
  3. a polaris PR to extend Omega support for the overflow test case led by @mark-petersen
  4. a polaris PR to extend Omega support for the seamount test case led by (?)

@xylar
Copy link
Copy Markdown
Collaborator Author

xylar commented Apr 13, 2026

@cbegeman, I would like #529 to bring in the submodule update. Form there, I agree.

@cbegeman
Copy link
Copy Markdown
Collaborator

@xylar Thanks for pointing that out. Sounds good

@sbrus89
Copy link
Copy Markdown
Contributor

sbrus89 commented Apr 14, 2026

I'll add the submodule update tomorrow. Sorry I forgot to do that today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ocean Related to the ocean component Omega PR required The polaris changes won't work with the current Omega submodule and require an update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants