radarx.retrieve.qpe_ensemble.qpe_error_model#
- radarx.retrieve.qpe_ensemble.qpe_error_model(estimate, gauge, *, x, y, min_value=1.0)[source]#
Parameters of the lognormal error model from radar-gauge pairs.
With
e = ln(gauge / radar)over the pairs where both are at leastmin_value, the error standard deviation is the root mean square ofe(so a bias between gauges and radar is part of the error), the share of the variance that is common to the whole field is the squared mean over that (the bias), and the rest is split between a spatially correlated part and noise from cell to cell by an exponential variogram of the deviations (nugget + sill (1 - exp(-h / L)), fitted by a grid search overL).- Parameters:
estimate, gauge (
array_likeorxarray.DataArray) – Accumulations in mm at the gauges: the radar estimate at each gauge and the gauge value, 1-D with the same length.x, y (
array_like) – Gauge positions in metres (any common projected coordinates).min_value (
float, optional) – Pairs with either value below this are not used (mm). Default 1.
- Returns:
xarray.Dataset– Scalars:sigma_ln,mean_ln_ratio,std_ln_ratio,share_common,share_spatial,share_nugget,correlation_length(m) andn_pairs.sigma_lnis NaN with fewer than 5 usable pairs, the shares and the length are NaN with fewer than 8 (too few for a variogram): the caller then has to say which numbers are assumed.
Notes
Dask. This function computes the dask array: it fits one model to all the gauge pairs. The input is loaded into memory and the result is held in memory.
See also
References
Examples
>>> m = radarx.retrieve.qpe_error_model(r, g, x=xg, y=yg)