1 SUBROUTINE SPLDIF3_H( ZOUT, POUT, LMXOUT, ZIN, PIN, LMXIN, IJMAX,
2 W SM, H, AL, AM, AP, C )
3 DIMENSION ZOUT(IJMAX,LMXOUT), POUT(IJMAX,LMXOUT),
4 1 ZIN (IJMAX,LMXIN), PIN (IJMAX,LMXIN)
5 DIMENSION SM(IJMAX,LMXIN), H(IJMAX,LMXIN), AL(IJMAX,LMXIN),
6 1 AM(IJMAX,LMXIN), AP(IJMAX,LMXIN), C(IJMAX,LMXIN)
8 C INPUT / ZIN (L), PIN (L), LMXIN : INPUT.DATA, PRES(LOG), NUMBER
9 C OUTPUT/ ZOUT(L), POUT(L), LMXOUT : OUTPUT-VAL, PRES(LOG), NUMBER
12 GR = -gravity/gas_constant
16 H(I,L) = PIN(I,L)-PIN(I,L-1)
21 AL(I,L) = 0.5*H(I,L+1)/(H(I,L)+H(I,L+1))
25 C ( LAPSE RATE IS CONSTANT )
26 C SM(1) = SM(2) ; SM(LMXIN-1) = SM(LMXIN) : SECOND DERIVATIVE
29 AM(I,LMXIN) = 0.0 ! UPPER BOUNDARY
30 CORG AM(I,LMXIN) = -1.0 ! ORG
31 AL(I,LMXIN) = 0.0 ! ORG
32 CHOON AL(I,LMXIN) = -1.0 ! KMA
38 AP(I,L) = 1.0/(1.0-AL(I,L-1)*AM(I,L))
39 AL(I,L) = AL(I,L)*AP(I,L)
49 C(I,L) = 3.0*((ZIN(I,L+1)-ZIN(I,L))/H(I,L+1)
50 1 - (ZIN(I,L)-ZIN(I,L-1))/H(I,L))
54 C FORWARD SUBSTITUTION
58 C(I,L) = (C(I,L)-C(I,L-1)*AM(I,L))*AP(I,L)
61 SM(I,LMXIN) = C(I,LMXIN)
64 C BACKWARD SUBSTUTUTION
69 SM(I,L) = C(I,L)-AL(I,L)*SM(I,L+1)
76 DO 500 LOUT = 1, LMXOUT
80 L = LOUT ! FOR ONLY PIN.EQ.POUT
82 CM DO 300 L = LB, LMXIN
83 CM IF( X.GE.PIN(L) ) GO TO 310
88 ZOUT(I,LOUT) = SM(I,L-1)*( -(PIN(I,L)-X)**2
89 1 /(2.0*H(I,L))+H(I,L)/6.0 )
90 2 + SM(I,L) *( (X-PIN(I,L-1))**2
91 3 /(2.0*H(I,L))-H(I,L)/6.0 )
92 \ + ( ZIN(I,L)-ZIN(I,L-1) )/H(I,L)
93 ZOUT(I,LOUT) = ZOUT(I,LOUT)*GR
98 END SUBROUTINE SPLDIF3_H