Meteorology#

Overview#

This section covers meteorology functions from NCL:

dewtemp_trh#

NCL’s dewtemp_trh calculates the dew point temperature given temperature and relative humidity using the equations from John Dutton’s “Ceaseless Wind” (pg. 273-274)[1] and returns a temperature in Kelvin

Important Note

To convert from Kelvin to Celsius -273.15 and to convert from Celsius to Kelvin +273.15

Grab and Go#

# Input: Single Value
from geocat.comp import dewtemp

temp_c = 18  # Celsius
relative_humidity = 46.5  # %

dewtemp(temp_c + 273.15, relative_humidity) - 273.15  # Returns in Celsius
6.298141316024157
# Input: List/Array
from geocat.comp import dewtemp

temp_kelvin = [291.15, 274.14, 360.3, 314]  # Kelvin
relative_humidity = [46.5, 5, 96.5, 1]  # %

dewtemp(temp_kelvin, relative_humidity) - 273.15  # Returns in Celsius
array([  6.29814132, -35.12955277,  86.22114845, -27.40981025])

daylight_fao56#

NCL’s daylight_fao56 calculates the maximum number of daylight hours as described in the Food and Agriculture Organization (FAO) Irrigation and Drainage Paper 56 (Chapter 3, Equation 34) [2]

Grab and Go#

# Input: Single Value
from geocat.comp import max_daylight

day_of_year = 246  # Sept. 3
latitude = -20  # 20 Degrees South

max_daylight(day_of_year, latitude)
array([[11.66559195]])
# Input: List/Array
from geocat.comp import max_daylight

# Spring Equinox (March 20), Summer Solstice (June 20), Autumn Equinox (Sept. 22), Winter Solstice (Dec. 21)
days_of_year = [79, 171, 265, 355]
latitudes = 40  # Boulder

max_daylight(days_of_year, latitudes)
array([[11.92114937],
       [14.84320154],
       [11.92090136],
       [ 9.15643116]])

Python Resources#

Additional Reading#

References:#