source: LMDZ5/trunk/libf/dynphy_lonlat/phymar/iniphysiq_mod.F90 @ 2599

Last change on this file since 2599 was 2599, checked in by Ehouarn Millour, 8 years ago

Update for phymar which should have been done with revision 2315.
Introduce module vertical_layers_mod to store information on the
vertical grid to be used within the physics (rather than including
the dynamics-related comvert.h).
EM

File size: 3.6 KB
Line 
1!
2! $Id: iniphysiq.F 1403 2010-07-01 09:02:53Z fairhead $
3!
4MODULE iniphysiq_mod
5
6CONTAINS
7
8SUBROUTINE iniphysiq(ii,jj,nlayer, &
9                     nbp, communicator, &
10                     punjours, pdayref,ptimestep, &
11                     rlatu,rlatv,rlonu,rlonv,aire,cu,cv,         &
12                     prad,pg,pr,pcpp,iflag_phys)
13  USE dimphy, ONLY: init_dimphy
14  USE inigeomphy_mod, ONLY: inigeomphy
15  USE vertical_layers_mod, ONLY : init_vertical_layers
16  USE infotrac, ONLY: nqtot
17  USE comcstphy, ONLY: rradius, & ! planet radius (m)
18                       rr, & ! recuced gas constant: R/molar mass of atm
19                       rg, & ! gravity
20                       rcpp  ! specific heat of the atmosphere
21  USE infotrac_phy, ONLY: init_infotrac_phy
22  USE nrtype, ONLY: pi
23  IMPLICIT NONE
24  !
25  !=======================================================================
26  !   Initialisation of the physical constants and some positional and
27  !   geometrical arrays for the physics
28  !=======================================================================
29 
30 
31  include "dimensions.h"
32  include "comvert.h"
33  include "iniprint.h"
34
35  REAL,INTENT(IN) :: prad ! radius of the planet (m)
36  REAL,INTENT(IN) :: pg ! gravitational acceleration (m/s2)
37  REAL,INTENT(IN) :: pr ! ! reduced gas constant R/mu
38  REAL,INTENT(IN) :: pcpp ! specific heat Cp
39  REAL,INTENT(IN) :: punjours ! length (in s) of a standard day
40  INTEGER, INTENT (IN) :: nlayer ! number of atmospheric layers
41  INTEGER, INTENT (IN) :: ii ! number of atmospheric coulumns along longitudes
42  INTEGER, INTENT (IN) :: jj  ! number of atompsheric columns along latitudes
43  INTEGER, INTENT(IN) :: nbp ! number of physics columns for this MPI process
44  INTEGER, INTENT(IN) :: communicator ! MPI communicator
45  REAL, INTENT (IN) :: rlatu(jj+1) ! latitudes of the physics grid
46  REAL, INTENT (IN) :: rlatv(jj) ! latitude boundaries of the physics grid
47  REAL, INTENT (IN) :: rlonv(ii+1) ! longitudes of the physics grid
48  REAL, INTENT (IN) :: rlonu(ii+1) ! longitude boundaries of the physics grid
49  REAL, INTENT (IN) :: aire(ii+1,jj+1) ! area of the dynamics grid (m2)
50  REAL, INTENT (IN) :: cu((ii+1)*(jj+1)) ! cu coeff. (u_covariant = cu * u)
51  REAL, INTENT (IN) :: cv((ii+1)*jj) ! cv coeff. (v_covariant = cv * v)
52  INTEGER, INTENT (IN) :: pdayref ! reference day of for the simulation
53  REAL,INTENT(IN) :: ptimestep !physics time step (s)
54  INTEGER,INTENT(IN) :: iflag_phys ! type of physics to be called
55
56  INTEGER :: ibegin,iend,offset
57  INTEGER :: i,j,k
58  CHARACTER (LEN=20) :: modname='iniphysiq'
59  CHARACTER (LEN=80) :: abort_message
60
61
62  ! --> initialize physics distribution, global fields and geometry
63  ! (i.e. things in phy_common or dynphy_lonlat)
64  CALL inigeomphy(ii,jj,nlayer, &
65               nbp, communicator, &
66               rlatu,rlatv, &
67               rlonu,rlonv, &
68               aire,cu,cv)
69
70  ! --> now initialize things specific to the phymar physics package
71 
72!$OMP PARALLEL
73
74  ! copy over preff , ap(), bp(), etc
75  CALL init_vertical_layers(nlayer,preff,scaleheight, &
76                            ap,bp,presnivs,pseudoalt)
77
78  ! Initialize tracer names, numbers, etc. for physics
79  CALL init_infotrac_phy(nqtot)
80
81! copy some fundamental parameters to physics
82  rradius=prad
83  rg=pg
84  rr=pr
85  rcpp=pcpp
86
87!$OMP END PARALLEL
88
89!      print*,'ATTENTION !!! TRAVAILLER SUR INIPHYSIQ'
90!      print*,'CONTROLE DES LATITUDES, LONGITUDES, PARAMETRES ...'
91
92! Additional initializations for aquaplanets
93!!$OMP PARALLEL
94!      if (iflag_phys>=100) then
95!        call iniaqua(klon_omp,rlatd,rlond,iflag_phys)
96!      endif
97!!$OMP END PARALLEL
98
99END SUBROUTINE iniphysiq
100
101END MODULE iniphysiq_mod
Note: See TracBrowser for help on using the repository browser.