You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**NOTE:** A `BoussinesqEquationOfState` must be used in the `model` to calculate
44
-
`seawater_density`. See the [relevant documentation](https://clima.github.io/OceananigansDocumentation/dev/model_setup/buoyancy_and_equation_of_state/#Idealized-nonlinear-equations-of-state)
45
-
for how to set `SeawaterBuoyancy` using a `BoussinesqEquationOfState`.
37
+
The optional keyword argument `geopotential_height` is only used
38
+
if ones wishes to calculate `Eₚ` with a potential density referenced to `geopotential_height`,
39
+
rather than in-situ density, when using a `BoussinesqEquationOfState`.
46
40
47
41
Example
48
42
=======
49
43
50
-
The default behaviour of `PotentialEnergy` uses the *in-situ density* in the calculation:
44
+
Usage with a `BuoyancyTracer` buoyacny model
45
+
```jldoctest
46
+
julia> using Oceananigans
47
+
48
+
julia> using Oceanostics.PotentialEnergyEquationTerms: PotentialEnergy
├── grid: 1×1×100 RectilinearGrid{Float64, Flat, Flat, Bounded} on CPU with 0×0×3 halo
59
+
├── timestepper: QuasiAdamsBashforth2TimeStepper
60
+
├── tracers: b
61
+
├── closure: Nothing
62
+
├── buoyancy: BuoyancyTracer with ĝ = NegativeZDirection()
63
+
└── coriolis: Nothing
64
+
65
+
julia> PotentialEnergy(model)
66
+
KernelFunctionOperation at (Center, Center, Center)
67
+
├── grid: 1×1×100 RectilinearGrid{Float64, Flat, Flat, Bounded} on CPU with 0×0×3 halo
68
+
├── kernel_function: bz_ccc (generic function with 1 method)
69
+
└── arguments: ("1×1×100 Field{Center, Center, Center} on RectilinearGrid on CPU", "KernelFunctionOperation at (Center, Center, Center)")
70
+
```
71
+
72
+
The default behaviour of `PotentialEnergy` uses the *in-situ density* in the calculation
73
+
when the equation of state is a `BoussinesqEquationOfState`:
51
74
```jldoctest
52
75
julia> using Oceananigans, SeawaterPolynomials.TEOS10
53
76
@@ -114,35 +137,48 @@ KernelFunctionOperation at (Center, Center, Center)
114
137
└── arguments: ("KernelFunctionOperation at (Center, Center, Center)", "KernelFunctionOperation at (Center, Center, Center)", "(g=9.80665, ρ₀=1020.0)")
0 commit comments