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.
Projections are immutable, hashable value objects; use
dataclasses.replace()to derive a modified copy.- 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. It may differ fromcone_angle(WRF grids converted byarw2arl). 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) – Angle, in degrees clockwise from north, of the grid’s y-axis at the reference longitude (tangent_lon); a nonzero value rotates a Lambert conformal or polar stereographic grid, as HYSPLIT’sstcm1pdoes. A rotated Mercator grid raisesNotImplementedError. For lat-lon grids: ignored, as HYSPLIT ignores it (normally 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. As in HYSPLIT, this value alone picks the projection, so ±90 is always polar stereographic. 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). One-based; it may lie outside the grid, as in a subset of a projected grid (Grid.subset()).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). One-based; it may lie outside the grid.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.
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
Attributes