Skip to content

Commit

Permalink
Protect against zero dovosions in RH for cold T
Browse files Browse the repository at this point in the history
  • Loading branch information
trontrytel committed Oct 14, 2024
1 parent f6fc4c8 commit fe92309
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/relations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2796,7 +2796,7 @@ and, optionally,
q_vap = vapor_specific_humidity(q)
p_vap = q_vap * air_density(param_set, T, p, q) * R_v * T
p_vap_sat = saturation_vapor_pressure(param_set, phase_type, T)
return p_vap / p_vap_sat
return p_vap / (p_vap_sat + eps(FT(0)))
end

"""
Expand Down

0 comments on commit fe92309

Please sign in to comment.