1 | MODULE phys_state_var_init_mod |
---|
2 | |
---|
3 | CONTAINS |
---|
4 | |
---|
5 | SUBROUTINE phys_state_var_init(ngrid,nlayer,nq,tname, & |
---|
6 | day_ini,hour_ini,pdaysec,ptimestep, & |
---|
7 | prad,pg,pr,pcpp) |
---|
8 | |
---|
9 | !======================================================================= |
---|
10 | ! |
---|
11 | ! purpose: |
---|
12 | ! ------- |
---|
13 | ! |
---|
14 | ! Allocate arrays in modules |
---|
15 | ! Fill geometrical arrays |
---|
16 | ! Fill a first set of physical constants |
---|
17 | ! -- was done previously in inifis |
---|
18 | ! |
---|
19 | !======================================================================= |
---|
20 | ! |
---|
21 | ! authors: Ehouarn Millour and Aymeric Spiga |
---|
22 | ! 14/04/2014 |
---|
23 | ! |
---|
24 | ! arguments: |
---|
25 | ! ---------- |
---|
26 | ! |
---|
27 | ! input: |
---|
28 | ! ------ |
---|
29 | ! |
---|
30 | ! ngrid Size of the horizontal grid. |
---|
31 | ! nlayer Number of vertical layers. |
---|
32 | ! nq Number of tracers. |
---|
33 | ! |
---|
34 | !======================================================================= |
---|
35 | |
---|
36 | use init_print_control_mod, only: init_print_control |
---|
37 | use slope_mod, only: ini_slope_mod,end_slope_mod |
---|
38 | use comsaison_h, only: ini_comsaison_h,end_comsaison_h |
---|
39 | use surfdat_h, only: ini_surfdat_h,end_surfdat_h |
---|
40 | use comgeomfi_h, only: ini_comgeomfi_h,end_comgeomfi_h |
---|
41 | use comsoil_h, only: ini_comsoil_h,end_comsoil_h |
---|
42 | use dimradmars_mod, only: ini_dimradmars_mod,end_dimradmars_mod |
---|
43 | use yomlw_h, only: ini_yomlw_h,end_yomlw_h |
---|
44 | use conc_mod, only: ini_conc_mod,end_conc_mod |
---|
45 | use turb_mod, only: ini_turb_mod,end_turb_mod |
---|
46 | use comcstfi_h, only: pi,rad,cpp,g,r,rcp |
---|
47 | use tracer_mod, only: ini_tracer_mod,end_tracer_mod |
---|
48 | use time_phylmdz_mod, only: init_time |
---|
49 | use co2cloud_mod, only: ini_co2cloud,end_co2cloud |
---|
50 | use rocketduststorm_mod, only: ini_rocketduststorm_mod, & |
---|
51 | end_rocketduststorm_mod |
---|
52 | use topmons_mod, only: ini_topmons_mod, & |
---|
53 | end_topmons_mod |
---|
54 | use calchim_mod, only: ini_calchim_mod,end_calchim_mod |
---|
55 | use watercloud_mod, only: ini_watercloud_mod, & |
---|
56 | end_watercloud_mod |
---|
57 | use nonoro_gwd_ran_mod, only: ini_nonoro_gwd_ran, & |
---|
58 | end_nonoro_gwd_ran |
---|
59 | |
---|
60 | IMPLICIT NONE |
---|
61 | |
---|
62 | INTEGER,INTENT(IN) :: ngrid,nlayer,nq |
---|
63 | CHARACTER(len=*),INTENT(IN) :: tname(nq) |
---|
64 | INTEGER,INTENT(IN) :: day_ini |
---|
65 | REAL,INTENT(IN) :: hour_ini |
---|
66 | REAL,INTENT(IN) :: pdaysec,ptimestep,prad,pg,pr,pcpp |
---|
67 | |
---|
68 | ! set dimension and allocate arrays in tracer_mod |
---|
69 | call end_tracer_mod |
---|
70 | call ini_tracer_mod(nq,tname) |
---|
71 | |
---|
72 | |
---|
73 | ! initialize "print_control" constants/flags ("prt_level","lunout", etc.) |
---|
74 | call init_print_control |
---|
75 | |
---|
76 | ! set parameters in comcstfi_h |
---|
77 | pi=2.*asin(1.) |
---|
78 | rad=prad |
---|
79 | cpp=pcpp |
---|
80 | g=pg |
---|
81 | r=pr |
---|
82 | rcp=r/cpp |
---|
83 | |
---|
84 | ! Initialize some "temporal and calendar" related variables |
---|
85 | call init_time(day_ini,hour_ini,pdaysec,ptimestep) |
---|
86 | |
---|
87 | ! allocate "slope_mod" arrays |
---|
88 | call end_slope_mod |
---|
89 | call ini_slope_mod(ngrid) |
---|
90 | |
---|
91 | ! allocate "comsaison_h" arrays |
---|
92 | call end_comsaison_h |
---|
93 | call ini_comsaison_h(ngrid) |
---|
94 | |
---|
95 | ! allocate "surfdat_h" arrays |
---|
96 | call end_surfdat_h |
---|
97 | call ini_surfdat_h(ngrid,nq) |
---|
98 | |
---|
99 | ! allocate "comgeomfi_h" arrays |
---|
100 | call end_comgeomfi_h |
---|
101 | call ini_comgeomfi_h(ngrid) |
---|
102 | |
---|
103 | ! allocate "comsoil_h" arrays |
---|
104 | call end_comsoil_h |
---|
105 | call ini_comsoil_h(ngrid) |
---|
106 | |
---|
107 | ! set some variables in "dimradmars_mod" |
---|
108 | call end_dimradmars_mod |
---|
109 | call ini_dimradmars_mod(ngrid,nlayer) |
---|
110 | |
---|
111 | ! allocate arrays in "yomlw_h" |
---|
112 | call end_yomlw_h |
---|
113 | call ini_yomlw_h(ngrid) |
---|
114 | |
---|
115 | ! allocate arrays in "conc_mod" (aeronomars) |
---|
116 | call end_conc_mod |
---|
117 | call ini_conc_mod(ngrid,nlayer) |
---|
118 | |
---|
119 | ! allocate arrays in "turb_mod" |
---|
120 | call end_turb_mod |
---|
121 | call ini_turb_mod(ngrid,nlayer) |
---|
122 | |
---|
123 | ! allocate arrays in "co2cloud" : |
---|
124 | ! Memory of the origin of the co2 particles |
---|
125 | call end_co2cloud |
---|
126 | call ini_co2cloud(ngrid,nlayer) |
---|
127 | |
---|
128 | ! allocate arrays in "rocketduststorm_mod": |
---|
129 | call end_rocketduststorm_mod |
---|
130 | call ini_rocketduststorm_mod(ngrid) |
---|
131 | |
---|
132 | ! allocate arrays in "topmons_mod": |
---|
133 | call end_topmons_mod |
---|
134 | call ini_topmons_mod(ngrid,nlayer) |
---|
135 | |
---|
136 | ! allocate arrays in "calchim_mod" (aeronomars) |
---|
137 | call end_calchim_mod |
---|
138 | call ini_calchim_mod(ngrid,nlayer,nq) |
---|
139 | |
---|
140 | ! allocate arrays in "watercloud_mod" |
---|
141 | call end_watercloud_mod |
---|
142 | call ini_watercloud_mod(ngrid,nlayer,nq) |
---|
143 | |
---|
144 | ! allocate arrays in "nonoro_gwd_ran_mod" |
---|
145 | call end_nonoro_gwd_ran |
---|
146 | call ini_nonoro_gwd_ran(ngrid,nlayer) |
---|
147 | |
---|
148 | |
---|
149 | END SUBROUTINE phys_state_var_init |
---|
150 | |
---|
151 | END MODULE phys_state_var_init_mod |
---|