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

Last change on this file since 1775 was 1773, checked in by aslmd, 8 years ago

LMDZ.MARS setting the stage for maybe fixing nesting in the LMD_MM_MARS 2. deallocate before allocating in phys_state_var_init_mod; no impact on regular runs (useless); important for nesting; c'est peut etre un detail pour vous mais pour moi ca veut dire beaucoup.

File size: 3.1 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
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 end_tracer_mod
59      call ini_tracer_mod(nq,tname)
60
61      ! set parameters in comcstfi_h
62      pi=2.*asin(1.)
63      rad=prad
64      cpp=pcpp
65      g=pg
66      r=pr
67      rcp=r/cpp
68
69      ! Initialize some "temporal and calendar" related variables
70      call init_time(day_ini,hour_ini,pdaysec,ptimestep)
71
72      ! allocate "slope_mod" arrays
73      call end_slope_mod
74      call ini_slope_mod(ngrid)
75
76      ! allocate "comsaison_h" arrays
77      call end_comsaison_h
78      call ini_comsaison_h(ngrid)
79
80      ! allocate "surfdat_h" arrays
81      call end_surfdat_h
82      call ini_surfdat_h(ngrid,nq)
83
84      ! allocate "comgeomfi_h" arrays
85      call end_comgeomfi_h
86      call ini_comgeomfi_h(ngrid)
87
88      ! allocate "comsoil_h" arrays
89      call end_comsoil_h
90      call ini_comsoil_h(ngrid)
91
92      ! set some variables in "dimradmars_mod"
93      call end_dimradmars_mod
94      call ini_dimradmars_mod(ngrid,nlayer)
95
96      ! allocate arrays in "yomlw_h"
97      call end_yomlw_h
98      call ini_yomlw_h(ngrid)
99
100      ! allocate arrays in "conc_mod" (aeronomars)
101      call end_conc_mod
102      call ini_conc_mod(ngrid,nlayer)
103
104      ! allocate arrays in "turb_mod"
105      call end_turb_mod
106      call ini_turb_mod(ngrid,nlayer)
107
108      END SUBROUTINE phys_state_var_init
109
110END MODULE phys_state_var_init_mod
Note: See TracBrowser for help on using the repository browser.