source: LMDZ5/branches/IPSLCM5A2.1/libf/dynphy_lonlat/phymar/iniphysiq_mod.F90 @ 5425

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

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