wradlib Documentation - Bitbucket
wradlib Documentation - Bitbucket
wradlib Documentation - Bitbucket
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>wradlib</strong> <strong>Documentation</strong>, Release 0.1.1<br />
defaults to ‘median’<br />
mingages : integer<br />
minimum number of gages which are required for an adjustment<br />
minval : float<br />
If the gage or radar observation is below this threshold, the location will not be used for<br />
adjustment. For additive adjustment, this value should be set to zero (default value).<br />
Ipclass : an interpolation class from wradib.ipol<br />
Default value is <strong>wradlib</strong>.ipol.Idw (Inverse Distance Weighting)<br />
ipargs : keyword arguments to create an instance of Ipclass<br />
For <strong>wradlib</strong>.ipol.Idw, these keywird arguments woudl e.g. be nnear or p<br />
Returns output : array of adjusted radar values<br />
Notes<br />
Inherits from AdjustBase<br />
Examples<br />
>>> import <strong>wradlib</strong>.adjust as adjust<br />
>>> import numpy as np<br />
>>> import pylab as pl<br />
>>> # 1-d example including all available adjustment methods<br />
>>> # --------------------------------------------------------------------------<br />
>>> # gage and radar coordinates<br />
>>> obs_coords = np.array([5,10,15,20,30,45,65,70,77,90])<br />
>>> radar_coords = np.arange(0,101)<br />
>>> # true rainfall<br />
>>> truth = np.abs(np.sin(0.1*radar_coords))<br />
>>> # radar error<br />
>>> erroradd = np.random.uniform(0,0.5,len(radar_coords))<br />
>>> errormult= 1.1<br />
>>> # radar observation<br />
>>> radar = errormult*truth + erroradd<br />
>>> # gage observations are assumed to be perfect<br />
>>> obs = truth[obs_coords]<br />
>>> # add a missing value to observations (just for testing)<br />
>>> obs[1] = np.nan<br />
>>> # adjust the radar observation by additive model<br />
>>> add_adjuster = adjust.AdjustAdd(obs_coords, radar_coords, nnear_raws=1)<br />
>>> add_adjusted = add_adjuster(obs, radar)<br />
>>> # adjust the radar observation by multiplicative model<br />
>>> mult_adjuster = adjust.AdjustMultiply(obs_coords, radar_coords, nnear_raws=1)<br />
>>> mult_adjusted = mult_adjuster(obs, radar,0.)<br />
>>> # adjust the radar observation by MFB<br />
>>> mfb_adjuster = adjust.AdjustMFB(obs_coords, radar_coords, nnear_raws=1)<br />
>>> mfb_adjusted = mfb_adjuster(obs, radar,0.)<br />
>>> # adjust the radar observation by AdjustMixed<br />
>>> mixed_adjuster = adjust.AdjustMixed(obs_coords, radar_coords, nnear_raws=1)<br />
>>> mixed_adjusted = mixed_adjuster(obs, radar)<br />
>>> line1 = pl.plot(radar_coords, radar, ’k-’, label="raw radar")<br />
3.13. Gage adjustment 73