NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3fa09.f
Go to the documentation of this file.
1C> @file
2C> @brief Temperature to saturation vapor pressure.
3C> @author P. Chase @date 1978-10-01
4
5C> Computes saturation vapor pressure in kilopascals given temperataure in kelvins.
6C>
7C> Program history log:
8C> - P. Chase 1978-10-01 P.CHASE
9C> - Ralph Jones 1984-06-26 Change to ibm vs fortran.
10C> - Ralph Jones 1984-06-26 Change to microsoft fortran 4.10.
11C> - Ralph Jones 1990-06-08 Change to sun fortran 1.3.
12C> - Ralph Jones 1991-03-29 Convert to silicongraphic fortran.
13C> - Ralph Jones 1993-03-29 Add save statement.
14C> - Ralph Jones 1995-09-25 Change tk to cray 64 bit real, change double.
15C> precision to cray 64 bit real.
16C>
17C> @param[in] TK REAL*8 Temperature in kelvins. if tk < 223.16, the value
18C> 223.16 will be used. if tk > 323.16, the value 323.16
19C> will be used as the argument. 'tk' itself is unchanged.
20C> @return VP Saturation vapor pressure in kilopascals 0.0063558 < VP < 12.3395.
21C>
22C> @note W3FA09 may be declared real*8 so that a real*8 value is
23C> returned, but no increase in accuracy is implied.
24C>
25C> @author P. Chase @date 1978-10-01
26 REAL function w3fa09 (tk)
27C
28C THE CHEBYSHEV COEFFICIENTS ARE IN ARRAY C, LOW-ORDER TERM FIRST.
29C
30 REAL c(9)
31 REAL arg,h0,h1,h2
32C
33 SAVE
34C
35 DATA c /
36 & 0.313732865927e+01, 0.510038215244e+01, 0.277816535655e+01,
37 & 0.102673379933e+01, 0.254577145215e+00, 0.396055201295e-01,
38 & 0.292209288468e-02,-0.119497199712e-03,-0.352745603496e-04/
39C
40C SCALE TK TO RANGE -2, +2 FOR SERIES EVALUATION. INITIALIZE TERMS.
41C
42 arg = -1.09264e1+4.0e-2*amax1(223.16,amin1(323.16,tk))
43 h0 = 0.0
44 h1 = 0.0
45C
46C EVALUATE CHEBYSHEV POLYNOMIAL
47C
48 DO 10 i=1,9
49 h2 = h1
50 h1 = h0
51 h0 = arg * h1 - h2 + c(10-i)
52 10 CONTINUE
53 w3fa09 = 0.5 * (c(1) - h2 + h0)
54 RETURN
55 END
real function w3fa09(tk)
Computes saturation vapor pressure in kilopascals given temperataure in kelvins.
Definition w3fa09.f:27