`tvrh2q(`

*tvexpr,rhexpr*)

Given virtual temperature and relative humidty, `tvrh2q`

returns specific humidity, q, in g/g. Specifically:

A GrADS expression that represents virtual temperature, in Kelvin. *tvexpr*

A GrADS expression that represents relative humidty, in percent
(values from 0 to 100).
*rhexpr*

This function works only on gridded data.

- The conversion formula requires a pressure in mb.
`tvrh2q`

assumes that the Z coordinate system is pressure in mb. If Z is a varying dimension, the pressure valid at each grid point is used. When Z is a fixed dimension, the Z value from the current dimension environment is used.Note that it is possible to provide values from an incorrect pressure level by overriding the current dimension environment:

`set lev 500`

`d tvrh2q(tv(lev=850),rh(lev=850))`

In this case, the

`tvrh2q`

function assumes a pressure of 500mb, which is the current setting for the Z dimension environment. However,

and*tvexpr*

are providing data from the 850mb level, so the function will produce incorrect results.*rhexpr*