1 """!Constants used throughout the hwrf package
3 This module contains various constants, including the Earth
4 "radius" and unit conversions. Unit conversion constants are given as
5 fractions.Fraction objects to allow the conversion to be exact."""
19 ft2m = fractions.Fraction(12*254,10000)
20 """US foot to meters conversion (exact)."""
25 """Meters to US foot conversion (exact)."""
29 nmi2km = fractions.Fraction(1852,1000)
30 "Nautical miles to kilometers conversion (exact)."""
33 # Kilometers to nautical miles conversion (exact).
35 """Kilometers to nautical miles conversion (exact).
"""
38 # Knots to meters per second conversion (exact).
39 kts2mps = fractions.Fraction(1852,3600)
40 """Knots to meters per second conversion (exact).
"""
43 # Meters per second to knots conversion (exact).
45 """Meters per second to knots conversion (exact).
"""
47 # Various earth radii from the hwrfutil library constants_module:
49 # EGM2008 Earth radius at the pole.
51 """EGM2008 Earth radius at the pole.
"""
54 # EGM2008 Earth radius at the equator.
55 Requator = 6378137.0000
56 """EGM2008 Earth radius at the equator.
"""
59 # EGM2008 Earth flattening ratio.
60 flattening = 1/298.257223563
61 """EGM2008 Earth flattening ratio.
"""
64 # Earth mean ellipsoid radius from IUGG 1980
66 """Earth mean ellipsoid radius from IUGG 1980
"""
69 # Earth authalic (equal surface area) radius from IUGG 1980
70 REauthalic = 6371007.2
71 """Earth authalic (equal surface area) radius from IUGG 1980
"""
74 # Earth equal volume radius from IUGG 1980
76 """Earth equal volume radius from IUGG 1980
"""
79 # Earth rectivying (equal circumference) radius from IUGG 1980
80 RErectifying = 6367449.1
81 """Earth rectivying (equal circumference) radius from IUGG 1980
"""
84 # A compromise: the average of the mean ellipsoid radius, authalic radius and equal volume radius
85 Rearth = (REmean+REauthalic+REvolume)/3
86 """Average of the mean ellipsoid radius, authalic radius and equal