NCL Home > Documentation > Functions > Meteorology

relhum_water

Calculates relative humidity with respect to water, given temperature, mixing ratio, and pressure.

Available in version 6.4.0 and later.

Prototype

	function relhum_water (
		t  : numeric,  
		w  : numeric,  
		p  : numeric   
	)

	return_val [dimsizes(t)] :  numeric

Arguments

t

A scalar or multi-dimensional array containing the temperature in K.

w

A scalar or multi-dimensional array containing the mixing ratio in kg/kg. Must be the same size and shape as t.

p

A scalar or multi-dimensional array equal to the pressure in Pa. Must be the same size and shape as t.

Return value

A multi-dimensional array of the same sizes as t. The output will be double if any of the input is double, and float otherwise.

The return missing value, if any, will be the default missing value for the type being returned.

Description

Calculates relative humidity with respect to water, given temperature, mixing ratio, and pressure.

This function was contributed by Alan Brammer of the University at Albany - SUNY.

See Also

relhum, relhum_ice, relhum_ttd, dewtemp_trh, mixhum_ptrh

Examples

Example 1

  t  =   18.+273.15     ; C    ==> K
  w  =    6./1000.      ; g/kg ==> kg/kg
  p  = 1000.*100.       ; hPa  ==> Pa

  rh = relhum_water (t, w, p)
  print("rh = " + rh)
Output:
  rh = 46.3574