pyart.core.cartesian_to_geographic#

pyart.core.cartesian_to_geographic(x, y, projparams)[source]#

Cartesian to Geographic coordinate transform.

Transform a set of Cartesian/Cartographic coordinates (x, y) to a geographic coordinate system (lat, lon) using pyproj or a build in Azimuthal equidistant projection.

Parameters:
  • x, y (array-like) – Cartesian coordinates in meters unless R is defined in different units in the projparams parameter.

  • projparams (dict or str) – Projection parameters passed to pyproj.Proj. If this parameter is a dictionary with a ‘proj’ key equal to ‘pyart_aeqd’ then a azimuthal equidistant projection will be used that is native to Py-ART and does not require pyproj to be installed. In this case a non-default value of R can be specified by setting the ‘R’ key to the desired value.

Returns:

lon, lat (array) – Longitude and latitude of the Cartesian coordinates in degrees.

Notes

The default pyart_aeqd projection assumes a spherical Earth (no pyproj required) and can differ from an ellipsoidal (WGS84) result by a few hundred meters far from the origin. If pyproj is installed, pass an ellipsoidal projection instead:

cartesian_to_geographic(x, y, {"proj": "aeqd", "ellps": "WGS84", "lon_0": lon_0, "lat_0": lat_0})