53 use ctlblk_mod,
only: jsta, jend, im, spval, ista, iend
58 integer,
PARAMETER :: NT=2000
61 real,
intent(out) :: TD(ista:iend,jsta:jend)
62 real,
intent(in) :: VP(ista:iend,jsta:jend)
66 real rvp1,rvp2,rt3,rvp3,rlog3,ra,rb,rapb,rtest,rnt,rdvp
67 real rgs,rvp,rlvp,rn,rd,rch,rt,w1,w2
70 logical :: jcontinue=.true.
92 rdvp = (rvp2-rvp1)/(rnt-1.e0)
99 rlvp=log(rvp)-rlog3-rapb
103 10 rn=ra*log(rgs)-rapb*rgs-rlvp
109 IF( abs(rch) < rtest ) jcontinue=.false.
111 DO WHILE (abs(rch) >= rtest)
130 dntm1 = float(nt) -.01
139 IF(vp(i,j)<spval)
THEN
140 w1 = min(max((a*vp(i,j)+b),1.0),dntm1)
143 td(i,j) = tdp(jnt) + (w1-w2)*(tdp(jnt+1)-tdp(jnt))