[524] | 1 | ! $Header$ |
---|
[5099] | 2 | |
---|
[5136] | 3 | SUBROUTINE advy(limit, dty, pbarv, sm, s0, sx, sy, sz) |
---|
| 4 | USE lmdz_comgeom2 |
---|
| 5 | |
---|
[5159] | 6 | USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm |
---|
| 7 | USE lmdz_paramet |
---|
[5105] | 8 | IMPLICIT NONE |
---|
[524] | 9 | |
---|
[5105] | 10 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
| 11 | ! C |
---|
| 12 | ! first-order moments (SOM) advection of tracer in Y direction C |
---|
| 13 | ! C |
---|
| 14 | ! Source : Pascal Simon ( Meteo, CNRM ) C |
---|
| 15 | ! Adaptation : A.A. (LGGE) C |
---|
| 16 | ! Derniere Modif : 15/12/94 LAST |
---|
[5136] | 17 | ! C |
---|
[5105] | 18 | ! sont les arguments d'entree pour le s-pg C |
---|
| 19 | ! C |
---|
| 20 | ! argument de sortie du s-pg C |
---|
| 21 | ! C |
---|
| 22 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
| 23 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
[5159] | 24 | |
---|
[5105] | 25 | ! Rem : Probleme aux poles il faut reecrire ce cas specifique |
---|
| 26 | ! Attention au sens de l'indexation |
---|
[5159] | 27 | |
---|
[5105] | 28 | ! parametres principaux du modele |
---|
[5159] | 29 | |
---|
[5105] | 30 | ! |
---|
[524] | 31 | |
---|
[5159] | 32 | |
---|
| 33 | |
---|
[5105] | 34 | ! Arguments : |
---|
| 35 | ! ---------- |
---|
| 36 | ! dty : frequence fictive d'appel du transport |
---|
| 37 | ! parbu,pbarv : flux de masse en x et y en Pa.m2.s-1 |
---|
[524] | 38 | |
---|
[5136] | 39 | INTEGER :: lon, lat, niv |
---|
| 40 | INTEGER :: i, j, jv, k, kp, l |
---|
[5105] | 41 | INTEGER :: ntra |
---|
| 42 | PARAMETER (ntra = 1) |
---|
[524] | 43 | |
---|
[5105] | 44 | REAL :: dty |
---|
[5136] | 45 | REAL :: pbarv (iip1, jjm, llm) |
---|
[524] | 46 | |
---|
[5105] | 47 | ! moments: SM total mass in each grid box |
---|
[5136] | 48 | ! S0 mass of tracer in each grid box |
---|
| 49 | ! Si 1rst order moment in i direction |
---|
[5159] | 50 | |
---|
[5136] | 51 | REAL :: SM(iip1, jjp1, llm) & |
---|
| 52 | , S0(iip1, jjp1, llm, ntra) |
---|
| 53 | REAL :: sx(iip1, jjp1, llm, ntra) & |
---|
| 54 | , sy(iip1, jjp1, llm, ntra) & |
---|
| 55 | , sz(iip1, jjp1, llm, ntra) |
---|
[524] | 56 | |
---|
| 57 | |
---|
[5105] | 58 | ! Local : |
---|
| 59 | ! ------- |
---|
[524] | 60 | |
---|
[5105] | 61 | ! mass fluxes across the boundaries (UGRI,VGRI,WGRI) |
---|
| 62 | ! mass fluxes in kg |
---|
| 63 | ! declaration : |
---|
[524] | 64 | |
---|
[5136] | 65 | REAL :: VGRI(iip1, 0:jjp1, llm) |
---|
[524] | 66 | |
---|
[5105] | 67 | ! Rem : UGRI et WGRI ne sont pas utilises dans |
---|
| 68 | ! cette SUBROUTINE ( advection en y uniquement ) |
---|
| 69 | ! Rem 2 :le dimensionnement de VGRI depend de celui de pbarv |
---|
[5159] | 70 | |
---|
[5105] | 71 | ! the moments F are similarly defined and used as temporary |
---|
| 72 | ! storage for portions of the grid boxes in transit |
---|
[5159] | 73 | |
---|
[5136] | 74 | REAL :: F0(iim, 0:jjp1, ntra), FM(iim, 0:jjp1) |
---|
| 75 | REAL :: FX(iim, jjm, ntra), FY(iim, jjm, ntra) |
---|
| 76 | REAL :: FZ(iim, jjm, ntra) |
---|
[5105] | 77 | REAL :: S00(ntra) |
---|
| 78 | REAL :: SM0 ! Just temporal variable |
---|
[5159] | 79 | |
---|
[5105] | 80 | ! work arrays |
---|
[5159] | 81 | |
---|
[5136] | 82 | REAL :: ALF(iim, 0:jjp1), ALF1(iim, 0:jjp1) |
---|
| 83 | REAL :: ALFQ(iim, 0:jjp1), ALF1Q(iim, 0:jjp1) |
---|
[5105] | 84 | REAL :: TEMPTM ! Just temporal variable |
---|
[5159] | 85 | |
---|
[5105] | 86 | ! Special pour poles |
---|
[5159] | 87 | |
---|
[5136] | 88 | REAL :: sbms, sfms, sfzs, sbmn, sfmn, sfzn |
---|
| 89 | REAL :: sns0(ntra), snsz(ntra), snsm |
---|
| 90 | REAL :: s1v(llm), slatv(llm) |
---|
| 91 | REAL :: qy1(iim, llm, ntra), qylat(iim, llm, ntra) |
---|
| 92 | REAL :: cx1(llm, ntra), cxLAT(llm, ntra) |
---|
| 93 | REAL :: cy1(llm, ntra), cyLAT(llm, ntra) |
---|
[5105] | 94 | REAL :: z1(iim), zcos(iim), zsin(iim) |
---|
[5136] | 95 | REAL :: smpn, smps, s0pn, s0ps |
---|
[5159] | 96 | |
---|
[5136] | 97 | REAL :: sqi, sqf |
---|
[5105] | 98 | LOGICAL :: LIMIT |
---|
[524] | 99 | |
---|
[5105] | 100 | lon = iim ! rem : Il est possible qu'un pbl. arrive ici |
---|
| 101 | lat = jjp1 ! a cause des dim. differentes entre les |
---|
[5136] | 102 | niv = llm |
---|
[524] | 103 | |
---|
[5159] | 104 | |
---|
[5105] | 105 | ! the moments Fi are used as temporary storage for |
---|
| 106 | ! portions of the grid boxes in transit at the current level |
---|
[5159] | 107 | |
---|
[5105] | 108 | ! work arrays |
---|
| 109 | ! |
---|
[524] | 110 | |
---|
[5136] | 111 | DO l = 1, llm |
---|
| 112 | DO j = 1, jjm |
---|
| 113 | DO i = 1, iip1 |
---|
| 114 | vgri (i, j, llm + 1 - l) = -1. * pbarv(i, j, l) |
---|
| 115 | enddo |
---|
| 116 | enddo |
---|
[5158] | 117 | DO i = 1, iip1 |
---|
[5136] | 118 | vgri(i, 0, l) = 0. |
---|
| 119 | vgri(i, jjp1, l) = 0. |
---|
| 120 | enddo |
---|
[5105] | 121 | enddo |
---|
| 122 | |
---|
[5136] | 123 | DO L = 1, NIV |
---|
[5159] | 124 | |
---|
[5136] | 125 | ! place limits on appropriate moments before transport |
---|
| 126 | ! (if flux-limiting is to be applied) |
---|
[5159] | 127 | |
---|
[5136] | 128 | IF(.NOT.LIMIT) GO TO 11 |
---|
[5159] | 129 | |
---|
[5136] | 130 | DO JV = 1, NTRA |
---|
| 131 | DO K = 1, LAT |
---|
| 132 | DO I = 1, LON |
---|
| 133 | sy(I, K, L, JV) = SIGN(AMIN1(AMAX1(S0(I, K, L, JV), 0.), & |
---|
| 134 | ABS(sy(I, K, L, JV))), sy(I, K, L, JV)) |
---|
| 135 | END DO |
---|
| 136 | END DO |
---|
| 137 | END DO |
---|
[5159] | 138 | |
---|
[5136] | 139 | 11 CONTINUE |
---|
[5159] | 140 | |
---|
[5136] | 141 | ! le flux a travers le pole Nord est traite separement |
---|
[5159] | 142 | |
---|
[5136] | 143 | SM0 = 0. |
---|
| 144 | DO JV = 1, NTRA |
---|
| 145 | S00(JV) = 0. |
---|
| 146 | END DO |
---|
[5159] | 147 | |
---|
[5136] | 148 | DO I = 1, LON |
---|
[5159] | 149 | |
---|
[5136] | 150 | IF(VGRI(I, 0, L)<=0.) THEN |
---|
| 151 | FM(I, 0) = -VGRI(I, 0, L) * DTY |
---|
| 152 | ALF(I, 0) = FM(I, 0) / SM(I, 1, L) |
---|
| 153 | SM(I, 1, L) = SM(I, 1, L) - FM(I, 0) |
---|
| 154 | SM0 = SM0 + FM(I, 0) |
---|
| 155 | ENDIF |
---|
[5159] | 156 | |
---|
[5136] | 157 | ALFQ(I, 0) = ALF(I, 0) * ALF(I, 0) |
---|
| 158 | ALF1(I, 0) = 1. - ALF(I, 0) |
---|
| 159 | ALF1Q(I, 0) = ALF1(I, 0) * ALF1(I, 0) |
---|
[5159] | 160 | |
---|
[5136] | 161 | END DO |
---|
[5159] | 162 | |
---|
[5136] | 163 | DO JV = 1, NTRA |
---|
| 164 | DO I = 1, LON |
---|
[5159] | 165 | |
---|
[5136] | 166 | IF(VGRI(I, 0, L)<=0.) THEN |
---|
[5159] | 167 | |
---|
[5136] | 168 | F0(I, 0, JV) = ALF(I, 0) * & |
---|
| 169 | (S0(I, 1, L, JV) - ALF1(I, 0) * sy(I, 1, L, JV)) |
---|
[5159] | 170 | |
---|
[5136] | 171 | S00(JV) = S00(JV) + F0(I, 0, JV) |
---|
| 172 | S0(I, 1, L, JV) = S0(I, 1, L, JV) - F0(I, 0, JV) |
---|
| 173 | sy(I, 1, L, JV) = ALF1Q(I, 0) * sy(I, 1, L, JV) |
---|
| 174 | sx(I, 1, L, JV) = ALF1 (I, 0) * sx(I, 1, L, JV) |
---|
| 175 | sz(I, 1, L, JV) = ALF1 (I, 0) * sz(I, 1, L, JV) |
---|
[5159] | 176 | |
---|
[5136] | 177 | ENDIF |
---|
[5159] | 178 | |
---|
[5136] | 179 | END DO |
---|
| 180 | END DO |
---|
[5159] | 181 | |
---|
[5136] | 182 | DO I = 1, LON |
---|
| 183 | IF(VGRI(I, 0, L)>0.) THEN |
---|
| 184 | FM(I, 0) = VGRI(I, 0, L) * DTY |
---|
| 185 | ALF(I, 0) = FM(I, 0) / SM0 |
---|
| 186 | ENDIF |
---|
| 187 | END DO |
---|
[5159] | 188 | |
---|
[5136] | 189 | DO JV = 1, NTRA |
---|
| 190 | DO I = 1, LON |
---|
| 191 | IF(VGRI(I, 0, L)>0.) THEN |
---|
| 192 | F0(I, 0, JV) = ALF(I, 0) * S00(JV) |
---|
| 193 | ENDIF |
---|
| 194 | END DO |
---|
| 195 | END DO |
---|
[5159] | 196 | |
---|
[5136] | 197 | ! puts the temporary moments Fi into appropriate neighboring boxes |
---|
[5159] | 198 | |
---|
[5136] | 199 | DO I = 1, LON |
---|
[5159] | 200 | |
---|
[5136] | 201 | IF(VGRI(I, 0, L)>0.) THEN |
---|
| 202 | SM(I, 1, L) = SM(I, 1, L) + FM(I, 0) |
---|
| 203 | ALF(I, 0) = FM(I, 0) / SM(I, 1, L) |
---|
| 204 | ENDIF |
---|
[5159] | 205 | |
---|
[5136] | 206 | ALF1(I, 0) = 1. - ALF(I, 0) |
---|
[5159] | 207 | |
---|
[5136] | 208 | END DO |
---|
[5159] | 209 | |
---|
[5136] | 210 | DO JV = 1, NTRA |
---|
| 211 | DO I = 1, LON |
---|
[5159] | 212 | |
---|
[5136] | 213 | IF(VGRI(I, 0, L)>0.) THEN |
---|
[5159] | 214 | |
---|
[5136] | 215 | TEMPTM = ALF(I, 0) * S0(I, 1, L, JV) - ALF1(I, 0) * F0(I, 0, JV) |
---|
| 216 | S0(I, 1, L, JV) = S0(I, 1, L, JV) + F0(I, 0, JV) |
---|
| 217 | sy(I, 1, L, JV) = ALF1(I, 0) * sy(I, 1, L, JV) + 3. * TEMPTM |
---|
[5159] | 218 | |
---|
[5136] | 219 | ENDIF |
---|
[5159] | 220 | |
---|
[5136] | 221 | END DO |
---|
| 222 | END DO |
---|
[5159] | 223 | |
---|
[5136] | 224 | ! calculate flux and moments between adjacent boxes |
---|
| 225 | ! 1- create temporary moments/masses for partial boxes in transit |
---|
| 226 | ! 2- reajusts moments remaining in the box |
---|
[5159] | 227 | |
---|
[5136] | 228 | ! flux from KP to K if V(K).lt.0 and from K to KP if V(K).gt.0 |
---|
[5159] | 229 | |
---|
[5136] | 230 | DO K = 1, LAT - 1 |
---|
| 231 | KP = K + 1 |
---|
| 232 | DO I = 1, LON |
---|
[5159] | 233 | |
---|
[5136] | 234 | IF(VGRI(I, K, L)<0.) THEN |
---|
| 235 | FM(I, K) = -VGRI(I, K, L) * DTY |
---|
| 236 | ALF(I, K) = FM(I, K) / SM(I, KP, L) |
---|
| 237 | SM(I, KP, L) = SM(I, KP, L) - FM(I, K) |
---|
| 238 | ELSE |
---|
| 239 | FM(I, K) = VGRI(I, K, L) * DTY |
---|
| 240 | ALF(I, K) = FM(I, K) / SM(I, K, L) |
---|
| 241 | SM(I, K, L) = SM(I, K, L) - FM(I, K) |
---|
| 242 | ENDIF |
---|
[5159] | 243 | |
---|
[5136] | 244 | ALFQ(I, K) = ALF(I, K) * ALF(I, K) |
---|
| 245 | ALF1(I, K) = 1. - ALF(I, K) |
---|
| 246 | ALF1Q(I, K) = ALF1(I, K) * ALF1(I, K) |
---|
[5159] | 247 | |
---|
[5136] | 248 | END DO |
---|
| 249 | END DO |
---|
[5159] | 250 | |
---|
[5136] | 251 | DO JV = 1, NTRA |
---|
| 252 | DO K = 1, LAT - 1 |
---|
| 253 | KP = K + 1 |
---|
| 254 | DO I = 1, LON |
---|
[5159] | 255 | |
---|
[5136] | 256 | IF(VGRI(I, K, L)<0.) THEN |
---|
[5159] | 257 | |
---|
[5136] | 258 | F0(I, K, JV) = ALF (I, K) * & |
---|
| 259 | (S0(I, KP, L, JV) - ALF1(I, K) * sy(I, KP, L, JV)) |
---|
| 260 | FY(I, K, JV) = ALFQ(I, K) * sy(I, KP, L, JV) |
---|
| 261 | FX(I, K, JV) = ALF (I, K) * sx(I, KP, L, JV) |
---|
| 262 | FZ(I, K, JV) = ALF (I, K) * sz(I, KP, L, JV) |
---|
[5159] | 263 | |
---|
[5136] | 264 | S0(I, KP, L, JV) = S0(I, KP, L, JV) - F0(I, K, JV) |
---|
| 265 | sy(I, KP, L, JV) = ALF1Q(I, K) * sy(I, KP, L, JV) |
---|
| 266 | sx(I, KP, L, JV) = sx(I, KP, L, JV) - FX(I, K, JV) |
---|
| 267 | sz(I, KP, L, JV) = sz(I, KP, L, JV) - FZ(I, K, JV) |
---|
[5159] | 268 | |
---|
[5136] | 269 | ELSE |
---|
[5159] | 270 | |
---|
[5136] | 271 | F0(I, K, JV) = ALF (I, K) * & |
---|
| 272 | (S0(I, K, L, JV) + ALF1(I, K) * sy(I, K, L, JV)) |
---|
| 273 | FY(I, K, JV) = ALFQ(I, K) * sy(I, K, L, JV) |
---|
| 274 | FX(I, K, JV) = ALF(I, K) * sx(I, K, L, JV) |
---|
| 275 | FZ(I, K, JV) = ALF(I, K) * sz(I, K, L, JV) |
---|
[5159] | 276 | |
---|
[5136] | 277 | S0(I, K, L, JV) = S0(I, K, L, JV) - F0(I, K, JV) |
---|
| 278 | sy(I, K, L, JV) = ALF1Q(I, K) * sy(I, K, L, JV) |
---|
| 279 | sx(I, K, L, JV) = sx(I, K, L, JV) - FX(I, K, JV) |
---|
| 280 | sz(I, K, L, JV) = sz(I, K, L, JV) - FZ(I, K, JV) |
---|
[5159] | 281 | |
---|
[5136] | 282 | ENDIF |
---|
[5159] | 283 | |
---|
[5136] | 284 | END DO |
---|
| 285 | END DO |
---|
| 286 | END DO |
---|
[5159] | 287 | |
---|
[5136] | 288 | ! puts the temporary moments Fi into appropriate neighboring boxes |
---|
[5159] | 289 | |
---|
[5136] | 290 | DO K = 1, LAT - 1 |
---|
| 291 | KP = K + 1 |
---|
| 292 | DO I = 1, LON |
---|
[5159] | 293 | |
---|
[5136] | 294 | IF(VGRI(I, K, L)<0.) THEN |
---|
| 295 | SM(I, K, L) = SM(I, K, L) + FM(I, K) |
---|
| 296 | ALF(I, K) = FM(I, K) / SM(I, K, L) |
---|
| 297 | ELSE |
---|
| 298 | SM(I, KP, L) = SM(I, KP, L) + FM(I, K) |
---|
| 299 | ALF(I, K) = FM(I, K) / SM(I, KP, L) |
---|
| 300 | ENDIF |
---|
[5159] | 301 | |
---|
[5136] | 302 | ALF1(I, K) = 1. - ALF(I, K) |
---|
[5159] | 303 | |
---|
[5136] | 304 | END DO |
---|
| 305 | END DO |
---|
[5159] | 306 | |
---|
[5136] | 307 | DO JV = 1, NTRA |
---|
| 308 | DO K = 1, LAT - 1 |
---|
| 309 | KP = K + 1 |
---|
| 310 | DO I = 1, LON |
---|
[5159] | 311 | |
---|
[5136] | 312 | IF(VGRI(I, K, L)<0.) THEN |
---|
[5159] | 313 | |
---|
[5136] | 314 | TEMPTM = -ALF(I, K) * S0(I, K, L, JV) + ALF1(I, K) * F0(I, K, JV) |
---|
| 315 | S0(I, K, L, JV) = S0(I, K, L, JV) + F0(I, K, JV) |
---|
| 316 | sy(I, K, L, JV) = ALF(I, K) * FY(I, K, JV) + ALF1(I, K) * sy(I, K, L, JV) & |
---|
| 317 | + 3. * TEMPTM |
---|
| 318 | sx(I, K, L, JV) = sx(I, K, L, JV) + FX(I, K, JV) |
---|
| 319 | sz(I, K, L, JV) = sz(I, K, L, JV) + FZ(I, K, JV) |
---|
[5159] | 320 | |
---|
[5136] | 321 | ELSE |
---|
[5159] | 322 | |
---|
[5136] | 323 | TEMPTM = ALF(I, K) * S0(I, KP, L, JV) - ALF1(I, K) * F0(I, K, JV) |
---|
| 324 | S0(I, KP, L, JV) = S0(I, KP, L, JV) + F0(I, K, JV) |
---|
| 325 | sy(I, KP, L, JV) = ALF(I, K) * FY(I, K, JV) + ALF1(I, K) * sy(I, KP, L, JV) & |
---|
| 326 | + 3. * TEMPTM |
---|
| 327 | sx(I, KP, L, JV) = sx(I, KP, L, JV) + FX(I, K, JV) |
---|
| 328 | sz(I, KP, L, JV) = sz(I, KP, L, JV) + FZ(I, K, JV) |
---|
[5159] | 329 | |
---|
[5136] | 330 | ENDIF |
---|
[5159] | 331 | |
---|
[5136] | 332 | END DO |
---|
| 333 | END DO |
---|
| 334 | END DO |
---|
[5159] | 335 | |
---|
[5136] | 336 | ! traitement special pour le pole Sud (idem pole Nord) |
---|
[5159] | 337 | |
---|
[5136] | 338 | K = LAT |
---|
[5159] | 339 | |
---|
[5136] | 340 | SM0 = 0. |
---|
| 341 | DO JV = 1, NTRA |
---|
| 342 | S00(JV) = 0. |
---|
| 343 | END DO |
---|
[5159] | 344 | |
---|
[5136] | 345 | DO I = 1, LON |
---|
[5159] | 346 | |
---|
[5136] | 347 | IF(VGRI(I, K, L)>=0.) THEN |
---|
| 348 | FM(I, K) = VGRI(I, K, L) * DTY |
---|
| 349 | ALF(I, K) = FM(I, K) / SM(I, K, L) |
---|
| 350 | SM(I, K, L) = SM(I, K, L) - FM(I, K) |
---|
| 351 | SM0 = SM0 + FM(I, K) |
---|
| 352 | ENDIF |
---|
[5159] | 353 | |
---|
[5136] | 354 | ALFQ(I, K) = ALF(I, K) * ALF(I, K) |
---|
| 355 | ALF1(I, K) = 1. - ALF(I, K) |
---|
| 356 | ALF1Q(I, K) = ALF1(I, K) * ALF1(I, K) |
---|
[5159] | 357 | |
---|
[5136] | 358 | END DO |
---|
[5159] | 359 | |
---|
[5136] | 360 | DO JV = 1, NTRA |
---|
| 361 | DO I = 1, LON |
---|
[5159] | 362 | |
---|
[5136] | 363 | IF(VGRI(I, K, L)>=0.) THEN |
---|
| 364 | F0 (I, K, JV) = ALF(I, K) * & |
---|
| 365 | (S0(I, K, L, JV) + ALF1(I, K) * sy(I, K, L, JV)) |
---|
| 366 | S00(JV) = S00(JV) + F0(I, K, JV) |
---|
[5159] | 367 | |
---|
[5136] | 368 | S0(I, K, L, JV) = S0 (I, K, L, JV) - F0 (I, K, JV) |
---|
| 369 | sy(I, K, L, JV) = ALF1Q(I, K) * sy(I, K, L, JV) |
---|
| 370 | sx(I, K, L, JV) = ALF1(I, K) * sx(I, K, L, JV) |
---|
| 371 | sz(I, K, L, JV) = ALF1(I, K) * sz(I, K, L, JV) |
---|
| 372 | ENDIF |
---|
[5159] | 373 | |
---|
[5136] | 374 | END DO |
---|
| 375 | END DO |
---|
[5159] | 376 | |
---|
[5136] | 377 | DO I = 1, LON |
---|
| 378 | IF(VGRI(I, K, L)<0.) THEN |
---|
| 379 | FM(I, K) = -VGRI(I, K, L) * DTY |
---|
| 380 | ALF(I, K) = FM(I, K) / SM0 |
---|
| 381 | ENDIF |
---|
| 382 | END DO |
---|
[5159] | 383 | |
---|
[5136] | 384 | DO JV = 1, NTRA |
---|
| 385 | DO I = 1, LON |
---|
| 386 | IF(VGRI(I, K, L)<0.) THEN |
---|
| 387 | F0(I, K, JV) = ALF(I, K) * S00(JV) |
---|
| 388 | ENDIF |
---|
| 389 | END DO |
---|
| 390 | END DO |
---|
[5159] | 391 | |
---|
[5136] | 392 | ! puts the temporary moments Fi into appropriate neighboring boxes |
---|
[5159] | 393 | |
---|
[5136] | 394 | DO I = 1, LON |
---|
[5159] | 395 | |
---|
[5136] | 396 | IF(VGRI(I, K, L)<0.) THEN |
---|
| 397 | SM(I, K, L) = SM(I, K, L) + FM(I, K) |
---|
| 398 | ALF(I, K) = FM(I, K) / SM(I, K, L) |
---|
| 399 | ENDIF |
---|
[5159] | 400 | |
---|
[5136] | 401 | ALF1(I, K) = 1. - ALF(I, K) |
---|
[5159] | 402 | |
---|
[5136] | 403 | END DO |
---|
[5159] | 404 | |
---|
[5136] | 405 | DO JV = 1, NTRA |
---|
| 406 | DO I = 1, LON |
---|
[5159] | 407 | |
---|
[5136] | 408 | IF(VGRI(I, K, L)<0.) THEN |
---|
[5159] | 409 | |
---|
[5136] | 410 | TEMPTM = -ALF(I, K) * S0(I, K, L, JV) + ALF1(I, K) * F0(I, K, JV) |
---|
| 411 | S0(I, K, L, JV) = S0(I, K, L, JV) + F0(I, K, JV) |
---|
| 412 | sy(I, K, L, JV) = ALF1(I, K) * sy(I, K, L, JV) + 3. * TEMPTM |
---|
[5159] | 413 | |
---|
[5136] | 414 | ENDIF |
---|
[5159] | 415 | |
---|
[5136] | 416 | END DO |
---|
| 417 | END DO |
---|
[5159] | 418 | |
---|
[5105] | 419 | END DO |
---|
[5159] | 420 | |
---|
[5105] | 421 | RETURN |
---|
| 422 | END SUBROUTINE advy |
---|
[524] | 423 | |
---|