source: trunk/LMDZ.MARS/libf/phymars/phys_state_var_init_mod.F90 @ 2220

Last change on this file since 2220 was 2220, checked in by dbardet, 5 years ago

Update the nonorographic gravity waves drag parametrization (from the r3599 of Earth s model LMDZ6): 1) add east_ and west_gwdstress variables, 2) delete aleas function: random waves are producted by the MOD function, 3) reproductibility concerning the number of procs is now validated, 4) changing name of some variables like RUW, RVW, ZOP, ZOM,..., 5) tendency of winds due to GW drag are now module variables and written in restart files.

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