wradlib.georef.GeorefMethods.xyz_to_spherical#
- GeorefMethods.xyz_to_spherical(**kwargs)#
Returns spherical representation (r, theta, phi) of given cartesian coordinates (x, y, z) with respect to the reference altitude (asl) considering earth’s geometry (crs).
- Parameters:
obj (
xarray.DataArray|xarray.Dataset)- Keyword Arguments:
crs –
Coordinate Reference System (CRS) of the source coordinates. Can be one of:
A
pyproj.crs.CoordinateSysteminstanceA
cartopy.crs.CRSinstanceA
osgeo.osr.SpatialReferenceinstanceA type accepted by
pyproj.crs.CRS.from_user_input(e.g., EPSG code, PROJ string, dictionary, WKT, or any object with a to_wkt() method)
Defaults to None.
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:
obj (
xarray.Dataset) – obj with added spherical coordinates.