Skip to content

Commit 23d5e8e

Browse files
committed
Tests passed locally
1 parent 23e8adb commit 23d5e8e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/PotentialEnergyEquationTerms.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ using SeawaterPolynomials: BoussinesqEquationOfState
1717

1818
const NoBuoyancyModel = Union{Nothing, ShallowWaterModel}
1919
const BuoyancyTracerModel = Buoyancy{<:BuoyancyTracer, g} where g
20-
const BuoyancyLinearEOSModel = Buoyancy{<:SeawaterBuoyancy{FT, <:LinearEquationOfState, T, S}} where {FT, T, S}
21-
const BuoyancyBoussinesqEOSModel = Buoyancy{<:SeawaterBuoyancy{FT, <:BoussinesqEquationOfState, T, S}} where {FT, T, S}
20+
const BuoyancyLinearEOSModel = Buoyancy{<:SeawaterBuoyancy{FT, <:LinearEquationOfState, T, S} where {FT, T, S}, g} where {g}
21+
const BuoyancyBoussinesqEOSModel = Buoyancy{<:SeawaterBuoyancy{FT, <:BoussinesqEquationOfState, T, S} where {FT, T, S}, g} where {g}
2222

2323
validate_gravity_unit_vector(gravity_unit_vector::NegativeZDirection) = nothing
2424
validate_gravity_unit_vector(gravity_unit_vector) =
@@ -110,7 +110,7 @@ julia> PotentialEnergy(model)
110110
KernelFunctionOperation at (Center, Center, Center)
111111
├── grid: 1×1×100 RectilinearGrid{Float64, Flat, Flat, Bounded} on CPU with 0×0×3 halo
112112
├── kernel_function: g′z_ccc (generic function with 1 method)
113-
└── arguments: ("KernelFunctionOperation at (Center, Center, Center)", "KernelFunctionOperation at (Center, Center, Center)", "(g=9.80665, ρ₀=1020.0)")
113+
└── arguments: ("KernelFunctionOperation at (Center, Center, Center)", "(g=9.80665, ρ₀=1020.0)")
114114
```
115115
116116
To use a reference density set a constant value for the keyword argument `geopotential_height`
@@ -143,7 +143,7 @@ KernelFunctionOperation at (Center, Center, Center)
143143
geopotential_height = model_geopotential_height(model))
144144

145145
validate_location(location, "PotentialEnergy")
146-
validate_gravity_unit_vector(model.buoyancy.gravity_unit_vector)
146+
isnothing(model.buoyancy) ? nothing : validate_gravity_unit_vector(model.buoyancy.gravity_unit_vector)
147147

148148
return PotentialEnergy(model, model.buoyancy, geopotential_height)
149149
end

0 commit comments

Comments
 (0)