@@ -218,7 +218,8 @@ All fields should be on the exchange grid.
218218- `thermo_params`: [TD.Parameters.ThermodynamicsParameters] the thermodynamic parameters.
219219"""
220220function compute_surface_humidity! (q_sfc, T_atmos, q_atmos, ρ_atmos, T_sfc, thermo_params)
221- thermo_state_atmos = TD. PhaseEquil_ρTq .(thermo_params, ρ_atmos, T_atmos, q_atmos)
221+ thermo_state_atmos =
222+ TD. PhaseNonEquil_ρTq .(thermo_params, ρ_atmos, T_atmos, TD. PhasePartition .(q_atmos))
222223 ρ_sfc = FluxCalculator. extrapolate_ρ_to_sfc .(thermo_params, thermo_state_atmos, T_sfc)
223224
224225 T_freeze = TDP. T_freeze (thermo_params)
@@ -279,7 +280,12 @@ function compute_surface_fluxes!(
279280
280281 # construct the atmospheric thermo state
281282 thermo_state_atmos =
282- TD. PhaseEquil_ρTq .(thermo_params, csf. ρ_atmos, csf. T_atmos, csf. q_atmos)
283+ TD. PhaseNonEquil_ρTq .(
284+ thermo_params,
285+ csf. ρ_atmos,
286+ csf. T_atmos,
287+ TD. PhasePartition .(csf. q_atmos),
288+ )
283289
284290 # compute surface humidity from the surface temperature, surface density, and phase
285291 Interfacer. get_field! (csf. scalar_temp1, sim, Val (:surface_temperature ))
@@ -299,7 +305,8 @@ function compute_surface_fluxes!(
299305
300306 # construct the surface thermo state
301307 # after this we can reuse `scalar_temp1` and `scalar_temp2` again
302- thermo_state_sfc = TD. PhaseEquil_ρTq .(thermo_params, ρ_sfc, T_sfc, q_sfc)
308+ thermo_state_sfc =
309+ TD. PhaseNonEquil_ρTq .(thermo_params, ρ_sfc, T_sfc, TD. PhasePartition .(q_sfc))
303310
304311 # get area fraction (min = 0, max = 1)
305312 Interfacer. get_field! (csf. scalar_temp1, sim, Val (:area_fraction ))
0 commit comments