crs

  • Coordinates Reference System (CRS) routines

  • Gravitational and ellipsoidal parameters 1 2

Source code

General Attributes and Methods

class pyTMD.crs[source]

Coordinate Reference System transformations for tide models

Attributes
name: str

Projection name

transformer: obj

pyproj transformer for changing coordinate reference system

convert(i1: ndarray, i2: ndarray, PROJ: str, BF: str, EPSG: int | str = 4326)[source]

Converts points to and from Coordinates Reference Systems (CRS)

Parameters
i1: np.ndarray

Input x-coordinates

i2: np.ndarray

Input y-coordinates

PROJ: str

Spatial reference system code for coordinate transformations

BF: str

Direction of transformation

  • 'B': backwards

  • 'F': forwards

EPSG: int or str, default 4326 (WGS84 Latitude/Longitude)

input ('F') or output ('B') coordinate system

Returns
o1: np.ndarray

Output transformed x-coordinates

o2: np.ndarray

Output transformed y-coordinates

transform(i1: ndarray, i2: ndarray)[source]

Performs Coordinates Reference System (CRS) transformations

Parameters
i1: np.ndarray

Input x-coordinates

i2: np.ndarray

Input y-coordinates

Returns
o1: np.ndarray

Output transformed x-coordinates

o2: np.ndarray

Output transformed y-coordinates

from_input(PROJECTION: int | str)[source]

Attempt to retrieve the Coordinate Reference System for an input code

Parameters
PROJECTION: int or str

Coordinate Reference System code

_EPSG3031(EPSG: int | str = 4326)[source]

Transform for models in EPSG:3031 (Antarctic Polar Stereographic)

Parameters
EPSG: int or str, default 4326 (WGS84 Latitude/Longitude)

input ('F') or output ('B') coordinate system

_EPSG3413(EPSG: int | str = 4326)[source]

Transform for models in EPSG:3413 (Sea Ice Polar Stereographic North)

Parameters
EPSG: int or str, default 4326 (WGS84 Latitude/Longitude)

input ('F') or output ('B') coordinate system

_CATS2008(EPSG: int | str = 4326)[source]

Transform for Circum-Antarctic Tidal Simulation models

Parameters
EPSG: int or str, default 4326 (WGS84 Latitude/Longitude)

input ('F') or output ('B') coordinate system

_EPSG3976(EPSG: int | str = 4326)[source]

Transform for models in EPSG:3976 (Sea Ice Polar Stereographic South)

Parameters
EPSG: int or str, default 4326 (WGS84 Latitude/Longitude)

input ('F') or output ('B') coordinate system

_PSNorth(EPSG: int | str = 4326)[source]

Transform for idealized Arctic Polar Stereographic models

Parameters
EPSG: int or str, default 4326 (WGS84 Latitude/Longitude)

input ('F') or output ('B') coordinate system

_EPSG4326(EPSG: int | str = 4326)[source]

Transform for models in EPSG:4326 (WGS84 Latitude/Longitude)

Parameters
EPSG: int, default 4326 (WGS84 Latitude/Longitude)

input ('F') or output ('B') coordinate system

_custom(PROJ: int | str, EPSG: int | str = 4326)[source]

Transform for models in a custom projection

Parameters
PROJ: int or str

Spatial reference system code for coordinate transformations

EPSG: int or str, default 4326 (WGS84 Latitude/Longitude)

input ('F') or output ('B') coordinate system

property direction

pyproj direction of the coordinate transform

class pyTMD.datum(**kwargs)[source]

Class for gravitational and ellipsoidal parameters

Parameters
ellipsoid: str, default ‘WGS84’

Reference ellipsoid name

  • 'CLK66': Clarke 1866

  • 'GRS67': Geodetic Reference System 1967

  • 'GRS80': Geodetic Reference System 1980

  • 'HGH80': Hughes 1980 Ellipsoid

  • 'WGS72': World Geodetic System 1972

  • 'WGS84': World Geodetic System 1984

  • 'ATS77': Quasi-earth centred ellipsoid for ATS77

  • 'NAD27': North American Datum 1927

  • 'NAD83': North American Datum 1983

  • 'INTER': International

  • 'KRASS': Krassovsky (USSR)

  • 'MAIRY': Modified Airy (Ireland 1965/1975)

  • 'TOPEX': TOPEX/POSEIDON ellipsoid

  • 'EGM96': EGM 1996 gravity model

  • 'IERS': IERS Numerical Standards (2010)

units: str, default `MKS`

Output units

  • 'MKS': meters, kilograms, seconds

  • 'CGS': centimeters, grams, seconds

Attributes
a_axis: float

Semi-major axis of the ellipsoid

flat: float

Flattening of the ellipsoid

omega: float

Angular velocity of the Earth

GM: float

Geocentric gravitational constant

property rad_e: float

Average radius of the Earth with same volume as ellipsoid

property b_axis: float

Semi-minor axis of the ellipsoid

property ratio: float

Ratio between ellipsoidal axes

property rad_p: float

Polar radius of curvature

property ecc: float

Linear eccentricity

property ecc1: float

First numerical eccentricity

property ecc2: float

Second numerical eccentricity

property m: float

m Parameter

property f2: float

f2 component

property f4: float

f4 component

property q: float

q Parameter

property q0: float

q0 Parameter

property J2: float

Oblateness coefficient

property C20: float

Normalized C20 harmonic

property gamma_a: float

Normal gravity at the equator

property gamma_b: float

Normal gravity at the pole

gamma_0(theta) float[source]

Normal gravity at colatitudes

Parameters
theta: float

Colatitudes in radians

gamma_h(theta, height) float[source]

Normal gravity at colatitudes and heights

Parameters
theta: float

Colatitudes in radians

height: float

Height above ellipsoid

property dk: float

Ratio between gravity at pole versus gravity at equator

property U0: float

Normal potential at the ellipsoid

property area: float

Surface area of the ellipsoid

property volume: float

Volume of the ellipsoid

property rho_e: float

Average density

References

1

B. Hofmann-Wellenhof and H. Moritz, Physical Geodesy, 2nd Edition, 403 pp., (2006). doi: 10.1007/978-3-211-33545-1

2

G. Petit and B. Luzum (eds.), IERS Conventions (2010), International Earth Rotation and Reference Systems Service (IERS), IERS Technical Note No. 36