[1989] | 1 | MODULE YOMGEM |
---|
| 2 | |
---|
| 3 | USE PARKIND1 ,ONLY : JPIM ,JPRB |
---|
| 4 | |
---|
| 5 | IMPLICIT NONE |
---|
| 6 | |
---|
| 7 | SAVE |
---|
| 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 | |
---|
| 19 | INTEGER(KIND=JPIM) :: NGPTOT |
---|
| 20 | INTEGER(KIND=JPIM) :: NGPTOT_CAP |
---|
| 21 | INTEGER(KIND=JPIM) :: NGPTOTMX |
---|
| 22 | INTEGER(KIND=JPIM) :: NGPTOTG |
---|
| 23 | INTEGER(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 | |
---|
| 83 | REAL(KIND=JPRB) :: RMUCEN |
---|
| 84 | REAL(KIND=JPRB) :: RLOCEN |
---|
| 85 | REAL(KIND=JPRB) :: RSTRET |
---|
| 86 | INTEGER(KIND=JPIM) :: NSTTYP |
---|
| 87 | INTEGER(KIND=JPIM) :: NHTYP |
---|
| 88 | REAL(KIND=JPRB) :: RNLGINC |
---|
| 89 | REAL(KIND=JPRB) :: R4JP |
---|
| 90 | REAL(KIND=JPRB) :: RC2P1 |
---|
| 91 | REAL(KIND=JPRB) :: RC2M1 |
---|
| 92 | REAL(KIND=JPRB) :: RCOR0 |
---|
| 93 | REAL(KIND=JPRB) :: RCOR1 |
---|
| 94 | REAL(KIND=JPRB) :: RCOR2 |
---|
| 95 | REAL(KIND=JPRB),ALLOCATABLE:: RCOLON(:) |
---|
| 96 | REAL(KIND=JPRB),ALLOCATABLE:: RSILON(:) |
---|
| 97 | REAL(KIND=JPRB),ALLOCATABLE:: RINDX(:) |
---|
| 98 | REAL(KIND=JPRB),ALLOCATABLE:: RINDY(:) |
---|
| 99 | REAL(KIND=JPRB),ALLOCATABLE:: RATATH(:) |
---|
| 100 | REAL(KIND=JPRB),ALLOCATABLE:: RATATX(:) |
---|
| 101 | INTEGER(KIND=JPIM),ALLOCATABLE:: NLOEN(:) |
---|
| 102 | INTEGER(KIND=JPIM),ALLOCATABLE,TARGET :: NLOENG(:) |
---|
| 103 | INTEGER(KIND=JPIM),ALLOCATABLE:: NMEN(:) |
---|
| 104 | INTEGER(KIND=JPIM),ALLOCATABLE:: NMENTC(:) |
---|
| 105 | INTEGER(KIND=JPIM),ALLOCATABLE:: NMENG(:) |
---|
| 106 | INTEGER(KIND=JPIM),ALLOCATABLE:: NDGLU(:) |
---|
| 107 | INTEGER(KIND=JPIM),ALLOCATABLE:: NSTAGP(:) |
---|
| 108 | INTEGER(KIND=JPIM),ALLOCATABLE:: NESTAGP(:) |
---|
| 109 | INTEGER(KIND=JPIM),ALLOCATABLE:: NTSTAGP(:) |
---|
| 110 | |
---|
| 111 | ! ------------------------------------------------------------------ |
---|
| 112 | |
---|
| 113 | !* * Defining the transformed sphere: physics input |
---|
| 114 | |
---|
| 115 | REAL(KIND=JPRB) :: REFLRHC |
---|
| 116 | REAL(KIND=JPRB) :: TEQH |
---|
| 117 | REAL(KIND=JPRB) :: REFLKUO |
---|
| 118 | REAL(KIND=JPRB) :: REFLCAPE |
---|
| 119 | REAL(KIND=JPRB) :: TEQK |
---|
| 120 | REAL(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 | |
---|
| 159 | REAL(KIND=JPRB) :: VP00 |
---|
| 160 | REAL(KIND=JPRB),ALLOCATABLE:: VALH(:) |
---|
| 161 | REAL(KIND=JPRB),ALLOCATABLE:: VBH(:) |
---|
| 162 | REAL(KIND=JPRB),ALLOCATABLE:: VETAH(:) |
---|
| 163 | REAL(KIND=JPRB),ALLOCATABLE:: VETAF(:) |
---|
| 164 | REAL(KIND=JPRB),ALLOCATABLE:: VCUICO(:,:) |
---|
| 165 | REAL(KIND=JPRB),ALLOCATABLE:: VCUICOH(:,:) |
---|
| 166 | REAL(KIND=JPRB) :: VRLEVX |
---|
| 167 | INTEGER(KIND=JPIM),ALLOCATABLE:: NVAUTF(:) |
---|
| 168 | INTEGER(KIND=JPIM),ALLOCATABLE:: NVAUTH(:) |
---|
| 169 | REAL(KIND=JPRB),ALLOCATABLE:: VAH(:) |
---|
| 170 | REAL(KIND=JPRB),ALLOCATABLE:: VC(:) |
---|
| 171 | REAL(KIND=JPRB),ALLOCATABLE:: VDELB(:) |
---|
| 172 | REAL(KIND=JPRB),ALLOCATABLE:: VDELA(:) |
---|
| 173 | REAL(KIND=JPRB),ALLOCATABLE:: VAF(:) |
---|
| 174 | REAL(KIND=JPRB),ALLOCATABLE:: VBF(:) |
---|
| 175 | REAL(KIND=JPRB),ALLOCATABLE:: VRDETAH(:) |
---|
| 176 | REAL(KIND=JPRB) :: TOPPRES |
---|
| 177 | |
---|
| 178 | ! ------------------------------------------------------------------ |
---|
| 179 | |
---|
| 180 | !* * Miscellaneous |
---|
| 181 | |
---|
| 182 | ! NBEEGP : ??? |
---|
| 183 | ! NBNEGP : ??? |
---|
| 184 | |
---|
| 185 | INTEGER(KIND=JPIM) :: NBEEGP |
---|
| 186 | INTEGER(KIND=JPIM) :: NBNEGP |
---|
| 187 | |
---|
| 188 | ! ------------------------------------------------------------------ |
---|
[2010] | 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) |
---|
[1989] | 193 | END MODULE YOMGEM |
---|