1 | #define WRF_PORT |
---|
2 | |
---|
3 | !------------------------------------------------------------------------ |
---|
4 | ! Based on esinti.F90 from CAM |
---|
5 | ! Ported to WRF by William.Gustafson@pnl.gov, Nov. 2009 |
---|
6 | ! Updated to CESM_1_0_1, Nov. 2010 |
---|
7 | !------------------------------------------------------------------------ |
---|
8 | |
---|
9 | #ifdef WRF_PORT |
---|
10 | module module_cam_esinti |
---|
11 | |
---|
12 | implicit none |
---|
13 | |
---|
14 | private |
---|
15 | public esinti |
---|
16 | |
---|
17 | contains |
---|
18 | #endif |
---|
19 | |
---|
20 | subroutine esinti(epslon ,latvap ,latice ,rh2o ,cpair ,tmelt ) |
---|
21 | !----------------------------------------------------------------------- |
---|
22 | ! |
---|
23 | ! Purpose: |
---|
24 | ! Initialize es lookup tables |
---|
25 | ! |
---|
26 | ! Method: |
---|
27 | ! <Describe the algorithm(s) used in the routine.> |
---|
28 | ! <Also include any applicable external references.> |
---|
29 | ! |
---|
30 | ! Author: J. Hack |
---|
31 | ! |
---|
32 | !----------------------------------------------------------------------- |
---|
33 | use shr_kind_mod, only: r8 => shr_kind_r8 |
---|
34 | use wv_saturation, only: gestbl |
---|
35 | implicit none |
---|
36 | !------------------------------Arguments-------------------------------- |
---|
37 | ! |
---|
38 | ! Input arguments |
---|
39 | ! |
---|
40 | real(r8), intent(in) :: epslon ! Ratio of h2o to dry air molecular weights |
---|
41 | real(r8), intent(in) :: latvap ! Latent heat of vaporization |
---|
42 | real(r8), intent(in) :: latice ! Latent heat of fusion |
---|
43 | real(r8), intent(in) :: rh2o ! Gas constant for water vapor |
---|
44 | real(r8), intent(in) :: cpair ! Specific heat of dry air |
---|
45 | real(r8), intent(in) :: tmelt ! Melting point of water (K) |
---|
46 | ! |
---|
47 | !---------------------------Local workspace----------------------------- |
---|
48 | ! |
---|
49 | real(r8) tmn ! Minimum temperature entry in table |
---|
50 | real(r8) tmx ! Maximum temperature entry in table |
---|
51 | real(r8) trice ! Trans range from es over h2o to es over ice |
---|
52 | logical ip ! Ice phase (true or false) |
---|
53 | ! |
---|
54 | !----------------------------------------------------------------------- |
---|
55 | ! |
---|
56 | ! Specify control parameters first |
---|
57 | ! |
---|
58 | #if ( defined WACCM_PHYS) |
---|
59 | tmn = 127.16_r8 |
---|
60 | #else |
---|
61 | tmn = 173.16_r8 |
---|
62 | #endif |
---|
63 | tmx = 375.16_r8 |
---|
64 | trice = 20.00_r8 |
---|
65 | ip = .true. |
---|
66 | ! |
---|
67 | ! Call gestbl to build saturation vapor pressure table. |
---|
68 | ! |
---|
69 | call gestbl(tmn ,tmx ,trice ,ip ,epslon , & |
---|
70 | latvap ,latice ,rh2o ,cpair ,tmelt ) |
---|
71 | ! |
---|
72 | return |
---|
73 | end subroutine esinti |
---|
74 | |
---|
75 | #ifdef WRF_PORT |
---|
76 | end module module_cam_esinti |
---|
77 | #endif |
---|