<HTML> <BODY BGCOLOR=#ccccdd LINK=#0000aa VLINK=#0000ff ALINK=#ff0000 ><BASE TARGET="bottom_target"><PRE>
<A NAME='DA_QFRMRH'><A href='../../html_code/setup_structures/da_qfrmrh.inc.html#DA_QFRMRH' TARGET='top_target'><IMG SRC="../../gif/bar_red.gif" border=0></A>

subroutine da_qfrmrh ( p, t, rh, q ) 4,2

   !-----------------------------------------------------------------------
   ! Purpose: TBD
   !-----------------------------------------------------------------------

   implicit none

   real, intent(in)  :: p, t, rh
   real, intent(out) :: q

   real   :: a, b, e, qs

   if (trace_use) call da_trace_entry("da_qfrmrh")

   a=17.26
   b=35.86
   if (t &lt;= 263.0) a=21.87
   if (t &lt;= 263.0) b= 7.66
   e  = 6.11*exp(a*(t-t_triple)/(t-b))
   qs = 0.622*e/(p-0.378*e)
   q  = qs*rh/100.0

   if (trace_use) call da_trace_exit("da_qfrmrh")

end subroutine da_qfrmrh