
NCL Home >
Documentation >
Functions >
Meteorology
vapor_pres_rh
Compute vapor pressure given relative humidity (%) and saturation vapor pressure.
Prototype
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" ; This library is automatically loaded ; from NCL V6.2.0 onward. ; No need for user to explicitly load. function vapor_pres_rh ( rh : numeric, esat : numeric ) return_val [dimsizes(rh)] : numeric
Arguments
rhA scalar or multi-dimensional array of relative humidity (%)
esatA scalar or multi-dimensional array of saturation vapor pressure. Must conform to rh. p.
Return value
The returned vapor pressurevalue(s) will have the same shape and size as rh. It will be type double if any of the input arguments is type double; otherwise the values will by type float.
Description
Simple formula:
e = (rh/100)*esat
See Also
wetbulb, dewtemp_trh, relhum, relhum_ttd
Examples
Example 1: Compute vapor pressure.
rh = 80 ; % es = 2000 ; Pa es@units = "Pa" vp = vapor_pres_rh(rh, es) print(vp)The output is:
Variable: vp Type: float Total Size: 4 bytes 1 values Number of Dimensions: 1 Dimensions and sizes: [1] Coordinates: Number Of Attributes: 2 long_name : Vapor Pressure units : Pa NCL : vapor_pres_rh (0) 1600