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 slope_mod, only: ini_slope_mod,end_slope_mod |
---|
37 | use comsaison_h, only: ini_comsaison_h,end_comsaison_h |
---|
38 | use surfdat_h, only: ini_surfdat_h,end_surfdat_h |
---|
39 | use comgeomfi_h, only: ini_comgeomfi_h,end_comgeomfi_h |
---|
40 | use comsoil_h, only: ini_comsoil_h,end_comsoil_h |
---|
41 | use dimradmars_mod, only: ini_dimradmars_mod,end_dimradmars_mod |
---|
42 | use yomlw_h, only: ini_yomlw_h,end_yomlw_h |
---|
43 | use conc_mod, only: ini_conc_mod,end_conc_mod |
---|
44 | use turb_mod, only: ini_turb_mod,end_turb_mod |
---|
45 | use comcstfi_h, only: pi,rad,cpp,g,r,rcp |
---|
46 | use tracer_mod, only: ini_tracer_mod,end_tracer_mod |
---|
47 | use time_phylmdz_mod, only: init_time |
---|
48 | use co2cloud_mod, only: ini_co2cloud,end_co2cloud |
---|
49 | use rocketduststorm_mod, only: ini_rocketduststorm_mod, & |
---|
50 | end_rocketduststorm_mod |
---|
51 | use topmons_mod, only: ini_topmons_mod, & |
---|
52 | end_topmons_mod |
---|
53 | use calchim_mod, only: ini_calchim_mod,end_calchim_mod |
---|
54 | use watercloud_mod, only: ini_watercloud_mod, & |
---|
55 | end_watercloud_mod |
---|
56 | |
---|
57 | IMPLICIT NONE |
---|
58 | |
---|
59 | INTEGER,INTENT(IN) :: ngrid,nlayer,nq |
---|
60 | CHARACTER(len=*),INTENT(IN) :: tname(nq) |
---|
61 | INTEGER,INTENT(IN) :: day_ini |
---|
62 | REAL,INTENT(IN) :: hour_ini |
---|
63 | REAL,INTENT(IN) :: pdaysec,ptimestep,prad,pg,pr,pcpp |
---|
64 | |
---|
65 | ! set dimension and allocate arrays in tracer_mod |
---|
66 | call end_tracer_mod |
---|
67 | call ini_tracer_mod(nq,tname) |
---|
68 | |
---|
69 | ! set parameters in comcstfi_h |
---|
70 | pi=2.*asin(1.) |
---|
71 | rad=prad |
---|
72 | cpp=pcpp |
---|
73 | g=pg |
---|
74 | r=pr |
---|
75 | rcp=r/cpp |
---|
76 | |
---|
77 | ! Initialize some "temporal and calendar" related variables |
---|
78 | call init_time(day_ini,hour_ini,pdaysec,ptimestep) |
---|
79 | |
---|
80 | ! allocate "slope_mod" arrays |
---|
81 | call end_slope_mod |
---|
82 | call ini_slope_mod(ngrid) |
---|
83 | |
---|
84 | ! allocate "comsaison_h" arrays |
---|
85 | call end_comsaison_h |
---|
86 | call ini_comsaison_h(ngrid) |
---|
87 | |
---|
88 | ! allocate "surfdat_h" arrays |
---|
89 | call end_surfdat_h |
---|
90 | call ini_surfdat_h(ngrid,nq) |
---|
91 | |
---|
92 | ! allocate "comgeomfi_h" arrays |
---|
93 | call end_comgeomfi_h |
---|
94 | call ini_comgeomfi_h(ngrid) |
---|
95 | |
---|
96 | ! allocate "comsoil_h" arrays |
---|
97 | call end_comsoil_h |
---|
98 | call ini_comsoil_h(ngrid) |
---|
99 | |
---|
100 | ! set some variables in "dimradmars_mod" |
---|
101 | call end_dimradmars_mod |
---|
102 | call ini_dimradmars_mod(ngrid,nlayer) |
---|
103 | |
---|
104 | ! allocate arrays in "yomlw_h" |
---|
105 | call end_yomlw_h |
---|
106 | call ini_yomlw_h(ngrid) |
---|
107 | |
---|
108 | ! allocate arrays in "conc_mod" (aeronomars) |
---|
109 | call end_conc_mod |
---|
110 | call ini_conc_mod(ngrid,nlayer) |
---|
111 | |
---|
112 | ! allocate arrays in "turb_mod" |
---|
113 | call end_turb_mod |
---|
114 | call ini_turb_mod(ngrid,nlayer) |
---|
115 | |
---|
116 | ! allocate arrays in "co2cloud" : |
---|
117 | ! Memory of the origin of the co2 particles |
---|
118 | call end_co2cloud |
---|
119 | call ini_co2cloud(ngrid,nlayer) |
---|
120 | |
---|
121 | ! allocate arrays in "rocketduststorm_mod": |
---|
122 | call end_rocketduststorm_mod |
---|
123 | call ini_rocketduststorm_mod(ngrid) |
---|
124 | |
---|
125 | ! allocate arrays in "topmons_mod": |
---|
126 | call end_topmons_mod |
---|
127 | call ini_topmons_mod(ngrid,nlayer) |
---|
128 | |
---|
129 | ! allocate arrays in "calchim_mod" (aeronomars) |
---|
130 | call end_calchim_mod |
---|
131 | call ini_calchim_mod(ngrid,nlayer,nq) |
---|
132 | |
---|
133 | ! allocate arrays in "watercloud_mod" |
---|
134 | call end_watercloud_mod |
---|
135 | call ini_watercloud_mod(ngrid,nlayer,nq) |
---|
136 | |
---|
137 | END SUBROUTINE phys_state_var_init |
---|
138 | |
---|
139 | END MODULE phys_state_var_init_mod |
---|