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

Last change on this file since 2156 was 1974, checked in by mvals, 6 years ago

Mars GCM:
Integration of the detached dust layer parametrizations (rocket dust storm, slope wind lifting, CW, and dust injection scheme, DB).
Still experimental, default behaviour (rdstorm=.false., dustinjection=0) identical to previous revision.
NB: Updated newstart requires an updated "surface.nc" containing the "hmons" field.
EM+MV

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