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]])

satvpr_temp_fao56#

NCL’s satvpr_temp_fao56 calculates saturation vapor pressure using temperature as described in the Food and Agriculture Organization (FAO) Irrigation and Drainage Paper 56 (Chapter 3, Equation 11) [2]

Grab and Go#

# Input: Single Value
from geocat.comp import saturation_vapor_pressure

temp = 50  # Fahrenheit

saturation_vapor_pressure(temp)
array(1.22796262)
# Input: List/Array
from geocat.comp import saturation_vapor_pressure

temp = [33, 50, 100, 212]  # Fahrenheit

saturation_vapor_pressure(temp)
array([  0.63594167,   1.22796262,   6.54556639, 102.21571649])

satvpr_tdew_fao56#

NCL’s satvpr_tdew_fao56 calculates the actual saturation vapor pressure using dewpoint temperature as described in the Food and Agriculture Organization (FAO) Irrigation and Drainage Paper 56 (Chapter 3, Equation 14) [2]

# Input: Single Value
from geocat.comp import actual_saturation_vapor_pressure

temp = 35  # Fahrenheit

actual_saturation_vapor_pressure(temp)
array(0.68898447)
# Input: List/Array
from geocat.comp import actual_saturation_vapor_pressure

temp = [35, 60, 80, 200]  # Fahrenheit

actual_saturation_vapor_pressure(temp)
array([ 0.68898447,  1.76730647,  3.49620825, 80.00607017])

Python Resources#

Additional Reading#

References:#