earthkit.climate.atmos.daily_freezethaw_cycles¶
- earthkit.climate.atmos.daily_freezethaw_cycles(tasmin: xarray.DataArray | str = 'tasmin', tasmax: xarray.DataArray | str = 'tasmax', ds: xarray.Dataset | Any = None, *, thresh_tasmin: Any = '0 degC', thresh_tasmax: Any = '0 degC', op_tasmin: Literal['<', '<=', 'lt', 'le'] = '<=', op_tasmax: Literal['>', '>=', 'gt', 'ge'] = '>', freq: str = 'YS', resample_before_rl: bool = True, **kwargs: Any) Any¶
Daily freeze-thaw cycles.
The number of days with a freeze-thaw cycle. A freeze-thaw cycle is defined as a day where maximum daily temperature is above a given threshold and minimum daily temperature is at or below a given threshold, usually 0°C for both.
Units:
dlyfrzthw: days
This function wraps xclim.indicators.atmos.daily_freezethaw_cycles.
- Parameters:
tasmin (
xarray.DataArray | str) – Minimum daily temperature.tasmax (
xarray.DataArray | str) – Maximum daily temperature.thresh_tasmin (
Any) – The temperature threshold needed to trigger a freeze event.thresh_tasmax (
Any) – The temperature threshold needed to trigger a thaw event.op_tasmin (
Literal[``’<’, ``'<=','lt','le']) – Comparison operation for tasmin. Default: “<=”.op_tasmax (
Literal[``’>’, ``'>=','gt','ge']) – Comparison operation for tasmax. Default: “>”.freq (
str) – Resampling frequency.resample_before_rl (
bool) – Determines if the resampling should take place before or after the run length encoding (or a similar algorithm) is applied to runs.ds (
xarray.Dataset | Any) – Input dataset.**kwargs (
Any) – Additional keyword arguments.
- Returns:
The computed index.
- Return type:
Any