wradlib.adjust.AdjustBase

class wradlib.adjust.AdjustBase(obs_coords, raw_coords, nnear_raws=9, stat='median', mingages=5, minval=0.0, mfb_args=None, ipclass=<class 'wradlib.ipol.Idw'>, **ipargs)

The basic adjustment class that inherits to all other classes.

All methods except the __call__ method are inherited to the following adjustment classes.

Parameters
  • obs_coords (array of floats of shape (number of points, 2)) – x and y coordinate pairs of observation locations (e.g. rain gauges).

  • raw_coords (array of floats of shape (number of points, 2)) – x and y coordinate pairs of raw (unadjusted) radar field

  • nnear_raws (integer) – Defaults to 9. This parameter controls the number of radar bins or grid cells (in the neighbourhood of a rain gauge) which is used to compute the value of the radar observation AT a rain gauge.

  • stat (string) – Defaults to ‘median’. Must be either ‘mean’, ‘median’, or ‘best’. This parameter controls the statistic that is used to compute the value of the radar observation AT a rain gauge based on the neighbourhood specified by parameter nnear_raws.

  • mingages (integer) – Defaults to 5. Minimum number of valid gages required for an adjustment. If less valid gauges are available, the adjustment procedure will return unadjusted raw values. If you do not want to use this feature, you need to set mingages=0.

  • minval (float) – If the gage or radar observation is below this threshold, the location will not be used for adjustment. For additive adjustment, this value should be set to zero (default value). For multiplicative adjustment, values larger than zero might be chosen in order to minimize artifacts.

  • mfb_args (dictionary) –

    Only used for AdjustMFB - This set of parameters controls how the mean field bias is computed. Items of the dictionary are:

    • method: string defaults to ‘linregr’ which fits a regression line through observed and estimated values and than gets the bias from the inverse of the slope. Other values: ‘mean’ or ‘median’ compute the mean or the median of the ratios between gauge and radar observations.

    • minslope, minr, maxp: When using method=’linregr’, these parameters control whether a linear regression turned out to be robust (minimum allowable slope, minimum allowable correlation, maximim allowable p-value). If the regression result is not considered robust, no adjustment will take place.

  • Ipclass (an interpolation class from wradlib.ipol) – Not used for AdjustMFB - default value is Idw (Inverse Distance Weighting).

  • ipargs (keyword arguments to create an instance of ipclass) – Not used for AdjustMFB - for Idw, these keyword arguments would e.g. be nnear or p.

Examples

See Adjusting radar-base rainfall estimates by rain gauge observations.

__call__(obs, raw[, targets, rawatobs, ix])

Returns an array of raw values that are adjusted by obs.

xvalidate(obs, raw)

Leave-One-Out Cross Validation, applicable to all gage adjustment classes.