Skip to content

Commit f9f822a

Browse files
committed
Remove deprecated code; add some tests
1 parent 56eb262 commit f9f822a

30 files changed

+47
-4818
lines changed

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ steps:
3131

3232
- label: "CPU tests"
3333
command:
34-
- "THERMODYNAMICS_INCLUDE_DEPRECATED=false julia --project=test/ --color=yes test/runtests.jl"
34+
- "julia --project=test/ --color=yes test/runtests.jl"
3535
agents:
3636
slurm_ntasks: 1
3737
timeout_in_minutes: 60

docs/src/API.md

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -156,76 +156,3 @@ TemperatureProfiles.DryAdiabaticProfile
156156
Thermodynamics.DataCollection
157157
```
158158

159-
## Deprecated Functions
160-
161-
These functions are deprecated and will be removed in a future release.
162-
163-
### Backward Compatibility Wrappers
164-
165-
These wrappers exist for backward compatibility with older versions of the package.
166-
167-
```@docs
168-
specific_enthalpy
169-
specific_enthalpy_dry
170-
specific_enthalpy_vapor
171-
specific_enthalpy_liquid
172-
specific_enthalpy_ice
173-
dry_pottemp
174-
total_specific_enthalpy
175-
q_vap_saturation_generic
176-
latent_heat_liq_ice
177-
```
178-
179-
### Other Deprecated Functions
180-
181-
```@docs
182-
air_temperature_given_hq
183-
air_temperature_given_pρq
184-
air_temperature_given_pθq
185-
air_temperature_given_ρθq
186-
air_temperature_given_ρθq_nonlinear
187-
saturated
188-
total_specific_humidity
189-
liquid_specific_humidity
190-
ice_specific_humidity
191-
mixing_ratios
192-
specific_volume
193-
q_vap_from_RH_liquid
194-
temperature_and_humidity_given_TᵥρRH
195-
liquid_ice_pottemp_sat
196-
PhasePartition_equil
197-
PhasePartition_equil_given_p
198-
```
199-
200-
## Thermodynamic State Constructors (Deprecated)
201-
202-
```@docs
203-
ThermodynamicState
204-
PhasePartition
205-
PhaseDry
206-
PhaseDry_ρe
207-
PhaseDry_pT
208-
PhaseDry_pθ
209-
PhaseDry_pe
210-
PhaseDry_ph
211-
PhaseDry_ρθ
212-
PhaseDry_ρT
213-
PhaseDry_ρp
214-
PhaseEquil
215-
PhaseEquil_ρeq
216-
PhaseEquil_ρTq
217-
PhaseEquil_pTq
218-
PhaseEquil_pθq
219-
PhaseEquil_peq
220-
PhaseEquil_phq
221-
PhaseEquil_ρθq
222-
PhaseEquil_ρpq
223-
PhaseNonEquil
224-
PhaseNonEquil_ρTq
225-
PhaseNonEquil_pTq
226-
PhaseNonEquil_ρθq
227-
PhaseNonEquil_pθq
228-
PhaseNonEquil_peq
229-
PhaseNonEquil_phq
230-
PhaseNonEquil_ρpq
231-
```

perf/common.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ using .TestedProfiles
1717
functional_inputs(param_set, ::Type{FT}; n=256)
1818
1919
Construct equilibrium-consistent scalar inputs for functional benchmarks, derived from
20-
`test/TestedProfiles.jl` (no deprecated PhasePartition/state types).
20+
`test/TestedProfiles.jl`.
2121
"""
2222
function functional_inputs(param_set, ::Type{FT}; n = 256) where {FT}
2323
ps = TestedProfiles.PhaseEquilProfiles(param_set, Array{FT})

perf/microbenchmarks.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include("common_micro_bm.jl")
22

3-
function benchmark_thermo_states(::Type{FT}) where {FT}
3+
function benchmark_functional_api(::Type{FT}) where {FT}
44
summary = OrderedCollections.OrderedDict()
55
ArrayType = Array{FT}
66
param_set = TP.ThermodynamicsParameters(FT)
@@ -25,5 +25,5 @@ function benchmark_thermo_states(::Type{FT}) where {FT}
2525
tabulate_summary(summary)
2626
end
2727

28-
benchmark_thermo_states(Float64)
29-
benchmark_thermo_states(Float32)
28+
benchmark_functional_api(Float64)
29+
benchmark_functional_api(Float32)

src/Thermodynamics.jl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ const APS = TP.AbstractThermodynamicsParameters
6060

6161
include("ThermoTypes.jl")
6262

63-
include("depr_PhasePartitionTypes.jl")
64-
6563
@inline solution_type() = RS.CompactSolution()
6664
include("DataCollection.jl")
6765
import .DataCollection
@@ -80,13 +78,6 @@ include("air_entropies.jl")
8078
include("air_dry_adiabatic.jl")
8179
include("TemperatureProfiles.jl")
8280

83-
# Soon to be removed
84-
include("depr_air_temperatures.jl")
85-
include("depr_saturation_adjustment.jl")
86-
include("depr_air_states.jl")
87-
include("depr_state_methods.jl")
88-
include("depr_phase_partition_methods.jl")
89-
9081
Base.broadcastable(dap::DryAdiabaticProcess) = tuple(dap)
9182
Base.broadcastable(phase::Phase) = tuple(phase)
9283

src/air_humidities.jl

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export partial_pressure_vapor
66
export specific_humidity_to_mixing_ratio
77
export q_vap_from_p_vap
88
export q_vap_from_RH
9-
export q_vap_from_RH_liquid
109
export relative_humidity
1110

1211
"""
@@ -193,26 +192,6 @@ Compute the vapor specific humidity from the relative humidity.
193192
return p_vap / Rv_over_Rd / (p - (1 - 1 / Rv_over_Rd) * p_vap)
194193
end
195194

196-
"""
197-
q_vap_from_RH_liquid(param_set, p, T, RH)
198-
199-
Compute the vapor specific humidity from the relative humidity over liquid.
200-
201-
# Arguments
202-
- `param_set`: thermodynamics parameter set, see [`Thermodynamics`](@ref)
203-
- `p`: pressure [Pa]
204-
- `T`: temperature [K]
205-
- `RH`: relative humidity [dimensionless], 0 ≤ RH ≤ 1
206-
207-
# Returns
208-
- `q_vap`: vapor specific humidity [kg/kg]
209-
210-
This function is deprecated. Use `q_vap_from_RH` with `Liquid()` instead.
211-
"""
212-
@inline function q_vap_from_RH_liquid(param_set::APS, p, T, RH)
213-
return q_vap_from_RH(param_set, p, T, RH, Liquid())
214-
end
215-
216195
"""
217196
relative_humidity(param_set, T, p, q_tot=0, q_liq=0, q_ice=0)
218197

src/air_temperatures.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ This method inverts [`internal_energy`](@ref) by solving for `T` given `e_int`.
2626
"""
2727
@inline function air_temperature(
2828
param_set::APS,
29-
e_int::Real, # Number type needed to disambiguate from deprecated methods that are still there
30-
q_tot::Real = 0,
31-
q_liq::Real = 0,
32-
q_ice::Real = 0,
29+
e_int,
30+
q_tot = 0,
31+
q_liq = 0,
32+
q_ice = 0,
3333
)
3434
return air_temperature(param_set, ρe(), e_int, q_tot, q_liq, q_ice)
3535
end

src/depr_PhasePartitionTypes.jl

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)