NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3fa06.f
Go to the documentation of this file.
1C> @file
2C> @brief Calculation of the lifted index.
3C> @author James Howcroft @date 1978-07-01
4
5C> Given the pressure,temperature and relative humidity of
6C> an air parcel at some point in the atmosphere, calculate the
7C> lifted index of the parcel. Lifted index is defined as the
8C> temperature difference between the observed 500mb temperature and
9C> the supposed temperature that the parcel would obtain if it were
10C> lifted dry-adiabatically to saturation and then moved moist
11C> adiabatically to the 500mb level.
12C>
13C> Program history log:
14C> - James Howcroft 1978-07-01
15C> - Ralph Jones 1989-01-24 Change to microsoft fortran 4.10.
16C> - Ralph Jones 1990-06-08 Change to sun fortran 1.3.
17C> - Ralph Jones 1991-03-29 Convert to silicongraphics fortran.
18C> - Ralph Jones 1993-03-29 Add save statement.
19C> - Ralph Jones 1995-09-25 Put in w3 library on cray.
20C>
21C> @param[in] P Parcel pressure in millibars.
22C> @param[in] T Parcel temperataure in degrees celsius.
23C> @param[in] RH Parcel relative humidity in percent.
24C> @param[in] T5 Temperature at the 500mb level in deg. celsius.
25C> @param[out] TLI Lifted index in degrees celsius
26C> tli = 9.9999 iteration diverges; return to user program.
27C>
28C> @author James Howcroft @date 1978-07-01
29 SUBROUTINE w3fa06 (P,T,RH,T5,TLI)
30C
31 SAVE
32C
33 DATA eps /0.5/
34 DATA kout / 6/
35C
36 300 FORMAT (' *** ITERATION NOT CONVERGING IN W3FA06 ***')
37 350 FORMAT (' INPUT PARAMS ARE:',4f15.8,/
38 1 ' CALCULATIONS ARE',7e15.8)
39C
40 potemp(t,p) = (t+273.16)*((1000./p)**0.2857)
41C
42 eep(t,p,es) = exp((596.73-0.601*t)*((0.622*es)/(p-es))
43 1 / (0.24*(t+273.16)))
44C
45 unpot(te,p) = (((p/1000.)**0.2857)*te)-273.16
46C
47 vapres(t) = 6.11*exp(17.2694*t/(t+237.3))
48C
49 CALL w3fa01 (p,t,rh,td,plcl,tlcl)
50 IF (plcl .GT. 500.) GO TO 30
51 IF (plcl .LT. 500.) GO TO 20
52 tli = t5 - tlcl
53 GO TO 80
54 20 CONTINUE
55C LCL IS ABOVE THE 500MB LVL
56 tli = t5 - unpot((potemp(tlcl,plcl)),500.)
57 GO TO 80
58 30 CONTINUE
59C USE STACKPOLE ALGORITHM (JAM VOL 6/1967 PP 464-7) TO FIND TGES
60C SO THAT (TGES,500) IS ON SAME MOIST ADIABAT AS (TLCL,PLCL).
61 es = vapres(tlcl)
62 thd = potemp(tlcl,(plcl-es))
63 theta = thd * eep(tlcl,plcl,es)
64C THETA IS THE PSEUDO-EQUIV POTENTIAL TEMP THRU (PLCL,TLCL).
65C NOW FIND TEMP WHERE THETA INTERSECTS 500MB SFC.
66C INITIALIZE FOR STACKPOLIAN ITERATION
67 tges = t5
68 dtt = 10.
69 piin = 1./(0.5**0.2857)
70 a = 0.
71 istp = 0
72C START ITERATION.
73 40 CONTINUE
74 istp = istp + 1
75 IF (istp .GT. 200) GO TO 50
76 sva = vapres(tges)
77 ax = a
78 a = (tges+273.16)*piin * eep(tges,500.,sva) - theta
79 IF (abs(a) .LT. eps) GO TO 70
80 dtt = dtt * 0.5
81 IF (a*ax.LT.0.0) dtt = -dtt
82 tp = tges + dtt
83 sva = vapres(tp)
84 ap = (tp+273.16)*piin * eep(tp,500.,sva) - theta
85 IF (abs(ap) .LT. eps) GO TO 60
86C FIND NEXT ESTIMATE, DTT IS ADJUSTMENT FROM OLD TO NEW TGES.
87 dtt = a*dtt/(a-ap)
88 IF (abs(dtt).LT.0.01) dtt = sign(0.01,dtt)
89 tges = tges + dtt
90 IF (tges .GT. 50) tges = 50.
91 GO TO 40
92C
93 50 CONTINUE
94C DISASTER SECTION
95 WRITE (kout,300)
96 WRITE (kout,350) p,t,rh,t5,theta,ax,a,ap,tges,tp,sva
97 tli = 9.9999
98 GO TO 80
99 60 CONTINUE
100 tges = tp
101 70 CONTINUE
102 tli = t5 - tges
103 80 CONTINUE
104 RETURN
105 END
subroutine w3fa01(p, t, rh, td, plcl, tlcl)
Given the pressure, temperature and relative humidity of an air parcel at some point in the atmospher...
Definition w3fa01.f:27
subroutine w3fa06(p, t, rh, t5, tli)
Given the pressure,temperature and relative humidity of an air parcel at some point in the atmosphere...
Definition w3fa06.f:30