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

Last change on this file since 1635 was 1621, checked in by emillour, 8 years ago

Further work on full dynamics/physics separation.

LMDZ.COMMON:

  • added phy_common/vertical_layers_mod.F90 to store information on vertical grid. This is where routines in the physics should get the information.
  • The contents of vertical_layers_mod intialized via dynphy_lonlat/inigeomphy_mod.F90.

LMDZ.MARS:

  • physics now completely decoupled from dynamics; the physics package may now be compiled as a library (-libphy option of makelmdz_fcm).
  • created an "ini_tracer_mod" routine in module "tracer_mod" for a cleaner initialization of the later.
  • removed some purely dynamics-related outputs (etot0, zoom parameters, etc.) from diagfi.nc and stats.nc outputs as these informations are not available in the physics.

LMDZ.GENERIC:

  • physics now completely decoupled from dynamics; the physics package may now be compiled as a library (-libphy option of makelmdz_fcm).
  • added nqtot to tracer_h.F90.
  • removed some purely dynamics-related outputs (etot0, zoom parameters, etc.) from diagfi.nc and stats.nc outputs as these informations are not available in the physics.

LMDZ.VENUS:

  • physics now completely decoupled from dynamics; the physics package may now be compiled as a library (-libphy option of makelmdz_fcm).
  • added infotrac_phy.F90 to store information on tracers in the physics. Initialized via iniphysiq.
  • added cpdet_phy_mod.F90 to store t2tpot etc. functions to be used in the physics. Initialized via iniphysiq. IMPORTANT: there are some hard-coded constants! These should match what is in cpdet_mod.F90 in the dynamics.
  • got rid of references to moyzon_mod module within the physics. The required variables (tmoy, plevmoy) are passed to the physics as arguments to physiq.

LMDZ.TITAN:

  • added infotrac_phy.F90 to store information on tracers in the physics. Initialized via iniphysiq.
  • added cpdet_phy_mod.F90 to store t2tpot etc. functions to be used in the physics.
  • Extra work required to completely decouple physics and dynamics: moyzon_mod should be cleaned up and information passed from dynamics to physics as as arguments. Likewise moyzon_ch and moyzon_mu should not be queried from logic_mod (which is in the dynamics).

EM

File size: 2.7 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
37      use comsaison_h, only: ini_comsaison_h
38      use surfdat_h, only: ini_surfdat_h
39      use comgeomfi_h, only: ini_comgeomfi_h
40      use comsoil_h, only: ini_comsoil_h
41      use dimradmars_mod, only: ini_dimradmars_mod
42      use yomlw_h, only: ini_yomlw_h
43      use conc_mod, only: ini_conc_mod
44      use turb_mod, only: ini_turb_mod
45      use comcstfi_h, only: pi,rad,cpp,g,r,rcp
46      use tracer_mod, only: ini_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 ini_tracer_mod(nq,tname)
59
60      ! set parameters in comcstfi_h
61      pi=2.*asin(1.)
62      rad=prad
63      cpp=pcpp
64      g=pg
65      r=pr
66      rcp=r/cpp
67
68      ! Initialize some "temporal and calendar" related variables
69      call init_time(day_ini,hour_ini,pdaysec,ptimestep)
70
71      ! allocate "slope_mod" arrays
72      call ini_slope_mod(ngrid)
73
74      ! allocate "comsaison_h" arrays
75      call ini_comsaison_h(ngrid)
76
77      ! allocate "surfdat_h" arrays
78      call ini_surfdat_h(ngrid,nq)
79
80      ! allocate "comgeomfi_h" arrays
81      call ini_comgeomfi_h(ngrid)
82
83      ! allocate "comsoil_h" arrays
84      call ini_comsoil_h(ngrid)
85
86      ! set some variables in "dimradmars_mod"
87      call ini_dimradmars_mod(ngrid,nlayer)
88
89      ! allocate arrays in "yomlw_h"
90      call ini_yomlw_h(ngrid)
91
92      ! allocate arrays in "conc_mod" (aeronomars)
93      call ini_conc_mod(ngrid,nlayer)
94
95      ! allocate arrays in "turb_mod"
96      call ini_turb_mod(ngrid,nlayer)
97
98      END SUBROUTINE phys_state_var_init
99
100END MODULE phys_state_var_init_mod
Note: See TracBrowser for help on using the repository browser.