source: trunk/LMDZ.MARS/libf/phymars/phys_state_var_init.F @ 1246

Last change on this file since 1246 was 1246, checked in by aslmd, 11 years ago

LMDZ.MARS. Made number of scatterers a free dimension not in need to be prescribe at compiling time. Instead it must be set in callphys.def. See README for further information about this commit.

File size: 2.3 KB
Line 
1      SUBROUTINE phys_state_var_init(ngrid,nlayer,nq
2     .               ,pdaysec,ptimestep,prad,pg,pr,pcpp)
3
4!=======================================================================
5!
6!   purpose:
7!   -------
8!
9!   Allocate arrays in modules
10!   Fill geometrical arrays
11!   Fill a first set of physical constants
12!   -- was done previously in inifis
13!
14!=======================================================================
15!   
16!   authors: Ehouarn Millour and Aymeric Spiga
17!            14/04/2014
18!
19!   arguments:
20!   ----------
21!
22!   input:
23!   ------
24!
25!    ngrid                 Size of the horizontal grid.
26!    nlayer                Number of vertical layers.
27!    nq                    Number of tracers.
28!
29!=======================================================================
30
31      use slope_mod, only: ini_slope_mod
32      use comsaison_h, only: ini_comsaison_h
33      use surfdat_h, only: ini_surfdat_h
34      use comgeomfi_h, only: ini_comgeomfi_h
35      use comsoil_h, only: ini_comsoil_h
36      use dimradmars_mod, only: ini_dimradmars_mod
37      use yomlw_h, only: ini_yomlw_h
38      use conc_mod, only: ini_conc_mod
39      use turb_mod, only: ini_turb_mod
40      use comcstfi_h, only: pi,rad,cpp,g,r,rcp,daysec,dtphys
41      use tracer_mod, only: nqmx
42
43      IMPLICIT NONE
44     
45      INTEGER,INTENT(IN) :: ngrid,nlayer,nq
46      REAL,INTENT(IN) :: pdaysec,ptimestep,prad,pg,pr,pcpp
47      EXTERNAL SSUM
48      REAL SSUM
49
50      ! set dimension in tracer_mod
51      nqmx=nq
52
53      ! set parameters in comcstfi_h
54      pi=2.*asin(1.)
55      rad=prad
56      cpp=pcpp
57      g=pg
58      r=pr
59      rcp=r/cpp
60      daysec=pdaysec
61      dtphys=ptimestep
62
63      ! allocate "slope_mod" arrays
64      call ini_slope_mod(ngrid)
65
66      ! allocate "comsaison_h" arrays
67      call ini_comsaison_h(ngrid)
68
69      ! allocate "surfdat_h" arrays
70      call ini_surfdat_h(ngrid,nq)
71
72      ! allocate "comgeomfi_h" arrays
73      call ini_comgeomfi_h(ngrid)
74
75      ! allocate "comsoil_h" arrays
76      call ini_comsoil_h(ngrid)
77
78      ! set some variables in "dimradmars_mod"
79      call ini_dimradmars_mod(ngrid,nlayer)
80
81      ! allocate arrays in "yomlw_h"
82      call ini_yomlw_h(ngrid)
83
84      ! allocate arrays in "conc_mod" (aeronomars)
85      call ini_conc_mod(ngrid,nlayer)
86
87      ! allocate arrays in "turb_mod"
88      call ini_turb_mod(ngrid,nlayer)
89
90      END SUBROUTINE phys_state_var_init
Note: See TracBrowser for help on using the repository browser.