source: LMDZ6/branches/LMDZ-COSP/libf/phylmd/rrtm/yomgem.F90 @ 3847

Last change on this file since 3847 was 2010, checked in by Laurent Fairhead, 11 years ago

Modifications pour OpenMP


OpenMP modifications

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
File size: 7.5 KB
Line 
1MODULE YOMGEM
2
3USE PARKIND1  ,ONLY : JPIM     ,JPRB
4
5IMPLICIT NONE
6
7SAVE
8
9!     ------------------------------------------------------------------
10
11!*    * Number of grid points
12
13!     NGPTOT   : Total number of grid columns on a PE
14!     NGPTOT_CAP  : Size of grid points arrays for ALADIN
15!     NGPTOTMX : Maximum number of grid columns on any of the PEs
16!     NGPTOTG  : Total number of grid columns on the Globe
17!     NGPTOTL(NPRGPNS,NPRGPEW)  : Total number of grid columns on on eacch PE
18
19INTEGER(KIND=JPIM) :: NGPTOT
20INTEGER(KIND=JPIM) :: NGPTOT_CAP
21INTEGER(KIND=JPIM) :: NGPTOTMX
22INTEGER(KIND=JPIM) :: NGPTOTG
23INTEGER(KIND=JPIM),ALLOCATABLE, TARGET :: NGPTOTL(:,:)
24
25!     ------------------------------------------------------------------
26
27!*    * Defining the transformed sphere
28
29!     RMUCEN : MU OF THE POLE OF STRETCHING
30!     RLOCEN : LONGITUDE OF THE POLE OF STRETCHING
31!     RSTRET : STRETCHING FACTOR
32!     NSTTYP : 1 = POLE OF STRETCHING, POLE OF THE COLLOCATION GRID
33!                 AT THE NORTHERN POLE OF THE REAL EARTH.
34!              2 = THE POLE OF STRETCHING IS ANYWHERE ON THE REAL EARTH
35!             AND ON THE EQUATOR OF THE COLLOCATION GRID ON THE MERIDIAN PI.
36!                  THE EQUATOR OF THE COLLOCATION GRID IS TANGENT
37!             TO A PARALLEL OF THE EARTH.
38
39!     NHTYP  : 0 = regular grid
40!            : 1 = number of points proportional to sqrt(1-mu**2)
41!            : 2 = number of points read on namelist namrgri
42
43!     RNLGINC: increment to get non-linear grid
44
45!     R4JP    inverse de delta(teta) approche a l'ordre 1
46!     RC2P1   RSTRET*RSTRET+1.
47!     RC2M1   RSTRET*RSTRET-1.
48!     RCOR0   COMPONENT (0,0) OF CORIOLIS
49!     RCOR1   COMPONENT (0,1) OF CORIOLIS
50!     RCOR2   COMPONENT (1,1) OF CORIOLIS
51
52!     RCOLON(NGPTOT) cosine of longitude on transformed sphere
53!     RSILON(NGPTOT)   sine        "             "         "
54!     RINDX (NGPTOT) Longitude index
55!     RINDY (NGPTOT) Latitude index
56!     RATATH(NGPTOT) RA*TAN(THETA) on real sphere
57!     RATATX(NGPTOT) Curvature term for LAM (for u eq.)
58
59!     NLOEN(NDGSAG:NDGENG)  : number of active points on a parallel
60!     NLOENG(NDGSAG:NDGENG) : global version of NLOEN
61!     NMEN(NDGSAG:NDGENG)   : associated cut-off wave number
62!     NMENTC(NDGSAG:NDGENG) : same as NMEN but for truncation NTCMAX.
63!     NMENG(NDGSAG:NDGENG)   : global version of NMEN
64!     NDGLU(0:MAX(NSMAX,NMSMAX)) : number of active points in an hemisphere
65!                          for a given wave number m
66!     NSTAGP(NGPTOT)     : start position of latitude data for boundary fields
67!     NESTAGP(NGPTOT)    : start position of latitude data for boundary fields
68!                          in extension zone (ALADIN).
69!     NTSTAGP(NGPTOT)    : start position of latitude data for boundary fields
70!                          in C+I+E zone (ALADIN).
71
72
73!  REFLRHC :  reference length for critical relative humidity (cloud scheme)
74!  REFLKUO, REFLCAPE, REFLRHC are ONLY to be used in the SETUP
75!  of TEQK and TEQC and TEQH
76
77!  TEQK : ratio between REFLKUO and the model equivalent mesh size
78!  TEQC : ratio between REFLCAPE and the model equivalent mesh size
79!  TEQH : ratio between REFLRHC and the model equivalent mesh size
80
81!  TEQK, TEQC, TEQH are to be used in the PHYSICS.
82
83REAL(KIND=JPRB) :: RMUCEN
84REAL(KIND=JPRB) :: RLOCEN
85REAL(KIND=JPRB) :: RSTRET
86INTEGER(KIND=JPIM) :: NSTTYP
87INTEGER(KIND=JPIM) :: NHTYP
88REAL(KIND=JPRB) :: RNLGINC
89REAL(KIND=JPRB) :: R4JP
90REAL(KIND=JPRB) :: RC2P1
91REAL(KIND=JPRB) :: RC2M1
92REAL(KIND=JPRB) :: RCOR0
93REAL(KIND=JPRB) :: RCOR1
94REAL(KIND=JPRB) :: RCOR2
95REAL(KIND=JPRB),ALLOCATABLE:: RCOLON(:)
96REAL(KIND=JPRB),ALLOCATABLE:: RSILON(:)
97REAL(KIND=JPRB),ALLOCATABLE:: RINDX(:)
98REAL(KIND=JPRB),ALLOCATABLE:: RINDY(:)
99REAL(KIND=JPRB),ALLOCATABLE:: RATATH(:)
100REAL(KIND=JPRB),ALLOCATABLE:: RATATX(:)
101INTEGER(KIND=JPIM),ALLOCATABLE:: NLOEN(:)
102INTEGER(KIND=JPIM),ALLOCATABLE,TARGET :: NLOENG(:)
103INTEGER(KIND=JPIM),ALLOCATABLE:: NMEN(:)
104INTEGER(KIND=JPIM),ALLOCATABLE:: NMENTC(:)
105INTEGER(KIND=JPIM),ALLOCATABLE:: NMENG(:)
106INTEGER(KIND=JPIM),ALLOCATABLE:: NDGLU(:)
107INTEGER(KIND=JPIM),ALLOCATABLE:: NSTAGP(:)
108INTEGER(KIND=JPIM),ALLOCATABLE:: NESTAGP(:)
109INTEGER(KIND=JPIM),ALLOCATABLE:: NTSTAGP(:)
110
111!     ------------------------------------------------------------------
112
113!*    * Defining the transformed sphere: physics input
114
115REAL(KIND=JPRB) :: REFLRHC
116REAL(KIND=JPRB) :: TEQH
117REAL(KIND=JPRB) :: REFLKUO
118REAL(KIND=JPRB) :: REFLCAPE
119REAL(KIND=JPRB) :: TEQK
120REAL(KIND=JPRB) :: TEQC
121
122!     ------------------------------------------------------------------
123
124!*    * DEFINING THE VERTICAL COORDINATE
125
126!     VP00  : REFERENCE PRESSURE FOR DEFINING VERTICAL COORDINATE
127!     VALH  : (0:NFLEVG)
128!     VBH   : (0:NFLEVG) : B of the vertical coordinate
129!     VETAH : (0:NFLEVG) ; VERTICAL COORDINATE = VALH+VBH
130!     VETAF : (0:NFLEVG+1) ; VERTICAL COORDINATE ON LAYERS.
131!     VCUICO: is used to compute denominators of weights
132!             for semi-Lagrangian vertical interpolations
133!             applied to full-level variables.
134!     VCUICOH:is used to compute denominators of weights
135!             for semi-Lagrangian vertical interpolations
136!             applied to half-level variables.
137!     VRLEVX: REAL(NRLEVX)
138!     NVAUTF: NVAUTF(VRLEVX*eta) is the number of the layer (full level)
139!             immediately above "eta", and is bounded by 1 and nflevg-1.
140!     NVAUTH: NVAUTH(VRLEVX*eta) is the number of the interlayer (half level)
141!             immediately above "eta", and is bounded by 0 and nflevg-1.
142!     VAH   : (0:NFLEVG) ;  =VALH*VP00
143!     VC    : (NFLEVG)   ;  =VAH(J)*VBH(J-1)-VAH(J-1)*VBH(J)
144!     VDELB : (NFLEVG)   ;  =VBH(J)-VBH(J-1)
145!     VDELA : (NFLEVG)   ;  =VAH(J)-VAH(J-1)
146!     VAF   : like VAH but at full levels.
147!     VBF   : like VBH but at full levels.
148!     VRDETAH: 1/[Delta eta]
149!     TOPPRES: REFERENCE "EVANESCENT" PRESSURE
150!              TOPPRES allows to solve some calculations of singularities
151!              when the top pressure of the model is zero (for ex. in
152!              GPPREF, GPXYB, SUNHBMAT).
153
154!     WE HAVE THEN FOR THE HALF LEVEL PRESSURE : VAH + VBH*(SURFACE PRESSURE)
155
156!     NOTE THAT THE HALF LEVEL VALUE AT K+.5 IS VXXX(K)
157!     (THE FULL LEVEL VALUES ARE FROM 1 TO NFLEVG)
158
159REAL(KIND=JPRB) :: VP00
160REAL(KIND=JPRB),ALLOCATABLE:: VALH(:)
161REAL(KIND=JPRB),ALLOCATABLE:: VBH(:)
162REAL(KIND=JPRB),ALLOCATABLE:: VETAH(:)
163REAL(KIND=JPRB),ALLOCATABLE:: VETAF(:)
164REAL(KIND=JPRB),ALLOCATABLE:: VCUICO(:,:)
165REAL(KIND=JPRB),ALLOCATABLE:: VCUICOH(:,:)
166REAL(KIND=JPRB) :: VRLEVX
167INTEGER(KIND=JPIM),ALLOCATABLE:: NVAUTF(:)
168INTEGER(KIND=JPIM),ALLOCATABLE:: NVAUTH(:)
169REAL(KIND=JPRB),ALLOCATABLE:: VAH(:)
170REAL(KIND=JPRB),ALLOCATABLE:: VC(:)
171REAL(KIND=JPRB),ALLOCATABLE:: VDELB(:)
172REAL(KIND=JPRB),ALLOCATABLE:: VDELA(:)
173REAL(KIND=JPRB),ALLOCATABLE:: VAF(:)
174REAL(KIND=JPRB),ALLOCATABLE:: VBF(:)
175REAL(KIND=JPRB),ALLOCATABLE:: VRDETAH(:)
176REAL(KIND=JPRB) :: TOPPRES
177
178!     ------------------------------------------------------------------
179
180!*    * Miscellaneous
181
182!     NBEEGP : ???
183!     NBNEGP : ???
184
185INTEGER(KIND=JPIM) :: NBEEGP
186INTEGER(KIND=JPIM) :: NBNEGP
187
188!     ------------------------------------------------------------------
189!$OMP THREADPRIVATE(nbeegp,nbnegp,ngptot,ngptot_cap,ngptotg,ngptotmx,nhtyp,nsttyp,r4jp,rc2m1,rc2p1,rcor0)
190!$OMP THREADPRIVATE(rcor1,rcor2,reflcape,reflkuo,reflrhc,rlocen,rmucen,rnlginc,rstret,teqc,teqh,teqk,toppres,vp00,vrlevx)
191!$OMP THREADPRIVATE(ndglu,nestagp,ngptotl,nloen,nloeng,nmen,nmeng,nmentc,nstagp,ntstagp,nvautf,nvauth,ratath,ratatx)
192!$OMP THREADPRIVATE(rcolon,rindx,rindy,rsilon,vaf,vah,valh,vbf,vbh,vc,vcuico,vcuicoh,vdela,vdelb,vetaf,vetah,vrdetah)
193END MODULE YOMGEM
Note: See TracBrowser for help on using the repository browser.