Skip to content

Commit 7102ec2

Browse files
authored
Merge pull request #287 from CliMA/ts/DSE
Add DSE function
2 parents 9577fb1 + 33b2e8e commit 7102ec2

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

.github/workflows/invalidations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- uses: julia-actions/setup-julia@v1
2020
with:
21-
version: '1'
21+
version: '1.11'
2222
- uses: actions/checkout@v4
2323
- uses: julia-actions/julia-buildpkg@v1
2424
- uses: julia-actions/julia-invalidations@v1

docs/src/API.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ liquid_ice_pottemp_sat
8686
liquid_specific_humidity
8787
mixing_ratios
8888
moist_static_energy
89+
dry_static_energy
8990
virtual_dry_static_energy
9091
q_vap_from_RH_liquid
9192
q_vap_saturation

src/air_energies.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export specific_enthalpy_vapor
1313
export specific_enthalpy_liquid
1414
export specific_enthalpy_ice
1515
export total_specific_enthalpy
16+
export dry_static_energy
1617
export virtual_dry_static_energy
1718

1819
"""
@@ -205,6 +206,7 @@ When `q` is not provided, the results are for dry air.
205206
return e_int + R_m * T
206207
end
207208

209+
208210
"""
209211
specific_enthalpy_sat(param_set, T, ρ, q_tot, phase_type)
210212
@@ -320,3 +322,17 @@ The total specific enthalpy, given
320322
@inline function total_specific_enthalpy(e_tot, R_m, T)
321323
return e_tot + R_m * T
322324
end
325+
326+
"""
327+
dry_static_energy(param_set, T, e_pot)
328+
329+
The dry static energy, given
330+
331+
- `param_set` an `AbstractParameterSet`, see the [`Thermodynamics`](@ref) for more details
332+
- `T` temperature
333+
- `e_pot` gravitational potential energy per unit mass (geopotential)
334+
335+
"""
336+
@inline function dry_static_energy(param_set::APS, T, e_pot)
337+
return specific_enthalpy_dry(param_set, T) + e_pot
338+
end

0 commit comments

Comments
 (0)