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

Last change on this file since 3336 was 3316, checked in by jbclement, 8 months ago

Mars PCM:
Reversion of r3305 and r3307.
JBC

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