source: trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/iniphysiq_mod.F90 @ 1593

Last change on this file since 1593 was 1573, checked in by emillour, 8 years ago

All GCMS:
Cleanup concerning iniphysiq/inigeomphy initializations: initializations
related to routines in phy_common or dynphy_lonlat can be done in
inigeomphy, but any initialization for modules/routines in a physics
package (directory phy*) must be done in the related phy*/iniphysiq
routine.
EM

File size: 3.3 KB
Line 
1MODULE iniphysiq_mod
2
3CONTAINS
4
5subroutine iniphysiq(ii,jj,nlayer, &
6                     nbp, communicator, &
7                     punjours, pdayref,ptimestep, &
8                     rlatudyn,rlatvdyn,rlonudyn,rlonvdyn, &
9                     airedyn,cudyn,cvdyn, &
10                     prad,pg,pr,pcpp,iflag_phys)
11
12use infotrac, only : nqtot ! number of advected tracers
13use comgeomfi_h, only: ini_fillgeom
14use temps_mod, only: day_ini, hour_ini
15use phys_state_var_init_mod, only: phys_state_var_init
16use inigeomphy_mod, only: inigeomphy
17use geometry_mod, only: cell_area, & ! physics grid area (m2)
18                        longitude, & ! longitudes (rad)
19                        latitude ! latitudes (rad)
20! necessary to get klon_omp
21USE mod_phys_lmdz_para, ONLY: klon_omp ! number of columns (on local omp grid)
22USE dimphy, ONLY: init_dimphy
23
24implicit none
25
26include "iniprint.h"
27
28real,intent(in) :: prad ! radius of the planet (m)
29real,intent(in) :: pg ! gravitational acceleration (m/s2)
30real,intent(in) :: pr ! ! reduced gas constant R/mu
31real,intent(in) :: pcpp ! specific heat Cp
32real,intent(in) :: punjours ! length (in s) of a standard day
33integer,intent(in) :: nlayer ! number of atmospheric layers
34integer,intent(in) :: ii ! number of atmospheric coulumns along longitudes
35integer,intent(in) :: jj  ! number of atompsheric columns along latitudes
36integer,intent(in) :: nbp ! number of physics columns for this MPI process
37integer,intent(in) :: communicator ! MPI communicator
38real,intent(in) :: rlatudyn(jj+1) ! latitudes of the physics grid
39real,intent(in) :: rlatvdyn(jj) ! latitude boundaries of the physics grid
40real,intent(in) :: rlonvdyn(ii+1) ! longitudes of the physics grid
41real,intent(in) :: rlonudyn(ii+1) ! longitude boundaries of the physics grid
42real,intent(in) :: airedyn(ii+1,jj+1) ! area of the dynamics grid (m2)
43real,intent(in) :: cudyn((ii+1)*(jj+1)) ! cu coeff. (u_covariant = cu * u)
44real,intent(in) :: cvdyn((ii+1)*jj) ! cv coeff. (v_covariant = cv * v)
45integer,intent(in) :: pdayref ! reference day of for the simulation
46real,intent(in) :: ptimestep !physics time step (s)
47integer,intent(in) :: iflag_phys ! type of physics to be called
48
49  ! the common part for all planetary physics
50  !------------------------------------------
51  ! --> initialize physics distribution, global fields and geometry
52  ! (i.e. things in phy_common or dynphy_lonlat)
53  CALL inigeomphy(ii,jj,nlayer, &
54               nbp, communicator, &
55               rlatudyn,rlatvdyn, &
56               rlonudyn,rlonvdyn, &
57               airedyn,cudyn,cvdyn)
58
59  ! the distinct part for all planetary physics (ie. things in phymars)
60  !------------------------------------------
61
62!$OMP PARALLEL
63 
64! copy some fundamental parameters to physics
65! and do some initializations
66
67! Initialize dimphy module
68call init_dimphy(klon_omp,nlayer)
69
70call phys_state_var_init(klon_omp,nlayer,nqtot, &
71                         day_ini,hour_ini,punjours,ptimestep, &
72                         prad,pg,pr,pcpp)
73call ini_fillgeom(klon_omp,latitude,longitude,cell_area)
74! work is needed to put what is in comgeomfi_h in geometry_mod?
75
76call conf_phys(klon_omp,nlayer,nqtot)
77
78! Initialize some "temporal and calendar" related variables
79!CALL init_time(day_ini,hour_ini,punjours,ptimestep)
80
81!$OMP END PARALLEL
82
83end subroutine iniphysiq
84
85
86END MODULE iniphysiq_mod
Note: See TracBrowser for help on using the repository browser.