************************************************************************
*
*  Tests the function "qvtd.gsf"
*
*  Note, uses function "math_log(x)" to calculate the natural logarithm
*  from:  http://grads.iges.org/grads/gadoc/mathfunctions.html
*
*  To use, open a GrADS window, and type:
*
*       ga-> test_qvtd P QV
*
*  where "P" is a value for air pressure (Pa) and
*        "QV" is a value for water vapor mixing ratio (kg[H2O]/kg[dry air])
*
************************************************************************

function test_qvtd (args)
*
*  Allow external GrADS functions
*
rc = gsfallow("on")

P  = subwrd(args,1)
QV = subwrd(args,2)
*P  = 100000
*QV = 0.01

say 'P, QV = 'P', 'QV

dewpt = qvtd(P,QV)
say 'Td(K) = 'dewpt

return
