NCEPLIBS-w3emc  2.11.0
w3fa06.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Calculation of the lifted index.
3 C> @author James Howcroft @date 1978-07-01
4 
5 C> Given the pressure,temperature and relative humidity of
6 C> an air parcel at some point in the atmosphere, calculate the
7 C> lifted index of the parcel. Lifted index is defined as the
8 C> temperature difference between the observed 500mb temperature and
9 C> the supposed temperature that the parcel would obtain if it were
10 C> lifted dry-adiabatically to saturation and then moved moist
11 C> adiabatically to the 500mb level.
12 C>
13 C> Program history log:
14 C> - James Howcroft 1978-07-01
15 C> - Ralph Jones 1989-01-24 Change to microsoft fortran 4.10.
16 C> - Ralph Jones 1990-06-08 Change to sun fortran 1.3.
17 C> - Ralph Jones 1991-03-29 Convert to silicongraphics fortran.
18 C> - Ralph Jones 1993-03-29 Add save statement.
19 C> - Ralph Jones 1995-09-25 Put in w3 library on cray.
20 C>
21 C> @param[in] P Parcel pressure in millibars.
22 C> @param[in] T Parcel temperataure in degrees celsius.
23 C> @param[in] RH Parcel relative humidity in percent.
24 C> @param[in] T5 Temperature at the 500mb level in deg. celsius.
25 C> @param[out] TLI Lifted index in degrees celsius
26 C> tli = 9.9999 iteration diverges; return to user program.
27 C>
28 C> @author James Howcroft @date 1978-07-01
29  SUBROUTINE w3fa06 (P,T,RH,T5,TLI)
30 C
31  SAVE
32 C
33  DATA eps /0.5/
34  DATA kout / 6/
35 C
36  300 FORMAT (' *** ITERATION NOT CONVERGING IN W3FA06 ***')
37  350 FORMAT (' INPUT PARAMS ARE:',4f15.8,/
38  1 ' CALCULATIONS ARE',7e15.8)
39 C
40  potemp(t,p) = (t+273.16)*((1000./p)**0.2857)
41 C
42  eep(t,p,es) = exp((596.73-0.601*t)*((0.622*es)/(p-es))
43  1 / (0.24*(t+273.16)))
44 C
45  unpot(te,p) = (((p/1000.)**0.2857)*te)-273.16
46 C
47  vapres(t) = 6.11*exp(17.2694*t/(t+237.3))
48 C
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
55 C LCL IS ABOVE THE 500MB LVL
56  tli = t5 - unpot((potemp(tlcl,plcl)),500.)
57  GO TO 80
58  30 CONTINUE
59 C USE STACKPOLE ALGORITHM (JAM VOL 6/1967 PP 464-7) TO FIND TGES
60 C 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)
64 C THETA IS THE PSEUDO-EQUIV POTENTIAL TEMP THRU (PLCL,TLCL).
65 C NOW FIND TEMP WHERE THETA INTERSECTS 500MB SFC.
66 C INITIALIZE FOR STACKPOLIAN ITERATION
67  tges = t5
68  dtt = 10.
69  piin = 1./(0.5**0.2857)
70  a = 0.
71  istp = 0
72 C 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
86 C 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
92 C
93  50 CONTINUE
94 C 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