Add Omega horizontal pressure gradient tests#465
Draft
xylar wants to merge 53 commits intoE3SM-Project:mainfrom
Draft
Add Omega horizontal pressure gradient tests#465xylar wants to merge 53 commits intoE3SM-Project:mainfrom
xylar wants to merge 53 commits intoE3SM-Project:mainfrom
Conversation
Collaborator
Author
|
This is build off of #464 so I will hold off a bit on asking for reviews and rebase once that (hopefully) goes in. |
19 tasks
Collaborator
Author
|
This needs to be updated to not use the |
1 task
c5259f4 to
5edaee3
Compare
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.
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).
5edaee3 to
a385f6b
Compare
Collaborator
|
Updated
|
Collaborator
Author
Collaborator
|
@xylar Thanks for pointing that out. Sounds good |
Contributor
|
I'll add the submodule update tomorrow. Sorry I forgot to do that today. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This merge adds three
horiz_press_gradtests for the horizontal pressure-gradient acceleration (HPGA) in Omega:salinity_gradient- salinity varies horizontally; temperature varies only with depth and layer pseudo-thicknesses are uniformtemperature_gradient- temperature varies horizontally; salinity varies only with depth and layer pseudo-thicknesses are uniformztilde_gradient- pseudo-height of layers are sloped; temperature and salinity vary only with depth (thus, HPGA should be close to zero)The tests include :
referencestep that computes a high-fidelity reference solution (numerical quadrature in the vertical; a 4th-order gradient in the horizontal)initsteps at each of a list of horizontal and vertical resolutions that provide initial conditions and a Python implementation of the centered, 2nd-order HPGAforwardsteps at each resolution that just computes the HPGA (inNormalVelocityTend) in Omegaanalysisstep 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
api.md) has any new or modified class, method and/or functions listedTestingcomment in the PR documents testing used to verify the changes