qair2rh: qair2rh

View source: R/qair2rh.R

qair2rhR Documentation

qair2rh

Description

From Bolton 1980 The computation of Equivalent Potential Temperature http://www.eol.ucar.edu/projects/ceop/dm/documents/refdata_report/eqns.html.

Usage

qair2rh(qair, temp, press = 101325, allowStupid = FALSE)

Arguments

qair

Required. Specific humidity, dimensionless (e.g. kg/kg) ratio of water mass / total air mass.

temp

Required. Air temp in degrees C.

press

Optional. Air pressure in Pa. Default is 101325, the standard atmospheric air pressure.

allowStupid

Optional. If TRUE then impossible values (smaller than zero or greater than 1) will be allowed. The default value, FALSE, restricts the returned value to be between 0 and 1.

Details

Converts specific humidity to relative humidity

Value

If successful, returns rh (relative humidity), the ratio of actual water mixing ratio to saturation mixing ratio. Note that this value is a fraction (i.e. between 0 and 1) rather than a percentage. If unsuccessful, returns the value FALSE.

Author(s)

David LeBauer. Modified by Kevin Shook for air temps < 0 ^\circC and to work for vectors or scalars.

References

https://github.com/PecanProject/pecan/blob/master/modules/data.atmosphere/R/metutils.R.

See Also

qair2ea

Examples

qair2rh(0.0001, 10)

CentreForHydrology/CRHMr documentation built on April 6, 2024, 5:27 p.m.