huracanpy.calc.azimuth#
- huracanpy.calc.azimuth(lon, lat, track_id=None, ellps='WGS84', centering='forward')[source]#
Compute azimuth between points using geodesic calculation.
- Parameters:
lon (xarray.DataArray) – Longitude and latitude points
lat (xarray.DataArray) – Longitude and latitude points
track_id (array_like, optional) – Track ID at each point
ellps (str, optional) – The definition of the globe to use for the geodesic calculation (see pyproj.Geod). Default is “WGS84”.
centering (str, optional) –
“forward” gives the angle based on the track point and the following track point. The last point of each track will be NaN
”backward” gives the angle based on the track point and the previous track point. The first point of each track will be NaN
”centre” gives the angle based on the centred difference of track points. The first and last points of each track will be NaN
”adaptive” gives the same as centred, but fills in the first point of each track with the forward difference, and the last point of each track with the backward difference
- Returns:
- Azimuth in degrees.
0° corresponds to northward (or stagnating); 90° corresponds to eastward; 180° corresponds to southward; -90° corresponds to westwards.
- Return type: