24.12.2013 Views

wradlib Documentation - Bitbucket

wradlib Documentation - Bitbucket

wradlib Documentation - Bitbucket

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>wradlib</strong> <strong>Documentation</strong>, Release 0.1.1<br />

raw_coords : array of float<br />

coordinate pairs of raw (unadjusted) field<br />

nnear_raws : integer<br />

defaults to 9<br />

stat : string<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 />

3.13. Gage adjustment 67

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!