Add submesoscale eddy parametrization#438
Open
mwarusz wants to merge 12 commits into
Open
Conversation
Member
Author
|
The parametrization unit tests are passing. However, after turning it on in the baroclinic channel polaris test with the default parameters, I see NaNs after about 3 hours of simulation time, so there is still some debugging to be done. Moreover, user and developer documentation needs to be added. |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new submesoscale eddy parameterization module (Fox-Kemper
et al. 2011) into Omega’s ocean model, wires it into initialization/finalization
and tendency/auxiliary-state workflows, and adds a dedicated unit test plus
broad test-harness updates to support new analytic-field helper signatures.
Changes:
- Add
SubmesoEddiesmodule (config-driven) and integrate it into ocean module
init/finalize and auxiliary-state computation. - Introduce
TransportAuxVars::NormalTransportVelocityand use it in thickness
and tracer tendency computations as the transport velocity (optionally
including submesoscale-induced velocity). - Update unit test utilities and many tests to accommodate updated analytic
field setters; addSubmesoEddiesTest.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| components/omega/test/timeStepping/TimeStepperTest.cpp | Initialize/destroy SubmesoEddies in the time stepper test harness. |
| components/omega/test/ocn/TendencyTermsTest.cpp | Update analytic-field lambdas to match updated setScalar/setVectorEdge signatures. |
| components/omega/test/ocn/TendenciesTest.cpp | Initialize/destroy SubmesoEddies; update analytic-field lambdas and setScalar/setVectorEdge call signatures. |
| components/omega/test/ocn/SubmesoEddiesTest.cpp | New unit test covering mixed-layer depth, buoyancy gradient, and eddy velocity computations. |
| components/omega/test/ocn/OceanTestCommon.h | Extend setScalar/setVectorEdge helpers to pass element indices and optional Z coordinates. |
| components/omega/test/ocn/HorzOperatorsTest.cpp | Update analytic-field lambdas to match updated helper signatures. |
| components/omega/test/ocn/AuxiliaryVarsTest.cpp | Update analytic-field lambdas to match updated helper signatures. |
| components/omega/test/ocn/AuxiliaryStateTest.cpp | Initialize/destroy SubmesoEddies; update analytic-field lambdas and helper call signatures. |
| components/omega/test/CMakeLists.txt | Register new SUBMESOEDDIES_TEST. |
| components/omega/src/timeStepping/ForwardBackwardStepper.cpp | Pass tracer array into thickness tendency computation. |
| components/omega/src/ocn/Tendencies.h | Extend thickness tendency API to accept a tracer array (for aux-state computations). |
| components/omega/src/ocn/Tendencies.cpp | Route thickness/tracer tendencies through new aux-state compute routines and use NormalTransportVelocity. |
| components/omega/src/ocn/SubmesoEddies.h | New SubmesoEddies public interface. |
| components/omega/src/ocn/SubmesoEddies.cpp | New implementation and IO field registration for SubmesoEddies. |
| components/omega/src/ocn/OceanInit.cpp | Initialize SubmesoEddies during ocean module init. |
| components/omega/src/ocn/OceanFinal.cpp | Destroy SubmesoEddies during ocean finalize. |
| components/omega/src/ocn/auxiliaryVars/TransportAuxVars.h | New aux-var container for NormalTransportVelocity. |
| components/omega/src/ocn/auxiliaryVars/TransportAuxVars.cpp | Register/unregister IO field for NormalTransportVelocity. |
| components/omega/src/ocn/AuxiliaryState.h | Add TransportAuxVars member and new aux compute entry points. |
| components/omega/src/ocn/AuxiliaryState.cpp | Compute Brunt–Väisälä frequency, compute transport velocity (optionally + submeso), and use it for vertical pseudo-velocity. |
| components/omega/configs/Default.yml | Add Omega.Submeso configuration group and defaults. |
Comment on lines
+173
to
+182
| KOKKOS_LAMBDA(int IEdge, const TeamMember &Team) { | ||
| const int KMin = MinLayerEdgeBot(IEdge); | ||
| const int KMax = MaxLayerEdgeTop(IEdge); | ||
| const int KRange = vertRangeChunked(KMin, KMax); | ||
|
|
||
| parallelForInner( | ||
| Team, KRange, INNER_LAMBDA(int KChunk) { | ||
| LocPseudoThicknessAux.computeVarsOnEdge( | ||
| IEdge, KChunk, PseudoThick, NormalVelEdge); | ||
| }); |
Comment on lines
+18
to
+22
| /// Destroy instance of SubmesoEddies | ||
| void SubmesoEddies::destroyInstance() { | ||
| delete Instance; | ||
| Instance = nullptr; | ||
| } |
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 PR adds the submesoscale eddy parametrization in the form presented in Fox-Kemper et al. 2011. The parametrization class provides three main methods that
respectively. A new auxiliary variable named
NormalTransportVelocityhas been added. This velocity variable is used to advect pseudo-thickness and tracers, and can optionally include the submesocale induced velocity.Checklist
Testingwith the following:have been run on and indicate that are all passing.
has passed, using the Polaris
e3sm_submodules/Omegabaseline-pfor both the baseline (Polarise3sm_submodules/Omega) and the PR build