rayference / joseki

Reference atmospheric thermophysical properties for radiative transfer applications in Earth's atmosphere.
https://rayference.github.io/joseki/latest
GNU Lesser General Public License v3.0
9 stars 1 forks source link

Vertical datum #349

Open nollety opened 1 year ago

nollety commented 1 year ago

At present, the z (altitude) coordinate is defined as the height above the geoid, so that the origin of the altitude axis, z = 0 km, corresponds to the geoid. (the geoid differs from the mean sea level by less than 2 meters)

Given that the Earth surface is different from this geoid (e.g. mountains), the convention for z = 0 km could be generalized so that altitude could alternatively be reported relative to the Earth surface (the ground surface).

Implementation details

Each dataset would have a new attribute vertical_datum with a value corresponding to the vertical datum. The z coordinate' attribute could be also updated to indicate, e.g. height above the geoid, height above the ground level and so on.

A new module (e.g. geodesy.py) could include an enumeration such as:

from enum import Enum

class VerticalDatum(Enum, str):
    """
    Zero-level reference.
    """

    GROUND = "ground"  # 'z' is the height above ground level
    EGM_96 = "EGM-96"  # 'z' is the orthometric height, namely height above EGM-96 geoid
    MEAN_SEA_LEVEL = "mean sea level"  # z is the height above sea level (very close to orthometric height)
    WGS_84 = "WGS 84"  # 'z' is the ellipsoidal height, namely height above Earth reference ellipsoid World Geodetic System 84
    UNDEFINED = "undefined"  # fall-back

including a transformation method to convert one representation to another:

def transform(
    ds: xr.Dataset,
    to: VerticalDatum | str,
    **kwargs,
) -> xr.Dataset:
    pass

Notes

nollety commented 1 year ago

ECMWF data is referenced in the horizontal with respect to the WGS84 ellipse (which defines the major/minor axes) but in the vertical it is referenced to the Geoid (EGM96).

https://confluence.ecmwf.int/display/CKB/ERA-Interim%3A+documentation