Skip to content

Commit

Permalink
Control zero humidity in thermo computations
Browse files Browse the repository at this point in the history
  • Loading branch information
sandorkertesz committed Oct 31, 2024
1 parent a69ff0a commit c96026e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/earthkit/meteo/thermo/array/thermo.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ def dewpoint_from_relative_humidity(t, r, eps=1e-8, out=None):
Relative humidity (%)
eps: number
If ``out`` is not None, return ``out`` when ``r`` < ``eps``.
If out is None, ``eps`` is ignored and return np.nan for ``q``
If out is None, ``eps`` is ignored and return np.nan for ``r``
values very close to zero.
out: number or None
If not None, return ``out`` when ``r`` < ``eps``. If None, ``eps`` is
Expand Down Expand Up @@ -839,14 +839,12 @@ def dewpoint_from_specific_humidity(q, p, eps=1e-8, out=None):
p: ndarray
Pressure (Pa)
eps: number
As an intermediate result the saturation vapour pressure
(``es``) is computed (see details below). If ``out`` is not
None, return ``out`` when ``es`` < ``eps``. If out is None,
``eps`` is ignored and return np.nan for ``es`` values very
close to zero.
If ``out`` is not None, return ``out`` when ``q`` < ``eps``.
If out is None, ``eps`` is ignored and return np.nan for ``q``
values very close to zero.
out: number or None
If not None, return ``out`` when ``es`` < ``eps``. If None, ``eps`` is
ignored and return np.nan for ``es`` values very close to zero.
If not None, return ``out`` when ``q`` < ``eps``. If None, ``eps`` is
ignored and return np.nan for ``q`` values very close to zero.
Returns
-------
Expand Down

0 comments on commit c96026e

Please sign in to comment.