monet.met_funcs

This package contains the main routines for estimating variables related to the Monin-Obukhov (MO) Similarity Theory, such as MO length, adiabatic correctors for heat and momentum transport. It requires the following package.

References

Brutsaert2005(1,2,3,4)

Brutsaert, W. (2005). Hydrology: an introduction (Vol. 61, No. 8). Cambridge: Cambridge University Press.

Norman2000

Norman, J. M., W. P. Kustas, J. H. Prueger, and G. R. Diak (2000), Surface flux estimation using radiometric temperature: A dual-temperature-difference method to minimize measurement errors, Water Resour. Res., 36(8), 2263-2274, https://doi.org/10.1029/2000WR900033.

Functions

calc_L(ustar, T_A_K, rho, c_p, H, LE)

Calculates the Monin-Obukhov length.

calc_Psi_H(zoL)

Calculates the adiabatic correction factor for heat transport.

calc_Psi_M(zoL)

Adiabatic correction factor for momentum transport.

calc_c_p(p, ea)

Calculates the heat capacity of air at constant pressure.

calc_delta_vapor_pressure(T_K)

Calculate the slope of saturation water vapour pressure.

calc_lambda(T_A_K)

Calculates the latent heat of vaporization.

calc_lapse_rate_moist(T_A_K, ea, p)

Calculate moist-adiabatic lapse rate (K/m)

calc_mixing_ratio(ea, p)

Calculate ratio of mass of water vapour to the mass of dry air (-)

calc_pressure(z)

Calculates the barometric pressure above sea level.

calc_psicr(c_p, p, Lambda)

Calculates the psicrometric constant.

calc_rho(p, ea, T_A_K)

Calculates the density of air.

calc_richardson(u, z_u, d_0, T_R0, T_R1, ...)

Richardson number.

calc_stephan_boltzmann(T_K)

Calculates the total energy radiated by a blackbody.

calc_sun_angles(lat, lon, stdlon, doy, ftime)

Calculates the Sun Zenith and Azimuth Angles (SZA & SAA).

calc_theta_s(xlat, xlong, stdlng, doy, year, ...)

Calculates the Sun Zenith Angle (SZA).

calc_u_star(u, z_u, L, d_0, z_0M)

Friction velocity.

calc_vapor_pressure(T_K)

Calculate the saturation water vapour pressure.

flux_2_evaporation(flux[, T_K, time_domain])

Converts heat flux units (W m-2) to evaporation rates (mm time-1) to a given temporal window

monet.met_funcs.calc_L(ustar, T_A_K, rho, c_p, H, LE)

Calculates the Monin-Obukhov length.

Parameters
  • ustar (float) – friction velocity (m s-1).

  • T_A_K (float) – air temperature (Kelvin).

  • rho (float) – air density (kg m-3).

  • c_p (float) – Heat capacity of air at constant pressure (J kg-1 K-1).

  • H (float) – sensible heat flux (W m-2).

  • LE (float) – latent heat flux (W m-2).

Returns

L – Obukhov stability length (m).

Return type

float

References

[Brutsaert2005]

monet.met_funcs.calc_Psi_H(zoL)

Calculates the adiabatic correction factor for heat transport.

Parameters

zoL (float) – stability coefficient (unitless).

Returns

Psi_H – adiabatic corrector factor for heat transport (unitless).

Return type

float

References

[Brutsaert2005]

monet.met_funcs.calc_Psi_M(zoL)

Adiabatic correction factor for momentum transport.

Parameters

zoL (float) – stability coefficient (unitless).

Returns

Psi_M – adiabatic corrector factor for momentum transport (unitless).

Return type

float

References

[Brutsaert2005]

monet.met_funcs.calc_c_p(p, ea)

Calculates the heat capacity of air at constant pressure.

Parameters
  • p (float) – total air pressure (dry air + water vapour) (mb).

  • ea (float) – water vapor pressure at reference height above canopy (mb).

Returns

c_p

Return type

heat capacity of (moist) air at constant pressure (J kg-1 K-1).

References

based on equation (6.1) from Maarten Ambaum (2010): Thermal Physics of the Atmosphere (pp 109).

monet.met_funcs.calc_delta_vapor_pressure(T_K)

Calculate the slope of saturation water vapour pressure.

Parameters

T_K (float) – temperature (K).

Returns

s – slope of the saturation water vapour pressure (kPa K-1)

Return type

float

monet.met_funcs.calc_lambda(T_A_K)

Calculates the latent heat of vaporization.

Parameters

T_A_K (float) – Air temperature (Kelvin).

Returns

Lambda – Latent heat of vaporisation (J kg-1).

Return type

float

References

based on Eq. 3-1 Allen FAO98

monet.met_funcs.calc_lapse_rate_moist(T_A_K, ea, p)

Calculate moist-adiabatic lapse rate (K/m)

Parameters
  • T_A_K (float or numpy array) – air temperature at reference height (K).

  • ea (float or numpy array) – water vapor pressure at reference height (mb).

  • p (float or numpy array) – total air pressure (dry air + water vapour) at reference height (mb).

Returns

Gamma_w – moist-adiabatic lapse rate (K/m)

Return type

float or numpy array

References

https://glossary.ametsoc.org/wiki/Adiabatic_lapse_rate

monet.met_funcs.calc_mixing_ratio(ea, p)

Calculate ratio of mass of water vapour to the mass of dry air (-)

Parameters
  • ea (float or numpy array) – water vapor pressure at reference height (mb).

  • p (float or numpy array) – total air pressure (dry air + water vapour) at reference height (mb).

Returns

r – mixing ratio (-)

Return type

float or numpy array

References

https://glossary.ametsoc.org/wiki/Mixing_ratio

monet.met_funcs.calc_pressure(z)

Calculates the barometric pressure above sea level.

Parameters

z (float) – height above sea level (m).

Returns

p – air pressure (mb).

Return type

float

monet.met_funcs.calc_psicr(c_p, p, Lambda)

Calculates the psicrometric constant.

Parameters
  • c_p (float) – heat capacity of (moist) air at constant pressure (J kg-1 K-1).

  • p (float) – atmopheric pressure (mb).

  • Lambda (float) – latent heat of vaporzation (J kg-1).

Returns

psicr – Psicrometric constant (mb C-1).

Return type

float

monet.met_funcs.calc_rho(p, ea, T_A_K)

Calculates the density of air.

Parameters
  • p (float) – total air pressure (dry air + water vapour) (mb).

  • ea (float) – water vapor pressure at reference height above canopy (mb).

  • T_A_K (float) – air temperature at reference height (Kelvin).

Returns

rho – density of air (kg m-3).

Return type

float

References

based on equation (2.6) from Brutsaert (2005): Hydrology - An Introduction (pp 25).

monet.met_funcs.calc_richardson(u, z_u, d_0, T_R0, T_R1, T_A0, T_A1)

Richardson number.

Estimates the Bulk Richardson number for turbulence using time difference temperatures.

Parameters
  • u (float) – Wind speed (m s-1).

  • z_u (float) – Wind speed measurement height (m).

  • d_0 (float) – Zero-plane displacement height (m).

  • T_R0 (float) – radiometric surface temperature at time 0 (K).

  • T_R1 (float) – radiometric surface temperature at time 1 (K).

  • T_A0 (float) – air temperature at time 0 (K).

  • T_A1 (float) – air temperature at time 1 (K).

Returns

Ri – Richardson number.

Return type

float

References

[Norman2000]

monet.met_funcs.calc_stephan_boltzmann(T_K)

Calculates the total energy radiated by a blackbody.

Parameters

T_K (float) – body temperature (Kelvin)

Returns

M – Emitted radiance (W m-2)

Return type

float

monet.met_funcs.calc_sun_angles(lat, lon, stdlon, doy, ftime)

Calculates the Sun Zenith and Azimuth Angles (SZA & SAA).

Parameters
  • lat (float) – latitude of the site (degrees).

  • long (float) – longitude of the site (degrees).

  • stdlng (float) – central longitude of the time zone of the site (degrees).

  • doy (float) – day of year of measurement (1-366).

  • ftime (float) – time of measurement (decimal hours).

Returns

  • sza (float) – Sun Zenith Angle (degrees).

  • saa (float) – Sun Azimuth Angle (degrees).

monet.met_funcs.calc_theta_s(xlat, xlong, stdlng, doy, year, ftime)

Calculates the Sun Zenith Angle (SZA).

Parameters
  • xlat (float) – latitude of the site (degrees).

  • xlong (float) – longitude of the site (degrees).

  • stdlng (float) – central longitude of the time zone of the site (degrees).

  • doy (float) – day of year of measurement (1-366).

  • year (float) – year of measurement .

  • ftime (float) – time of measurement (decimal hours).

Returns

theta_s – Sun Zenith Angle (degrees).

Return type

float

References

Adopted from Martha Anderson’s fortran code for ALEXI which in turn was based on Cupid.

monet.met_funcs.calc_u_star(u, z_u, L, d_0, z_0M)

Friction velocity.

Parameters
  • u (float) – wind speed above the surface (m s-1).

  • z_u (float) – wind speed measurement height (m).

  • L (float) – Monin Obukhov stability length (m).

  • d_0 (float) – zero-plane displacement height (m).

  • z_0M (float) – aerodynamic roughness length for momentum transport (m).

References

[Brutsaert2005]

monet.met_funcs.calc_vapor_pressure(T_K)

Calculate the saturation water vapour pressure.

Parameters

T_K (float) – temperature (K).

Returns

ea – saturation water vapour pressure (mb).

Return type

float

monet.met_funcs.flux_2_evaporation(flux, T_K=293.15, time_domain=1)

Converts heat flux units (W m-2) to evaporation rates (mm time-1) to a given temporal window

Parameters
  • flux (float or numpy array) – heat flux value to be converted, usually refers to latent heat flux LE to be converted to ET

  • T_K (float or numpy array) – environmental temperature in Kelvin. Default=20 Celsius

  • time_domain (float) – Temporal window in hours. Default 1 hour (mm h-1)

Returns

ET – evaporation rate at the time_domain. Default mm h-1

Return type

float or numpy array