source: trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/iniphysiq_mod.F90 @ 1677

Last change on this file since 1677 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.5 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 control_mod, only: nday
13use surf_heat_transp_mod, only: ini_surf_heat_transp
14use infotrac, only : nqtot ! number of advected tracers
15use planete_mod, only: ini_planete_mod
16USE comvert_mod, ONLY: ap,bp,preff
17use inifis_mod, only: inifis
18use ioipsl_getin_p_mod, only: getin_p
19
20use inigeomphy_mod, only: inigeomphy
21use geometry_mod, only: cell_area, & ! physics grid area (m2)
22                        longitude, & ! longitudes (rad)
23                        latitude ! latitudes (rad)
24! necessary to get klon_omp
25USE mod_phys_lmdz_para, ONLY: klon_omp ! number of columns (on local omp grid)
26USE dimphy, ONLY: init_dimphy
27
28implicit none
29include "dimensions.h"
30include "paramet.h"
31include "comgeom.h"
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
55logical :: ok_slab_ocean
56
57  ! the common part for all planetary physics
58  !------------------------------------------
59  ! --> initialize physics distribution, global fields and geometry
60  ! (i.e. things in phy_common or dynphy_lonlat)
61  CALL inigeomphy(ii,jj,nlayer, &
62               nbp, communicator, &
63               rlatudyn,rlatvdyn, &
64               rlonudyn,rlonvdyn, &
65               airedyn,cudyn,cvdyn)
66
67  ! the distinct part for all planetary physics (ie. things in phystd)
68  !------------------------------------------
69
70!$OMP PARALLEL
71
72! copy some fundamental parameters to physics
73! and do some initializations
74
75! Initialize dimphy module
76call init_dimphy(klon_omp,nlayer)
77
78! copy over preff , ap() and bp()
79call ini_planete_mod(nlayer,preff,ap,bp)
80
81! for slab ocean, copy over some arrays
82ok_slab_ocean=.false. ! default value
83call getin_p("ok_slab_ocean",ok_slab_ocean)
84if (ok_slab_ocean) then
85  call ini_surf_heat_transp(ip1jm,ip1jmp1,unsairez,fext,unsaire, &
86                            cu,cuvsurcv,cv,cvusurcu,aire,apoln,apols, &
87                            aireu,airev)
88endif
89
90call inifis(klon_omp,nlayer,nqtot,pdayref,punjours,nday,ptimestep, &
91            latitude,longitude,cell_area,prad,pg,pr,pcpp)
92
93
94!$OMP END PARALLEL
95
96end subroutine iniphysiq
97
98
99END MODULE iniphysiq_mod
Note: See TracBrowser for help on using the repository browser.