radarx.retrieve.precip_frequency.climatological_reference#
- radarx.retrieve.precip_frequency.climatological_reference(record, *, quantile=0.995, dim='time', min_count=30)[source]#
Quantile of a record of rainfall depths at each place.
The reference for
depth / reference: with the 99.5th percentile of the one-hour totals of a record, a ratio of 1 means the hour was as wet as the wettest half percent of the hours at that place. Places with fewer thanmin_countvalid values get NaN: the quantile of a handful of hours says nothing about a rare quantile.- Parameters:
record (
xarray.DataArray) – Depths (mm) with the dimensiondim.quantile (
float, optional) – Quantile, 0.5 to below 1. Default 0.995.dim (
str, optional) – Dimension of the record. Default"time".min_count (
int, optional) – Fewest valid values for a result. Default 30.
- Returns:
xarray.DataArray– The quantile on the other dimensions,float32, in the units ofrecord.- Raises:
ValueError – If
quantileis outside 0.5 to 1 ordimis not a dimension.
Notes
Dask. This function computes the dask array: it takes a quantile over the whole record. The input is loaded into memory and the result is held in memory.
See also
Examples
>>> ref = radarx.retrieve.climatological_reference(hourly, dim="time") >>> relative = rain / ref