Composition#
Combine data from different radar locations on one common set of locations
Extract the indices of |
|
Interpolate data from a radar location to the composite grid or set of locations |
|
Composes grids according to quality information using quality information as a knockout criterion. |
|
Composes grids according to quality information using a weighted averaging approach. |
|
wradlib xarray SubAccessor methods for Ipol Methods. |
- wradlib.comp.extract_circle(center, radius, coords)[source]#
Extract the indices of
coords
which fall within a circle defined bycenter
andradius
.- Parameters
center (
float
)radius (
float
)coords (
numpy.ndarray
) – array of float with shape (numpoints, 2)
- Returns
output (
numpy.ndarray
) – 1-darray of integers, index array referring to thecoords
array
- wradlib.comp.togrid(src, trg, radius, center, data, interpol, *args, **kwargs)[source]#
- wradlib.comp.togrid(obj: DataArray, trg, *args, **kwargs)
Interpolate data from a radar location to the composite grid or set of locations
- Parameters
src (
numpy.ndarray
) – array of float of shape (numpoints, ndim), cartesian x / y coordinates of the radar binstrg (
numpy.ndarray
) – array of float of shape (numpoints, ndim), cartesian x / y coordinates of the compositeradius (
float
) – the radius of the radar circle (same units as src and trg)center (
numpy.ndarray
) – array of float, the location coordinates of the radardata (
numpy.ndarray
) – array of float, the data that should be transferred to compositeinterpol (
IpolBase
) – an interpolation class name fromwradlib.ipol
e.g.Nearest
orIdw
- Other Parameters
*args (
dict
) – arguments of Interpolator (see class documentation)- Keyword Arguments
**kwargs (
dict
) – keyword arguments of Interpolator (see class documentation)- Returns
output (
numpy.ndarray
) – array of float, data of the radar circle which is interpolated on the composite grid
Note
Keyword arguments to be used while calling the interpolator can be issued as call_kwargs, e.g. togrid(…, call_kwargs=dict(maxdist=10))
Examples
See Gridding.
- wradlib.comp.compose_ko(radargrids, qualitygrids)[source]#
Composes grids according to quality information using quality information as a knockout criterion.
The value of the composed pixel is taken from the radargrid whose quality grid has the highest value.
- Parameters
radargrids (
list
) – radar data to be composited. Each item in the list corresponds to the data of one radar location. All items must have the same shape.qualitygrids (
list
) – quality data to decide upon which radar site will contribute its pixel to the composite. Then length of this list must be the same as that of radargrids. All items must have the same shape and be aligned with the items in radargrids.
- Returns
composite (
numpy.ndarray
)
- wradlib.comp.compose_weighted(radargrids, qualitygrids)[source]#
- wradlib.comp.compose_weighted(radargrids: DataArray, qualitygrids)
Composes grids according to quality information using a weighted averaging approach.
The value of the composed pixel is the weighted average of all radar pixels with the quality values being the weights.
- Parameters
- Returns
composite (
numpy.ndarray
)
Examples
See Recipe #1: Clutter and attenuation correction plus composition for two DWD radars.
See also
- class wradlib.comp.CompMethods(obj)[source]#
Bases:
XarrayMethods
wradlib xarray SubAccessor methods for Ipol Methods.
- togrid(trg, radius, center, data, interpol, *args, **kwargs)[source]#
Interpolate data from a radar location to the composite grid or set of locations
- Parameters
src (
numpy.ndarray
) – array of float of shape (numpoints, ndim), cartesian x / y coordinates of the radar binstrg (
numpy.ndarray
) – array of float of shape (numpoints, ndim), cartesian x / y coordinates of the compositeradius (
float
) – the radius of the radar circle (same units as src and trg)center (
numpy.ndarray
) – array of float, the location coordinates of the radardata (
numpy.ndarray
) – array of float, the data that should be transferred to compositeinterpol (
IpolBase
) – an interpolation class name fromwradlib.ipol
e.g.Nearest
orIdw
- Other Parameters
*args (
dict
) – arguments of Interpolator (see class documentation)- Keyword Arguments
**kwargs (
dict
) – keyword arguments of Interpolator (see class documentation)- Returns
output (
numpy.ndarray
) – array of float, data of the radar circle which is interpolated on the composite grid
Note
Keyword arguments to be used while calling the interpolator can be issued as call_kwargs, e.g. togrid(…, call_kwargs=dict(maxdist=10))
Examples
See Gridding.
- compose_weighted(qualitygrids)[source]#
Composes grids according to quality information using a weighted averaging approach.
The value of the composed pixel is the weighted average of all radar pixels with the quality values being the weights.
- Parameters
- Returns
composite (
numpy.ndarray
)
Examples
See Recipe #1: Clutter and attenuation correction plus composition for two DWD radars.
See also