NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3fa03v.f
Go to the documentation of this file.
1C> @file
2C> @brief Compute standard height, temp, and pot temp.
3C> @author James McDonell @date 1974-06-01
4
5C> Computes the standard height, temperature, and potential
6C> temperature given the pressure in millibars (>8.68 mb). For
7C> height and temperature the results duplicate the values in the
8C> U.S. standard atmosphere (l962), which is the icao standard
9C> atmosphere to 54.7487 mb (20 km) and the proposed extension to
10C> 8.68 mb (32 km). For potential temperature a value of 2/7 is
11C> used for rd/cp.
12C>
13C> Program history log:
14C> - James McDonell 1974-06-01
15C> - Ralph Jones 1984-06-01 Change to ibm vs fortran.
16C> - Dennis Keyser 1992-06-29 Convert to cray cft77 fortran.
17C> - Ralph Jones 1994-09-13 Vectorized version to do array instead of one word.
18C>
19C> @param[in] PRESS Pressure array in millibars.
20C> @param[out] HEIGHT Height array in meters.
21C> @param[out] TEMP Temperature array in degrees kelvin.
22C> @param[out] THETA Potential temperature array in degrees kelvin.
23C> @param[out] N Number of points in array press.
24C>
25C> @note Not valid for pressures less than 8.68 millibars, declare
26C> all parameters as type real.
27C>
28C> @note Height, temp, theta are now all arrays, you must
29C> have arrays of size n or you will wipe out memory.
30C>
31C> @author James McDonell @date 1974-06-01
32 SUBROUTINE w3fa03v(PRESS,HEIGHT,TEMP,THETA,N)
33C
34 REAL M0
35 REAL HEIGHT(*)
36 REAL PRESS(*)
37 REAL TEMP(*)
38 REAL THETA(*)
39C
40 SAVE
41C
42 DATA g/9.80665/,rstar/8314.32/,m0/28.9644/,piso/54.7487/,
43 $ ziso/20000./,salp/-.0010/,pzero/1013.25/,t0/288.15/,alp/.0065/,
44 $ ptrop/226.321/,tstr/216.65/
45C
46 rovcp = 2.0/7.0
47 r = rstar/m0
48 rovg = r/g
49 fkt = rovg * tstr
50 ar = alp * rovg
51 pp0 = pzero**ar
52 ar1 = salp * rovg
53 pp01 = piso**ar1
54C
55 DO j = 1,n
56 IF (press(j).LT.piso) THEN
57C
58C COMPUTE LAPSE RATE = -.0010 CASES
59C
60 height(j) = ((tstr/(pp01 * salp )) * (pp01-(press(j) ** ar1)))
61 & + ziso
62 temp(j) = tstr - ((height(j) - ziso) * salp)
63C
64 ELSE IF (press(j).GT.ptrop) THEN
65C
66 height(j) = (t0/(pp0 * alp)) * (pp0 - (press(j) ** ar))
67 temp(j) = t0 - (height(j) * alp)
68C
69 ELSE
70C
71C COMPUTE ISOTHERMAL CASES
72C
73 height(j) = 11000.0 + (fkt * alog(ptrop/press(j)))
74 temp(j) = tstr
75C
76 END IF
77 theta(j) = temp(j) * ((1000./press(j))**rovcp)
78 END DO
79C
80 RETURN
81 END
subroutine w3fa03v(press, height, temp, theta, n)
Computes the standard height, temperature, and potential temperature given the pressure in millibars ...
Definition w3fa03v.f:33