wradlib.georef.GeorefMethods.spherical_to_centroids#
- GeorefMethods.spherical_to_centroids(**kwargs)#
Generate 3-D centroids of the radar bins from the sperical coordinates (r, phi, theta).
Both azimuth and range arrays are assumed to be equidistant and to contain only unique values. The ranges are assumed to define the exterior boundaries of the range bins (thus they must be positive). The angles are assumed to describe the pointing direction fo the main beam lobe.
For further information refer to the documentation of
spherical_to_xyz
.- Parameters
obj (
xarray.DataArray
|xarray.Dataset
)- Keyword Arguments
crs (
osgeo.osr.SpatialReference
) – Destination Spatial Reference System (Projection). Defaults to wgs84 (epsg 4326).ke (
float
) – adjustment factor to account for the refractivity gradient that affects radar beam propagation. In principle this is wavelength- dependend. The default of 4/3 is a good approximation for most weather radar wavelengths.PPI. (Currently only works for) –
- Returns
xyz (
xarray.DataArray
) – Array of shape (…, 3). Contains cartesian coordinates.crs (
osgeo.osr.SpatialReference
) – Destination Spatial Reference System (Projection). Defaults to wgs84 (epsg 4326).
Note
Azimuth angles of 360 deg are internally converted to 0 deg.