43 SUBROUTINE dewpoint( VP, TD)
45 use ctlblk_mod
, only: jsta, jend, im, spval
50 integer,
PARAMETER :: nt=2000
53 real,
intent(out) :: td(im,jsta:jend)
54 real,
intent(in) :: vp(im,jsta:jend)
58 real rvp1,rvp2,rt3,rvp3,rlog3,ra,rb,rapb,rtest,rnt,rdvp
59 real rgs,rvp,rlvp,rn,rd,rch,rt,w1,w2
62 logical :: jcontinue=.true.
84 rdvp = (rvp2-rvp1)/(rnt-1.e0)
91 rlvp=log(rvp)-rlog3-rapb
95 10 rn=ra*log(rgs)-rapb*rgs-rlvp
101 IF( abs(rch) < rtest ) jcontinue=.false.
103 DO WHILE (abs(rch) >= rtest)
122 dntm1 = float(nt) -.01
131 IF(vp(i,j)<spval)
THEN
132 w1 = min(max((a*vp(i,j)+b),1.0),dntm1)
135 td(i,j) = tdp(jnt) + (w1-w2)*(tdp(jnt+1)-tdp(jnt))