Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
5093edf
Convert some initial FCT algorithm from F90 to C++
overfelt Jun 15, 2026
25c55dc
Update user guide
overfelt Jun 26, 2026
4ef8465
Add dumping of budget fields to output database.
overfelt Jun 30, 2026
0fed5e6
Documentation updates.
overfelt Jul 9, 2026
1d6e3c1
Adding unit tests for horizontal FCT transport.
overfelt Jul 10, 2026
90b44bf
Initialize Halo elements for unit tests
overfelt Jul 29, 2026
d702607
Initialize TimeStep member in AuxiliaryState
mwarusz Jul 24, 2026
fe46930
Add ProvPseudoThickness to aux state test
mwarusz Jul 24, 2026
54aa426
Fix vertical bounds in ProvPseudoThickness computation
mwarusz Jul 24, 2026
f0513b1
Add sanity checks for the time steps
mwarusz Jul 24, 2026
4771c9b
Switch python linting from isort and flake8 to ruff
xylar Aug 4, 2026
1a552ca
Apply ruff formatting to Omega's python code
xylar Aug 4, 2026
dcbe4f4
Add flake8-errmsg
xylar Aug 5, 2026
ab7fbb4
Fix flake8-errmsg violations in Omega's CIME scripts
xylar Aug 5, 2026
b7d37c0
Pass logical current level to VertMixImplicit
andrewdnolan Jul 31, 2026
6aab762
Exchange halos after vertical mixing
andrewdnolan Jul 31, 2026
fedf54a
Give each Omega unit test its own log file
xylar Aug 2, 2026
711cef3
Document Omega log file naming
xylar Aug 2, 2026
6932e65
Move LogFileStream out of Logging.h
xylar Aug 2, 2026
9c757e9
Add reconstruction stencil arrays to Decomp
andrewdnolan Jul 24, 2026
58e51fb
Conditionally read Weights in HorzMesh
andrewdnolan Jul 24, 2026
2c19a1d
Add VectorReconstructOnCell opeator and unit test
andrewdnolan Jul 24, 2026
30a66e5
Update documentation
andrewdnolan Jul 25, 2026
dd14249
Update mesh paths
andrewdnolan Jul 27, 2026
954aa69
Apply suggestions from code review
andrewdnolan Jul 30, 2026
9891440
Fix variable names and rename Reconstruct to Recon
andrewdnolan Aug 5, 2026
3aa7678
Use new names when reading from mesh
andrewdnolan Aug 6, 2026
4f938ee
Add clarifying comment to docs about MaxEdge2
andrewdnolan Aug 6, 2026
3c34042
Update mesh paths
andrewdnolan Aug 7, 2026
240ef29
Simplify creation of Tendencies
mwarusz Aug 7, 2026
42c1aa5
Update Tendencies documentation to reflect new create API
Copilot Aug 7, 2026
e943b41
Check for null pointers in create and init methods
mwarusz Aug 7, 2026
49dd0bc
Initialize VertAdv in a few tests
mwarusz Aug 7, 2026
f3a49f2
Fix a bug in field registration of ProvPseudoThickness
hyungyukang Aug 7, 2026
acfaa3c
Add missing halo exchanges
andrewdnolan Jul 31, 2026
cb17796
Apply suggestions from code review
andrewdnolan Aug 12, 2026
3765330
Add TEOS-10 first derivatives of specific volume
xylar Jul 29, 2026
db5d322
Add specific volume derivatives for linear and constant EOS
xylar Jul 29, 2026
09edcbc
Add Eos::computeSpecVolAndDerivs
xylar Jul 29, 2026
d7487f2
Add unit tests for TEOS-10 specific volume derivatives
xylar Jul 29, 2026
8020c08
Compute Brunt-Vaisala coefficients from the specific volume derivatives
xylar Jul 29, 2026
e693b08
Document specific volume derivatives in the EOS guides
xylar Jul 29, 2026
663e1c6
Distinguish point-wise and chunk-wise derivative calls by name
xylar Aug 2, 2026
9995df4
Explain when the specific volume derivatives are computed
xylar Aug 2, 2026
912f5ad
Say why alpha and beta cannot reuse the stored derivatives
xylar Aug 2, 2026
ee50cd7
Distinguish the two GSW-C based derivative tests
xylar Aug 2, 2026
4bbdd28
Correct which calls need the specific volume derivatives
xylar Aug 2, 2026
462ae9d
Remove vertical chunking from the equation of state
xylar Aug 6, 2026
87d8ead
Rename calcSpecVolAndDerivsInChunk to OnCells
xylar Aug 6, 2026
0d86853
Merge branch 'E3SM-Project:develop' into overfelt/FCTHigherOrderTendency
overfelt Aug 17, 2026
12e1c2c
Remove Team.team_barrier() and Kokkos::fence(). Omega does not need them
overfelt Aug 17, 2026
1ef3363
Adjust array sizes to be consistent
overfelt Aug 17, 2026
e87adea
Modify TendencyTermsPlane test
overfelt Aug 18, 2026
78c7011
Update test results to pass on Chrysalis
overfelt Aug 18, 2026
f169174
Merge branch 'E3SM-Project:develop' into overfelt/FCTHigherOrderTendency
overfelt Aug 19, 2026
03015b8
Update components/omega/src/ocn/TendencyTerms.cpp
overfelt Aug 20, 2026
c92160c
Changes from code review feedback
overfelt Aug 20, 2026
6f101ea
Fix up Sphere tests for FCT
overfelt Aug 20, 2026
1321ec4
Change VerticalPseudoVelocity to TotalVerticalPseudoVelocity in FCT.
overfelt Aug 24, 2026
096264a
Clang format
overfelt Aug 24, 2026
0452def
Set error values to pass on Frontier for testTendencyTermsPlane.exe.
overfelt Aug 28, 2026
2e5d6f7
Put some ATol on check values close to zero.
overfelt Aug 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions components/omega/configs/Default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ Omega:
FluxThicknessType: Center
HorzTracerFluxOrder: 2
VerticalTracerFluxLimiterEnable: true
HorzTracerFluxLimiterEnable: false
HorzTracerFluxLimiterBudgetsEnable: false
HorzTracerFluxLimiterMonotonicityCheckEnable: false
VerticalTracerFluxOrder: 3
SfcStress:
InterpType: Isotropic
Expand Down
17 changes: 14 additions & 3 deletions components/omega/doc/design/Tendencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,22 @@ class Tendencies{
VelocityHyperDiffOnEdge VelocityHyperDiff;
SfcStressForcingOnEdge SfcStressForcing;
BottomDragOnEdge ExplicitBottomDrag;
TracerHorzAdvOnCell TracerHorzAdv;
TracerDiffOnCell TracerDiffusion;
TracerHyperDiffOnCell TracerHyperDiff;
TracerHorzAdvOnCell TracerHorzAdv;
TracerHighOrderHorzAdvOnCell TracerHighOrderHorzAdv;
SurfaceTracerRestoringOnCell SurfaceTracerRestoring;

private:
const HorzMesh *Mesh; ///< Pointer to horizontal mesh
VertCoord *VCoord; ///< Pointer to vertical coordinate
VertAdv *VAdv; ///< Pointer to vertical advection
CustomTendencyType CustomThicknessTend;
CustomTendencyType CustomVelocityTend;
Eos *EqState; ///< Pointer to equation of state
PressureGrad *PGrad; ///< Pointer to pressure gradient
VertMix *VMix; ///< Pointer to vertical mixing
I4 NTracers; ///< Number of tracers
TimeInterval TimeStep; ///< Time step
static Tendencies *DefaultTendencies;
static std::map<std::string, std::unique_ptr<Tendencies>> AllTendencies;
};
Expand Down Expand Up @@ -106,7 +117,7 @@ void Tendencies::computeAllTendencies(const OceanState *State, const AuxilarySta
```
The layer thickness tendencies will be computed with a method:
```c++
void Tendencies::computeThicknessTendencies(const OceanState *State, const AuxilaryState *AuxState, int TimeLevel, int VelTimeLevel, TimeInstant Time);
void Tendencies::computePseudoThicknessTendencies(const OceanState *State, const AuxilaryState *AuxState, int TimeLevel, int VelTimeLevel, TimeInstant Time);
```
The normal velocity tendencies will be computed with a method:
```c++
Expand Down
1 change: 0 additions & 1 deletion components/omega/doc/devGuide/TendencyTerms.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ implemented:
- `SfcStressForcingOnEdge`
- `BottomDragOnEdge`
- `TracerHorzAdvOnCell`
- `TracerHighOrderHorzAdvOnCell`
- `TracerDiffOnCell`
- `TracerHyperDiffOnCell`
- `SurfaceTracerRestoringOnCell`
Expand Down
94 changes: 88 additions & 6 deletions components/omega/doc/userGuide/TendencyTerms.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ tendency terms are currently implemented:
| VelocityDiffusionOnEdge | Laplacian horizontal mixing, defined on edges
| VelocityHyperDiffOnEdge | biharmonic horizontal mixing, defined on edges
| TracerHorzAdvOnCell | horizontal advection of thickness-weighted tracers
| TracerHighOrderHorzAdvOnCell | second order horizontal advection of thickness-weighted tracers
| TracerDiffOnCell | horizontal diffusion of thickness-weighted tracers
| TracerHyperDiffOnCell | biharmonic horizontal mixing of thickness-weighted tracers
| SfcStressForcingOnEdge | forcing by surface stress (e.g. wind), defined on edges
Expand Down Expand Up @@ -45,9 +44,11 @@ the currently available tendency terms:
| | ViscDel4 | horizontal biharmonic mixing coefficient for normal velocity
| | DivFactor | scale factor for the divergence term
| TracerHorzAdvOnCell | TracerHorzAdvTendencyEnable | enable/disable term
| | HorzTracerFluxOrder | 1 for standard linear advection
| TracerHighOrderHorzAdvOnCell | TracerHorzAdvTendencyEnable | enable/disable term
| | HorzTracerFluxOrder | 2 for second order advection algorithm
| | HorzTracerFluxOrder | 2 for standard linear advection
| | HorzTracerFluxOrder | 3 for second order advection algorithm
| | HorzTracerFluxLimiterEnable | enable/disable monotonic flux corrected transport (FCT). Requires HorzTracerFluxOrder to be greater than 2.
| | HorzTracerFluxLimiterBudgetsEnable | enable/disable budgets if FCT is enabled
| | HorzTracerFluxLimiterMonotonicityCheckEnable | enable/disable check for mon-mononic values if FCT is enabled
| TracerDiffOnCell | TracerDiffTendencyEnable | enable/disable term
| | EddyDiff2 | horizontal diffusion coefficient
| TracerHyperDiffOnCell | TracerHyperDiffTendencyEnable | enable/disable term
Expand Down Expand Up @@ -94,13 +95,13 @@ $$
$$
Where $u$ is $\mathbf{V}\cdot\mathbf{n}$ where $\mathbf{n}$ is the unit normal along the edge being evaluated and $F$ is the evaluation
of $\psi$ for the elements on each side of the edge being evaluated.
This is used when the TracerHorzAdvOnCell user option is active and HorzTracerFluxOrder is 1.
This is used when the TracerHorzAdvOnCell user option is active and HorzTracerFluxOrder is 2.
To make the comparison to higher order methods explicit, this first order method is equivalent to defining $\psi$ as a linear function,
$\psi = c_0 + c_x x + c_y y$, between the two elements sharing the edge $i$ and taking the directed derivative along the edge.


For higher order flux calculations, higher order derivatives of $\psi$ are needed and for the user option of
TracerHorzAdvOnCell along with HorzTracerFluxOrder set to 2, a quadratic approximation of $\psi$ is used,
TracerHorzAdvOnCell along with HorzTracerFluxOrder set to 3, a quadratic approximation of $\psi$ is used,
$$
\psi = c_0 + c_x x + c_y y + c_{xx} x^2 + c_{xy} xy + c_{yy} y^2,
$$
Expand Down Expand Up @@ -140,6 +141,87 @@ is about order 1.7 as shown in {numref}`tracer-higher-order-convergence`:
Tracer higer order convergence example of a cosine bell advected on a sphere showing an order 1.71 convergence rate
```

### Monotonic Flux Limiting Transport for Second Order Horizontal Advection

It is well known that higher order (order 2 and above) scheme for numerically integrating fluxes suffer
from dispersive "ripples" in the results particularly near steep gradients. Lower order schemes
produce no ripples but suffer from excessive numerical diffusion. Flux-corrected transport (FCT) is a
technique which embodies the best of both schemes.

The implementation of a monotonic flux-corrected transport (FCT) in Omega follows a standard algorithm as given in

Zalesak, S. T. (1979). Fully multidimensional flux-corrected transport algorithms for fluids.
Journal of Computational Physics, 31(3), 335–362. DOI: 10.1016/0021-9991(79)90051-2

The procedure is as follows given the notation above:
1. Compute $F^L_{i+1/2}(u\psi)$, the transportive flux by some low order scheme guarenteed to give
monotonic (ripple-free) results.
2. Compute $F^H_{i+1/2}(u\psi)$, the transportative flux by some high order scheme.
3. Define the "antififfusive flux":
$$
A_{i+1/2}(u\psi) = F^H_{i+1/2}(u\psi) - F^L_{i+1/2}(u\psi)
$$
4. Compute the updated low order ("transported and diffused") "td" solution:
$$
w^{td}_i = w^n_i - \frac{1}{\Delta x}[F_{i+1/2}(u\psi) - F_{i-1/2}(u\psi)]
$$
5. Limit he $A_{i+1/2}(u\psi)$ in a manner such that $w^{n+1}$ as computed below is free of extrema
not found in $w^{td}$ = $w^n$;
$$
A^C_{i+1/2}(u\psi) = C_{i+1/2}(u\psi) A_{i+1/2}(u\psi), \quad \quad 0 \leq C_{i+1/2} \leq 1
$$
6. Finally apply hte limited antidiffusive fluxes:
$$
w^{n+1}_i = w^{td}_i - \frac{1}{\Delta x}[A^C_{i+1/2}(u\psi) - A^C_{i-1/2}(u\psi)]
$$


```{figure} images/higher_order_tracer_convergence_on_sphere_FCT.jpeg
:name: tracer-higher-order-convergence_FCT
:align: center
:width: 600 px
Tracer higer order convergence example of a cosine bell advected on a sphere with FCT showing an order 2.23 convergence rate
```


When monotonic flux limiting is used then there are two diagnostic options that can be enabled,
HorzTracerFluxLimiterBudgetsEnable and HorzTracerFluxLimiterMonotonicityCheckEnable. The
HorzTracerFluxLimiterMonotonicityCheckEnable flag enables a post-transport check that the
resulting values are indeed monotone as required by the algorithm and any discrepancies are
printed along with information on where they occur.

The HorzTracerFluxLimiterBudgetsEnable option enables the output of two diagnostic fields to the
output mesh file. One is the "FCTActiveTracerHorizontalAdvectionEdgeFlux" variable which is the
edge flux across every side of every element. The other is the "FCTActiveTracerHorizontalAdvectionTendency"
variable which is the cell-centered value of the advection tendency.


### Monotonic Flux Limiting Transport Example of Limiting Ripple Effect

The effect of monotonic higher order FCT horizontal transport verses just higher order horizontal transport
can be seen in the Polaris test of the slotted cylinder. The cylinder is advected for one revolution under
a constant velocity field. The result is advecting the solution back to the original configuration as
an exact solution. The difference between the initial condition and the advected solution is the error
in the advection scheme. This difference is shown in the following two plots for non-monotonic and monotonic
advection.

```{figure} images/higher_order_slotted_cylinder_non_monotonic_diff.jpg
:name: tracer-error-in-higher-order-convergence_non-monotonic
:align: center
:width: 600 px
Error in a tracer higher order convergence example of a slotted cylinder advected on a sphere with the standard third order advection
algorithm with no FCT flux correction. Notice the ringing due to the sharp edges of the tracer distribution.
```

```{figure} images/higher_order_slotted_cylinder_FCT_diff.jpg
:name: tracer-error-in-higher-order-convergence_FCT
:align: center
:width: 600 px
Error Tracer higher order convergence example of a slotted cylinder advected on a sphere with FCT monotone
flux correction. Notice the reduction in ringing around the sharp edges of the tracer distribution.
```


## See Also

Additional information on forcing (currently wind forcing and surface tracer
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading