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 | |
---|
50 | IMPLICIT NONE |
---|
51 | |
---|
52 | INTEGER,INTENT(IN) :: ngrid,nlayer,nq |
---|
53 | CHARACTER(len=*),INTENT(IN) :: tname(nq) |
---|
54 | INTEGER,INTENT(IN) :: day_ini |
---|
55 | REAL,INTENT(IN) :: hour_ini |
---|
56 | REAL,INTENT(IN) :: pdaysec,ptimestep,prad,pg,pr,pcpp |
---|
57 | |
---|
58 | ! set dimension and allocate arrays in tracer_mod |
---|
59 | call end_tracer_mod |
---|
60 | call ini_tracer_mod(nq,tname) |
---|
61 | |
---|
62 | ! set parameters in comcstfi_h |
---|
63 | pi=2.*asin(1.) |
---|
64 | rad=prad |
---|
65 | cpp=pcpp |
---|
66 | g=pg |
---|
67 | r=pr |
---|
68 | rcp=r/cpp |
---|
69 | |
---|
70 | ! Initialize some "temporal and calendar" related variables |
---|
71 | call init_time(day_ini,hour_ini,pdaysec,ptimestep) |
---|
72 | |
---|
73 | ! allocate "slope_mod" arrays |
---|
74 | call end_slope_mod |
---|
75 | call ini_slope_mod(ngrid) |
---|
76 | |
---|
77 | ! allocate "comsaison_h" arrays |
---|
78 | call end_comsaison_h |
---|
79 | call ini_comsaison_h(ngrid) |
---|
80 | |
---|
81 | ! allocate "surfdat_h" arrays |
---|
82 | call end_surfdat_h |
---|
83 | call ini_surfdat_h(ngrid,nq) |
---|
84 | |
---|
85 | ! allocate "comgeomfi_h" arrays |
---|
86 | call end_comgeomfi_h |
---|
87 | call ini_comgeomfi_h(ngrid) |
---|
88 | |
---|
89 | ! allocate "comsoil_h" arrays |
---|
90 | call end_comsoil_h |
---|
91 | call ini_comsoil_h(ngrid) |
---|
92 | |
---|
93 | ! set some variables in "dimradmars_mod" |
---|
94 | call end_dimradmars_mod |
---|
95 | call ini_dimradmars_mod(ngrid,nlayer) |
---|
96 | |
---|
97 | ! allocate arrays in "yomlw_h" |
---|
98 | call end_yomlw_h |
---|
99 | call ini_yomlw_h(ngrid) |
---|
100 | |
---|
101 | ! allocate arrays in "conc_mod" (aeronomars) |
---|
102 | call end_conc_mod |
---|
103 | call ini_conc_mod(ngrid,nlayer) |
---|
104 | |
---|
105 | ! allocate arrays in "turb_mod" |
---|
106 | call end_turb_mod |
---|
107 | call ini_turb_mod(ngrid,nlayer) |
---|
108 | |
---|
109 | ! allocate arrays in "co2cloud" : |
---|
110 | ! Memory of the origin of the co2 particles |
---|
111 | call end_co2cloud |
---|
112 | call ini_co2cloud(ngrid,nlayer) |
---|
113 | |
---|
114 | END SUBROUTINE phys_state_var_init |
---|
115 | |
---|
116 | END MODULE phys_state_var_init_mod |
---|