wradlib Documentation - Bitbucket
wradlib Documentation - Bitbucket
wradlib Documentation - Bitbucket
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 />
3.13 Gage adjustment<br />
3.13.1 Concept<br />
The objective of this module is the adjustment of radar-based rainfall estimates by rain gage observations. However,<br />
this module could also be applied to adjust satellite rainfall by rain gage observations, remotely sensed soil moisture<br />
patterns by ground truthing moisture sensors, or any dense spatial point pattern which could be adjusted by sparse<br />
point measurements (ground truth).<br />
Basically, we only need two data sources:<br />
• point observations (e.g. rain gage observations)<br />
• set of (potentially irregular) unadjusted point values (e.g. remotely sensed rainfall)<br />
[GoudenhooftdandDelobbe2009] provide an excellent overview of adjustment procedures. The general idea is that<br />
we quantify the error of the remotely sensed rainfall at the rain gage locations, assuming the rain gage observation<br />
to be accurate. The error can be assumed to be purely additive (AdjustAdd), purely multiplicative (AdjustMultiply,<br />
AdjustMFB) or a mixture of both (AdjustMixed). If the error is assumed to heterogeneous in space (AdjustAdd,<br />
AdjustMultiply, AdjustMixed), the error at the rain gage locations is interpolated to the radar bin locations and then<br />
used to adjust (correct) the raw radar rainfall estimates. In case of the AdjustMFB approach, though, the multiplicative<br />
error is assumed to be homogenoues in space.<br />
3.13.2 Quick start<br />
The basic procedure consists of creating an adjustment object from the class you want to use for adjustment. After<br />
that, you can call the object with the actual data that is to be adjusted. The following example is using the additive<br />
error model with default settings. obs_coords and raw_coords represent arrays with coordinate pairs for the<br />
gage observations and the radar bins, respectively. obs and raw are arrays containing the actual data.<br />
>>> adjuster = AdjustAdd(obs_coords, raw_coords)<br />
>>> adjusted = adjuster(obs, raw)<br />
The user can specify the approach that should be used to interpolate the error in space, as well as the keyword arguments<br />
which control the behaviour of the interpolation approach. For this purpose, all interpolation classes from the<br />
<strong>wradlib</strong>.ipol module are available and can be passed by using the Ipclass argument. The default interpolation class<br />
is Inverse Distance Weighting (<strong>wradlib</strong>.ipol.Idw). If you want to use e.g. linear barycentric interpolation:<br />
>>> import <strong>wradlib</strong>.ipol as ipol<br />
>>> adjuster = AdjustAdd(obs_coords, raw_coords, Ipclass=ipol.Linear)<br />
>>> adjusted = adjuster(obs, raw)<br />
3.13.3 Cross validation<br />
Another helpful feature is an easy-to-use method for leave-one-out cross-validation. Cross validation is a standard<br />
procedure for verifying rain gage adjustment or interpolation procedures. You can start the cross validation in the<br />
same way as you start the actual adjustment, however, you call the xvalidate method instead. The result of the<br />
cross validation are pairs of observation and the corresponding adjustment result at the observation location. Using<br />
the <strong>wradlib</strong>.verify module, you can compute error metrics for the cross validation results.<br />
>>> adjuster = AdjustAdd(obs_coords, raw_coords)<br />
>>> observed, estimated = adjuster.xvalidate(obs, raw)<br />
>>> from <strong>wradlib</strong>.verify import ErrorMetrics<br />
>>> metrics = ErrorMetrics(observed, estimated)<br />
>>> metrics.report()<br />
64 Chapter 3. Library Reference