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 |
---|
37 | use comsaison_h, only: ini_comsaison_h |
---|
38 | use surfdat_h, only: ini_surfdat_h |
---|
39 | use comgeomfi_h, only: ini_comgeomfi_h |
---|
40 | use comsoil_h, only: ini_comsoil_h |
---|
41 | use dimradmars_mod, only: ini_dimradmars_mod |
---|
42 | use yomlw_h, only: ini_yomlw_h |
---|
43 | use conc_mod, only: ini_conc_mod |
---|
44 | use turb_mod, only: ini_turb_mod |
---|
45 | use comcstfi_h, only: pi,rad,cpp,g,r,rcp |
---|
46 | use tracer_mod, only: ini_tracer_mod |
---|
47 | use time_phylmdz_mod, only: init_time |
---|
48 | |
---|
49 | IMPLICIT NONE |
---|
50 | |
---|
51 | INTEGER,INTENT(IN) :: ngrid,nlayer,nq |
---|
52 | CHARACTER(len=*),INTENT(IN) :: tname(nq) |
---|
53 | INTEGER,INTENT(IN) :: day_ini |
---|
54 | REAL,INTENT(IN) :: hour_ini |
---|
55 | REAL,INTENT(IN) :: pdaysec,ptimestep,prad,pg,pr,pcpp |
---|
56 | |
---|
57 | ! set dimension and allocate arrays in tracer_mod |
---|
58 | call ini_tracer_mod(nq,tname) |
---|
59 | |
---|
60 | ! set parameters in comcstfi_h |
---|
61 | pi=2.*asin(1.) |
---|
62 | rad=prad |
---|
63 | cpp=pcpp |
---|
64 | g=pg |
---|
65 | r=pr |
---|
66 | rcp=r/cpp |
---|
67 | |
---|
68 | ! Initialize some "temporal and calendar" related variables |
---|
69 | call init_time(day_ini,hour_ini,pdaysec,ptimestep) |
---|
70 | |
---|
71 | ! allocate "slope_mod" arrays |
---|
72 | call ini_slope_mod(ngrid) |
---|
73 | |
---|
74 | ! allocate "comsaison_h" arrays |
---|
75 | call ini_comsaison_h(ngrid) |
---|
76 | |
---|
77 | ! allocate "surfdat_h" arrays |
---|
78 | call ini_surfdat_h(ngrid,nq) |
---|
79 | |
---|
80 | ! allocate "comgeomfi_h" arrays |
---|
81 | call ini_comgeomfi_h(ngrid) |
---|
82 | |
---|
83 | ! allocate "comsoil_h" arrays |
---|
84 | call ini_comsoil_h(ngrid) |
---|
85 | |
---|
86 | ! set some variables in "dimradmars_mod" |
---|
87 | call ini_dimradmars_mod(ngrid,nlayer) |
---|
88 | |
---|
89 | ! allocate arrays in "yomlw_h" |
---|
90 | call ini_yomlw_h(ngrid) |
---|
91 | |
---|
92 | ! allocate arrays in "conc_mod" (aeronomars) |
---|
93 | call ini_conc_mod(ngrid,nlayer) |
---|
94 | |
---|
95 | ! allocate arrays in "turb_mod" |
---|
96 | call ini_turb_mod(ngrid,nlayer) |
---|
97 | |
---|
98 | END SUBROUTINE phys_state_var_init |
---|
99 | |
---|
100 | END MODULE phys_state_var_init_mod |
---|