wradlib.georef.polar.GeorefPolarMethods.spherical_to_xyz#
- GeorefPolarMethods.spherical_to_xyz(**kwargs)[source]#
Transforms spherical coordinates (r, phi, theta) to cartesian coordinates (x, y, z) centered at site (aeqd).
It takes the shortening of the great circle distance with increasing elevation angle as well as the resulting increase in height into account.
- Parameters:
obj (
xarray.DataArray
|xarray.Dataset
)- Keyword Arguments:
re (
float
) – earth’s radius [m], defaults to None (calculating from given latitude)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.
- Returns:
xyz (
xarray.DataArray
) – Array of shape (…, 3). Contains cartesian coordinates.aeqd (
osgeo.osr.SpatialReference
) – Destination Spatial Reference System (AEQD-Projection).