1 | SUBROUTINE phys_state_var_init(ngrid |
---|
2 | . ,nlayer,nq,plat,plon,parea |
---|
3 | . ,pdaysec,ptimestep,prad,pg,pr,pcpp) |
---|
4 | |
---|
5 | !======================================================================= |
---|
6 | ! |
---|
7 | ! purpose: |
---|
8 | ! ------- |
---|
9 | ! |
---|
10 | ! Allocate arrays in modules |
---|
11 | ! Fill geometrical arrays |
---|
12 | ! Fill a first set of physical constants |
---|
13 | ! -- was done previously in inifis |
---|
14 | ! |
---|
15 | !======================================================================= |
---|
16 | ! |
---|
17 | ! authors: Ehouarn Millour and Aymeric Spiga |
---|
18 | ! 14/04/2014 |
---|
19 | ! |
---|
20 | ! arguments: |
---|
21 | ! ---------- |
---|
22 | ! |
---|
23 | ! input: |
---|
24 | ! ------ |
---|
25 | ! |
---|
26 | ! ngrid Size of the horizontal grid. |
---|
27 | ! nlayer Number of vertical layers. |
---|
28 | ! nq Number of tracers. |
---|
29 | ! |
---|
30 | !======================================================================= |
---|
31 | |
---|
32 | use slope_mod, only: ini_slope_mod |
---|
33 | use comsaison_h, only: ini_comsaison_h |
---|
34 | use surfdat_h, only: ini_surfdat_h |
---|
35 | use comgeomfi_h, only: ini_comgeomfi_h |
---|
36 | . ,long,lati,area,totarea |
---|
37 | . ,ini_sincosgeom |
---|
38 | use comsoil_h, only: ini_comsoil_h |
---|
39 | use dimradmars_mod, only: ini_dimradmars_mod |
---|
40 | use yomaer_h,only: ini_yomaer_h |
---|
41 | use yomlw_h, only: ini_yomlw_h |
---|
42 | use conc_mod, only: ini_conc_mod |
---|
43 | use turb_mod, only: ini_turb_mod |
---|
44 | use comcstfi_h, only: pi,rad,cpp,g,r,rcp,daysec,dtphys |
---|
45 | use tracer_mod, only: nqmx |
---|
46 | |
---|
47 | IMPLICIT NONE |
---|
48 | |
---|
49 | INTEGER,INTENT(IN) :: ngrid,nlayer,nq |
---|
50 | REAL,INTENT(IN) :: plat(ngrid),plon(ngrid),parea(ngrid) |
---|
51 | REAL,INTENT(IN) :: pdaysec,ptimestep,prad,pg,pr,pcpp |
---|
52 | EXTERNAL SSUM |
---|
53 | REAL SSUM |
---|
54 | |
---|
55 | ! set dimension in tracer_mod |
---|
56 | nqmx=nq |
---|
57 | |
---|
58 | ! set parameters in comcstfi_h |
---|
59 | pi=2.*asin(1.) |
---|
60 | rad=prad |
---|
61 | cpp=pcpp |
---|
62 | g=pg |
---|
63 | r=pr |
---|
64 | rcp=r/cpp |
---|
65 | daysec=pdaysec |
---|
66 | dtphys=ptimestep |
---|
67 | |
---|
68 | ! allocate "slope_mod" arrays |
---|
69 | call ini_slope_mod(ngrid) |
---|
70 | |
---|
71 | ! allocate "comsaison_h" arrays |
---|
72 | call ini_comsaison_h(ngrid) |
---|
73 | |
---|
74 | ! allocate "surfdat_h" arrays |
---|
75 | call ini_surfdat_h(ngrid,nq) |
---|
76 | |
---|
77 | ! allocate "comgeomfi_h" arrays |
---|
78 | call ini_comgeomfi_h(ngrid) |
---|
79 | ! fill "comgeomfi_h" data |
---|
80 | call SCOPY(ngrid,plon,1,long,1) |
---|
81 | call SCOPY(ngrid,plat,1,lati,1) |
---|
82 | call SCOPY(ngrid,parea,1,area,1) |
---|
83 | totarea=SSUM(ngrid,area,1) |
---|
84 | ! create sin cos lat lon arrays |
---|
85 | ! -- previously in comdiurn |
---|
86 | CALL ini_sincosgeom(ngrid) |
---|
87 | |
---|
88 | ! allocate "comsoil_h" arrays |
---|
89 | call ini_comsoil_h(ngrid) |
---|
90 | |
---|
91 | ! set some variables in "dimradmars_mod" |
---|
92 | call ini_dimradmars_mod(ngrid,nlayer) |
---|
93 | |
---|
94 | ! allocate arrays in "yomaer_h" |
---|
95 | call ini_yomaer_h |
---|
96 | |
---|
97 | ! allocate arrays in "yomlw_h" |
---|
98 | call ini_yomlw_h(ngrid) |
---|
99 | |
---|
100 | ! allocate arrays in "conc_mod" (aeronomars) |
---|
101 | call ini_conc_mod(ngrid,nlayer) |
---|
102 | |
---|
103 | ! allocate arrays in "turb_mod" |
---|
104 | call ini_turb_mod(ngrid,nlayer) |
---|
105 | |
---|
106 | END SUBROUTINE phys_state_var_init |
---|