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

heat_index_nws#

NCL’s heat_index_nws computes the heat index as calculated by the National Weather Service[3]

Default coefficients when temperature if greater 80°F and relative humidity is greater than 40%

Alternate coefficients when temperature is between 70°F and 115°F and relative humidity less than 80%

The equation for the heat index to match the NOAA National Weather Service table is derived from regression analysis, so the default coefficients have a degree of error up to ±1.3°F[4]

Grab and Go#

# Input: Single Value
from geocat.comp import heat_index

temp = 85  # Degrees Fahrenheit
rh = 45  # %

heat_index(temp, rh)
array([85.3104587])
# Input: List/Array
from geocat.comp import heat_index

temps = [104, 100, 85]  # Degrees Fahrenheit
rhs = [55, 65, 45]  # %

heat_index(temps, rhs)
array([137.36135724, 135.8679973 ,  85.3104587 ])

Python Resources#

Additional Reading#

References:#