 NCL Home > Documentation > Functions > Meteorology

# relhum_ice

Calculates relative humidity with respect to ice, given temperature, mixing ratio, and pressure. Available in version 6.4.0 and later.

## Prototype

```	function relhum_ice (
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 ice, given temperature, mixing ratio, and pressure. If any of the input values are missing or the temperature is > 273.15, then the output will be set to missing.

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

## Examples

Example 1

```  tc =   -5.
tk =   tc+273.15      ; C    ==> K
w  =   3.7/1000.      ; g/kg ==> kg/kg
p  = 1000.*100.       ; hPa  ==> Pa

rh = relhum_ice (tk, w, p)
print("rh = " + rh)
```

Output:

```  rh = 147.8802
```

Example 2

```  tc = 10
tk = tc +273.15       ; C    ==> K
w  =    6./1000.      ; g/kg ==> kg/kg
p  = 1000.*100.       ; hPa  ==> Pa

rh = relhum_ice (tk, w, p)

print("rh = " + rh)   ; Will be missing because tk > 273.15
```
Output:

```  rh = 9.96921e+36    ; (missing value for float)
```