Skip to content

Commit cd06a3b

Browse files
xylarclaude
andcommitted
Clarify that Omega pressure fields are relative (gauge) pressure
All three pressure fields (SurfacePressure, PressureInterface, PressureMid) are relative pressure — absolute pressure minus the standard atmosphere (101325 Pa). This clarification is needed because: - The CF standard name sea_water_pressure applies to absolute pressure, so it is removed and left blank for PressureInterface and PressureMid - The TEOS-10 EOS expects relative pressure, consistent with how Eos.h already passes pressure (Pa2Db * Pressure with no AtmRefP offset) - The z-tilde pseudo-height is 0 m at the sea surface under standard atmospheric forcing only when p is relative pressure Changes: - VertCoord.cpp: remove sea_water_pressure CF name, update long names and min valid values (-AtmRefP, since absolute pressure >= 0) for PressureInterface and PressureMid; clarify computePressure comment - VertCoord.h: clarify computePressure declaration comment - Eos.h: note that Pressure inputs to TEOS-10 functors are relative - userGuide/OceanState.md: describe SurfacePressure as relative pressure, typically 0 Pa for standard atmospheric forcing - userGuide/VertCoord.md: note that p in the pseudo-height formula is relative pressure; update PressureInterface/PressureMid descriptions - devGuide/OceanState.md: note SurfacePressure is relative pressure Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2e93f40 commit cd06a3b

6 files changed

Lines changed: 50 additions & 33 deletions

File tree

components/omega/doc/devGuide/OceanState.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ The `SurfacePressure` device array can be retrieved with:
7777
```c++
7878
Array1DReal SurfPres = State->getSurfacePressure();
7979
```
80+
`SurfacePressure` is **relative pressure** (gauge pressure, i.e., absolute pressure minus the
81+
standard atmosphere of 101325 Pa), so it is typically zero (0 Pa) for free-surface runs with
82+
standard atmospheric forcing.
8083
This is used by `VertCoord` to compute layer pressures; `VertCoord` receives the array pointer
8184
via `VertCoord::setSurfacePressure()` during `OceanState::init()`.
8285

components/omega/doc/userGuide/OceanState.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ initial-condition file and written to restart files.
1010
The class contains a method to update the time levels for the state variables between timesteps.
1111
This involves a halo update, time level index update, and updating the `IOFields` data references.
1212

13-
`SurfacePressure` represents the pressure (Pa) at the top of the ocean column.
13+
`SurfacePressure` represents the relative pressure (Pa) at the top of the ocean column,
14+
i.e., absolute pressure minus the standard atmosphere (101325 Pa).
1415
Unlike `NormalVelocity` and `PseudoThickness`, it does not carry multiple time levels.
1516
Because `SurfacePressure` is registered in the `State` field group, it is read from the
1617
initial-condition file and must be present there; it does not default to zero.
17-
For a free-surface ocean run the surface pressure is typically set to atmospheric pressure
18-
(~101325 Pa) in the initial-condition file.
18+
For a free-surface ocean run with standard atmospheric forcing, the surface pressure is
19+
zero (0 Pa) in the initial-condition file.
20+
For a coupled ocean–atmosphere run, `SurfacePressure` holds the anomaly of the atmospheric
21+
surface pressure from the standard atmosphere.

components/omega/doc/userGuide/VertCoord.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
### Overview
66

7-
Omega uses pseudo height, $\tilde{z} = \frac{p}{\rho_0 g}$, as the vertical coordinate ([V1 governing equation document](omega-design-governing-eqns-omega1)).
7+
Omega uses pseudo height, $\tilde{z} = \frac{p}{\rho_0 g}$, as the vertical coordinate ([V1 governing equation document](omega-design-governing-eqns-omega1)),
8+
where $p$ is **relative pressure** (gauge pressure, i.e., absolute pressure minus the standard atmosphere of 101325 Pa).
9+
With this definition, $\tilde{z} = 0$ at the sea surface under standard atmospheric forcing.
810
In practice, $\tilde{z}$ is not computed directly.
911
Instead, the model tracks and evolves the pseudo-thickness, $\tilde{h} = \Delta \tilde{z}$, defined as the difference between adjacent layer interfaces.
1012
The pseudo height is essentially a normalized pressure coordinate, with the advantage that it has units of meters.
@@ -27,8 +29,8 @@ Multiple instances of the vertical coordinate class can be created and accessed
2729
| ------------- | ----------- | ----- |
2830
| NVertLayers | maximum number of vertical layers | - |
2931
| NVertLayersP1 | maximum number of vertical layers plus 1 | - |
30-
| PressureInterface | pressure at layer interfaces | force per unit area at layer interfaces | kg m$^{-1}$ s$^{-2}$ |
31-
| PressureMid | pressure at layer mid points | force per unit area at layer mid point | kg m$^{-1}$ s$^{-2}$ |
32+
| PressureInterface | relative pressure (gauge pressure) at layer interfaces | Pa |
33+
| PressureMid | relative pressure (gauge pressure) at layer midpoints | Pa |
3234
| GeomZInterface | geometric height of layer interfaces | m |
3335
| GeomZMid | geometric height of layer midpoint | m |
3436
| GeopotentialMid | geopotential at layer mid points | m$^2$/s$^2$|

components/omega/src/ocn/Eos.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ class Teos10Eos {
3636

3737
// The functor takes the full arrays of specific volume (inout),
3838
// the indices ICell and KChunk, and the ocean tracers (conservative)
39-
// temperature, and (absolute) salinity as inputs, and outputs the
40-
// specific volume according to the Roquet et al. 2015 75 term expansion.
39+
// temperature, (absolute) salinity, and relative pressure (gauge pressure,
40+
// i.e., absolute pressure minus the standard atmosphere) as inputs, and
41+
// outputs the specific volume according to the Roquet et al. 2015 75 term
42+
// expansion.
4143
KOKKOS_FUNCTION void operator()(Array2DReal SpecVol, I4 ICell, I4 KChunk,
4244
const Array2DReal &ConservTemp,
4345
const Array2DReal &AbsSalinity,
@@ -353,7 +355,9 @@ class Teos10Eos {
353355
}
354356

355357
/// Calculates freezing Conservative Temperature using TEOS-10 polynomial
356-
/// (polynomial error in [-5e-4, 6e-4] K, from GSW package)
358+
/// (polynomial error in [-5e-4, 6e-4] K, from GSW package).
359+
/// P is relative pressure (gauge pressure in Pa, i.e., absolute pressure
360+
/// minus the standard atmosphere).
357361
KOKKOS_FUNCTION Real calcCtFreezing(const Real Sa, const Real P,
358362
const Real SaturationFract) const {
359363
constexpr Real Sso = 35.16504;
@@ -482,8 +486,9 @@ class Teos10BruntVaisalaFreqSq {
482486

483487
// The functor takes the full arrays of squared Brunt-Vaisala frequency
484488
// (inout) the index ICell, and the ocean tracers (conservative)
485-
// temperature, (absolute) salinity, pressure, specific volume as inputs,
486-
// and outputs the squared Brunt-Vaisala frequency.
489+
// temperature, (absolute) salinity, relative pressure (gauge pressure,
490+
// i.e., absolute pressure minus the standard atmosphere), and specific
491+
// volume as inputs, and outputs the squared Brunt-Vaisala frequency.
487492
KOKKOS_FUNCTION void operator()(Array2DReal BruntVaisalaFreqSq, I4 ICell,
488493
I4 KChunk, const Array2DReal &ConservTemp,
489494
const Array2DReal &AbsSalinity,

components/omega/src/ocn/VertCoord.cpp

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -330,14 +330,14 @@ void VertCoord::defineFields() {
330330
DimNames[1] = "NVertLayersP1";
331331

332332
auto PressureInterfaceField = Field::create(
333-
PressInterfFldName, // field name
334-
"Pressure at vertical layer interfaces", // long name or description
335-
"Pa", // units
336-
"sea_water_pressure", // CF standard Name
337-
0.0, // min valid value
338-
std::numeric_limits<Real>::max(), // max valid value
339-
NDims, // number of dimensions
340-
DimNames // dimension names
333+
PressInterfFldName, // field name
334+
"Relative pressure (gauge pressure) at layer interfaces", // long name
335+
"Pa", // units
336+
"", // CF standard Name
337+
-AtmRefP, // min valid value
338+
std::numeric_limits<Real>::max(), // max valid value
339+
NDims, // number of dimensions
340+
DimNames // dimension names
341341
);
342342

343343
auto GeomZInterfaceField = Field::create(
@@ -354,14 +354,14 @@ void VertCoord::defineFields() {
354354
DimNames[1] = "NVertLayers";
355355

356356
auto PressureMidField = Field::create(
357-
PressMidFldName, // field name
358-
"Pressure at vertical layer midpoints", // long name or description
359-
"Pa", // units
360-
"sea_water_pressure", // CF standard Name
361-
0.0, // min valid value
362-
std::numeric_limits<Real>::max(), // max valid value
363-
NDims, // number of dimensions
364-
DimNames // dimension names
357+
PressMidFldName, // field name
358+
"Relative pressure (gauge pressure) at layer midpoints", // long name
359+
"Pa", // units
360+
"", // CF standard Name
361+
-AtmRefP, // min valid value
362+
std::numeric_limits<Real>::max(), // max valid value
363+
NDims, // number of dimensions
364+
DimNames // dimension names
365365
);
366366

367367
auto GeomZMidField = Field::create(
@@ -957,11 +957,12 @@ void VertCoord::setMasks() {
957957
} // end setMasks()
958958

959959
//------------------------------------------------------------------------------
960-
// Compute the pressure at each layer interface and midpoint given the
961-
// PseudoThickness and SurfacePressure. Hierarchical parallelism is used with a
962-
// parallel_for loop over all cells and a parallel_scan performing a prefix sum
963-
// in each column to compute pressure from the top-most active layer to the
964-
// bottom-most active layer.
960+
// Compute the relative pressure (gauge pressure, i.e., absolute pressure minus
961+
// the standard atmosphere of 101325 Pa) at each layer interface and midpoint
962+
// given PseudoThickness and SurfacePressure (also relative). Hierarchical
963+
// parallelism is used with a parallel_for loop over all cells and a
964+
// parallel_scan performing a prefix sum in each column from the top-most active
965+
// layer to the bottom-most active layer.
965966
void VertCoord::computePressure(
966967
const Array2DReal &PseudoThickness, // [in] pseudo-thickness
967968
const Array1DReal &SurfacePressure // [in] surface pressure

components/omega/src/ocn/VertCoord.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,12 @@ class VertCoord {
269269

270270
/// Sums the mass thickness times g from the top layer down, starting with
271271
/// the surface pressure
272+
/// Computes the relative pressure (gauge pressure, i.e., absolute pressure
273+
/// minus the standard atmosphere) at layer interfaces and midpoints by
274+
/// summing mass thickness times g from the top layer down.
272275
void computePressure(
273276
const Array2DReal &PseudoThickness, ///< [in] pseudo-thickness
274-
const Array1DReal &SurfacePressure ///< [in] surface pressure
277+
const Array1DReal &SurfacePressure ///< [in] relative surface pressure
275278
);
276279

277280
/// Sum the mass thickness times specific volume from the bottom layer up,

0 commit comments

Comments
 (0)