1 SUBROUTINE ttblex(TREF,TTBL,ITB,JTB,KARR,PMIDL &
2 ,PL,QQ,PP,RDP,THE0,STHE,RDTHE,THESP &
34 use ctlblk_mod,
only: jsta, jend, im, jsta_2l, jend_2u, me, &
35 ista, iend, ista_2l, iend_2u
40 integer,
intent(in) :: ITB,JTB
41 integer,
intent(in) :: KARR(ista:iend,jsta:jend)
42 real,
dimension(JTB,ITB),
intent(in) :: TTBL
43 real,
dimension(ISTA_2L:IEND_2U,JSTA_2L:JEND_2U),
intent(in) :: PMIDL
44 real,
dimension(ISTA_2L:IEND_2U,JSTA_2L:JEND_2U),
intent(out) :: TREF
45 real,
dimension(ista:iend,jsta:jend),
intent(out) :: QQ,PP
46 real,
dimension(ista:iend,jsta:jend),
intent(in) :: THESP
47 real,
dimension(ITB),
intent(in) :: THE0,STHE
48 integer,
dimension(ista:iend,jsta:jend),
intent(out) :: IPTB,ITHTB
49 real,
intent(in) :: PL,RDP,RDTHE
52 integer I,J,ITH,IP,IPTBK
53 real PK,TPK,T00K,T10K,T01K,T11K,BTHE00K,STHE00K,BTHK,STHK, &
61 IF(karr(i,j) > 0)
THEN
65 qq(i,j) = tpk-aint(tpk)
66 iptb(i,j) = int(tpk) + 1
68 IF(iptb(i,j) < 1)
THEN
73 IF(iptb(i,j) >= itb)
THEN
81 bthe10k = the0(iptbk+1)
82 sthe10k = sthe(iptbk+1)
84 bthk = (bthe10k-bthe00k)*qq(i,j)+bthe00k
85 sthk = (sthe10k-sthe00k)*qq(i,j)+sthe00k
86 tthk = (thesp(i,j)-bthk)/sthk*rdthe
87 pp(i,j) = tthk-aint(tthk)
91 ithtb(i,j) = int(tthk)+1
93 IF(ithtb(i,j) < 1)
THEN
98 IF(ithtb(i,j) >= jtb)
THEN
105 t00k = ttbl(ith ,ip )
106 t10k = ttbl(ith+1,ip )
107 t01k = ttbl(ith ,ip+1)
108 t11k = ttbl(ith+1,ip+1)
110 tref(i,j) = (t00k+(t10k-t00k)*pp(i,j)+(t01k-t00k)*qq(i,j) &
111 + (t00k-t10k-t01k+t11k)*pp(i,j)*qq(i,j))
117 END SUBROUTINE ttblex