arlmet.Projection#

class arlmet.Projection(pole_lat, pole_lon, tangent_lat, tangent_lon, grid_size, orientation, cone_angle, sync_x, sync_y, sync_lat, sync_lon)[source]#

Horizontal projection metadata from an ARL index record.

Parameters:
  • pole_lat (float) – Pole latitude position of the grid projection. Most projections will be defined at +90 or -90 depending upon the hemisphere. For lat-lon grids: latitude of the grid point with the maximum grid point value.

  • pole_lon (float) – Pole longitude position of the grid projection. The longitude 180 degrees from which the projection is cut. For lat-lon grids: longitude of the grid point with the maximum grid point value.

  • tangent_lat (float) – Reference latitude at which the grid spacing is defined. For lat-lon grids: grid spacing in degrees latitude.

  • tangent_lon (float) – Reference longitude at which the grid spacing is defined. For lat-lon grids: grid spacing in degrees longitude.

  • grid_size (float) – Grid spacing in km at the reference position. For lat-lon grids: value of zero signals that the grid is a lat-lon grid.

  • orientation (float) – Grid orientation or the angle at the reference point made by the y-axis and the local direction of north. For lat-lon grids: value always = 0.

  • cone_angle (float) – Angle between the axis and the surface of the cone. For regular projections it equals the latitude at which the grid is tangent to the earth’s surface. Polar stereographic: ±90, Mercator: 0, Lambert Conformal: between limits, Oblique stereographic: 90. For lat-lon grids: value always = 0.

  • sync_x (float) – Grid x-coordinate used to equate a position on the grid with a position on earth (paired with sync_y, sync_lat, sync_lon).

  • sync_y (float) – Grid y-coordinate used to equate a position on the grid with a position on earth (paired with sync_x, sync_lat, sync_lon).

  • sync_lat (float) – Earth latitude corresponding to the grid position (sync_x, sync_y). For lat-lon grids: latitude of the (0,0) grid point position.

  • sync_lon (float) – Earth longitude corresponding to the grid position (sync_x, sync_y). For lat-lon grids: longitude of the (0,0) grid point position.

params#

pyproj parameter dictionary derived from the ARL metadata.

Type:

dict[str, Any]

crs#

pyproj coordinate reference system representing the base projection. False easting and northing offsets are applied at the Grid level.

Type:

pyproj.CRS

is_latlon#

True if the grid is a lat-lon grid (grid_size == 0).

Type:

bool

_get_params()[source]#

Translate ARL projection metadata into pyproj parameters.

Examples

>>> from arlmet.grid import Projection
>>> proj = Projection(
...     pole_lat=90.0,
...     pole_lon=180.0,
...     tangent_lat=1.0,
...     tangent_lon=1.0,
...     grid_size=0.0,
...     orientation=0.0,
...     cone_angle=0.0,
...     sync_x=1.0,
...     sync_y=1.0,
...     sync_lat=-90.0,
...     sync_lon=-180.0,
... )
>>> proj.is_latlon
True

Methods

Projection.__init__(pole_lat, pole_lon, ...)

Attributes

Projection.PARAMS

Projection.is_latlon

Check if this is a lat-lon grid.

Projection.pole_lat

Projection.pole_lon

Projection.tangent_lat

Projection.tangent_lon

Projection.grid_size

Projection.orientation

Projection.cone_angle

Projection.sync_x

Projection.sync_y

Projection.sync_lat

Projection.sync_lon

Projection.params