- Timestamp:
- 2018-07-26T17:58:13+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2018/dev_r9956_ENHANCE05_ZAD_AIMP/src/OCE/DYN/dynzdf.F90
r9979 r10008 71 71 REAL(wp) :: zzwi, ze3ua, zdt ! local scalars 72 72 REAL(wp) :: zzws, ze3va ! - - 73 REAL(wp) :: z1_e3u n, z1_e3vn! - -73 REAL(wp) :: z1_e3ua, z1_e3va ! - - 74 74 REAL(wp) :: zWu , zWv ! - - 75 75 REAL(wp) :: zWui, zWvi ! - - … … 166 166 DO jj = 2, jpjm1 167 167 DO ji = fs_2, fs_jpim1 ! vector opt. 168 z1_e3un = 1._wp / e3u_n(ji,jj,jk) 169 zzwi = ( ( avm (ji+1,jj,jk ) + avm (ji,jj,jk ) + akzu(ji,jj,jk ) ) & 170 & / e3uw_a(ji ,jj,jk ) ) * z1_e3un * wumask(ji,jj,jk ) 171 zzws = ( ( avm (ji+1,jj,jk+1) + avm (ji,jj,jk+1) + akzu(ji,jj,jk+1) ) & 172 & / e3uw_a(ji ,jj,jk+1) ) * z1_e3un * wumask(ji,jj,jk+1) 168 ze3ua = e3u_a(ji,jj,jk) 169 z1_e3ua = 1._wp / ze3ua 170 zzwi = - zdt * ( avm (ji+1,jj,jk ) + avm (ji,jj,jk ) + akzu(ji,jj,jk ) ) & 171 & / ( ze3ua * e3uw_n(ji ,jj,jk ) ) * wumask(ji,jj,jk ) 172 zzws = - zdt * ( avm (ji+1,jj,jk+1) + avm (ji,jj,jk+1) + akzu(ji,jj,jk+1) ) & 173 & / ( ze3ua * e3uw_n(ji ,jj,jk+1) ) * wumask(ji,jj,jk+1) 173 174 zWu = 0.25_wp * ( wi(ji,jj,jk ) + wi(ji+1,jj,jk ) & 174 175 & + wi(ji,jj,jk+1) + wi(ji+1,jj,jk+1) ) 175 zwi(ji,jj,jk) = - 1._wp * ( zzwi + MIN( zWu, 0._wp ) * z1_e3un )176 zws(ji,jj,jk) = - 1._wp * ( zzws - MAX( zWu, 0._wp ) * z1_e3un )177 zwd(ji,jj,jk) = 1._wp + zdt * ( zzwi + zzws + ( - MAX( zWu, 0._wp ) + MIN( zWu, 0._wp ) ) * z1_e3un )176 zwi(ji,jj,jk) = zzwi - zdt * MIN( zWu, 0._wp ) * z1_e3ua 177 zws(ji,jj,jk) = zzws + zdt * MAX( zWu, 0._wp ) * z1_e3ua 178 zwd(ji,jj,jk) = 1._wp - zzwi - zzws - zdt * ( - MAX( zWu, 0._wp ) + MIN( zWu, 0._wp ) ) * z1_e3ua 178 179 END DO 179 180 END DO … … 183 184 DO jj = 2, jpjm1 184 185 DO ji = fs_2, fs_jpim1 ! vector opt. 185 z1_e3un = 1._wp / e3u_n(ji,jj,jk) 186 zzwi = ( ( avm (ji+1,jj,jk ) + avm(ji,jj,jk ) ) & 187 & / e3uw_a(ji ,jj,jk ) ) * z1_e3un * wumask(ji,jj,jk ) 188 zzws = ( ( avm (ji+1,jj,jk+1) + avm(ji,jj,jk+1) ) & 189 & / e3uw_a(ji ,jj,jk+1) ) * z1_e3un * wumask(ji,jj,jk+1) 186 ze3ua = e3u_a(ji,jj,jk) 187 z1_e3ua = 1._wp / ze3ua 188 zzwi = - zdt * ( avm (ji+1,jj,jk ) + avm(ji,jj,jk ) ) & 189 & / ( ze3ua * e3uw_n(ji ,jj,jk ) ) * wumask(ji,jj,jk ) 190 zzws = - zdt * ( avm (ji+1,jj,jk+1) + avm(ji,jj,jk+1) ) & 191 & / ( ze3ua * e3uw_n(ji ,jj,jk+1) ) * wumask(ji,jj,jk+1) 190 192 zWu = 0.25_wp * ( wi(ji,jj,jk ) + wi(ji+1,jj,jk ) & 191 193 & + wi(ji,jj,jk+1) + wi(ji+1,jj,jk+1) ) 192 zwi(ji,jj,jk) = - 1._wp * ( zzwi + MIN( zWu, 0._wp ) * z1_e3un )193 zws(ji,jj,jk) = - 1._wp * ( zzws - MAX( zWu, 0._wp ) * z1_e3un )194 zwd(ji,jj,jk) = 1._wp + zdt * ( zzwi + zzws + ( - MAX( zWu, 0._wp ) + MIN( zWu, 0._wp ) ) * z1_e3un )194 zwi(ji,jj,jk) = zzwi - zdt * MIN( zWu, 0._wp ) * z1_e3ua 195 zws(ji,jj,jk) = zzws + zdt * MAX( zWu, 0._wp ) * z1_e3ua 196 zwd(ji,jj,jk) = 1._wp - zzwi - zzws - zdt * ( - MAX( zWu, 0._wp ) + MIN( zWu, 0._wp ) ) * z1_e3ua 195 197 END DO 196 198 END DO … … 204 206 DO ji = fs_2, fs_jpim1 ! vector opt. 205 207 ze3ua = ( 1._wp - r_vvl ) * e3u_n(ji,jj,jk) + r_vvl * e3u_a(ji,jj,jk) ! after scale factor at U-point 206 zzwi = ( avm(ji+1,jj,jk ) + avm(ji,jj,jk ) + akzu(ji,jj,jk ) ) &207 & / ( ze3ua * e3uw_ a(ji,jj,jk ) ) * wumask(ji,jj,jk )208 zzws = ( avm(ji+1,jj,jk+1) + avm(ji,jj,jk+1) + akzu(ji,jj,jk+1) ) &209 & / ( ze3ua * e3uw_ a(ji,jj,jk+1) ) * wumask(ji,jj,jk+1)208 zzwi = - zdt * ( avm(ji+1,jj,jk ) + avm(ji,jj,jk ) + akzu(ji,jj,jk ) ) & 209 & / ( ze3ua * e3uw_n(ji,jj,jk ) ) * wumask(ji,jj,jk ) 210 zzws = - zdt * ( avm(ji+1,jj,jk+1) + avm(ji,jj,jk+1) + akzu(ji,jj,jk+1) ) & 211 & / ( ze3ua * e3uw_n(ji,jj,jk+1) ) * wumask(ji,jj,jk+1) 210 212 zWui = 0.5_wp * ( wi(ji,jj,jk ) + wi(ji+1,jj,jk ) ) 211 213 zWus = 0.5_wp * ( wi(ji,jj,jk+1) + wi(ji+1,jj,jk+1) ) 212 zwi(ji,jj,jk) = - zdt * ( zzwi + MIN( zWui, 0._wp ))213 zws(ji,jj,jk) = - zdt * ( zzws - MAX( zWus, 0._wp ))214 zwd(ji,jj,jk) = 1._wp + zzwi +zzws - zdt * ( MAX( zWui, 0._wp ) - MIN( zWus, 0._wp ) )214 zwi(ji,jj,jk) = zzwi - zdt * MIN( zWui, 0._wp ) 215 zws(ji,jj,jk) = zzws + zdt * MAX( zWus, 0._wp ) 216 zwd(ji,jj,jk) = 1._wp - zzwi - zzws - zdt * ( MAX( zWui, 0._wp ) - MIN( zWus, 0._wp ) ) 215 217 END DO 216 218 END DO … … 221 223 DO ji = fs_2, fs_jpim1 ! vector opt. 222 224 ze3ua = ( 1._wp - r_vvl ) * e3u_n(ji,jj,jk) + r_vvl * e3u_a(ji,jj,jk) ! after scale factor at U-point 223 zzwi = ( avm(ji+1,jj,jk ) + avm(ji,jj,jk ) ) / ( ze3ua * e3uw_a(ji,jj,jk ) ) * wumask(ji,jj,jk )224 zzws = ( avm(ji+1,jj,jk+1) + avm(ji,jj,jk+1) ) / ( ze3ua * e3uw_a(ji,jj,jk+1) ) * wumask(ji,jj,jk+1)225 zzwi = - zdt * ( avm(ji+1,jj,jk ) + avm(ji,jj,jk ) ) / ( ze3ua * e3uw_n(ji,jj,jk ) ) * wumask(ji,jj,jk ) 226 zzws = - zdt * ( avm(ji+1,jj,jk+1) + avm(ji,jj,jk+1) ) / ( ze3ua * e3uw_n(ji,jj,jk+1) ) * wumask(ji,jj,jk+1) 225 227 zWui = 0.5_wp * ( wi(ji,jj,jk ) + wi(ji+1,jj,jk ) ) 226 228 zWus = 0.5_wp * ( wi(ji,jj,jk+1) + wi(ji+1,jj,jk+1) ) 227 zwi(ji,jj,jk) = - zdt * ( zzwi + MIN( zWui, 0._wp ) )228 zws(ji,jj,jk) = - zdt * ( zzws - MAX( zWus, 0._wp ))229 zwd(ji,jj,jk) = 1._wp + zzwi +zzws - zdt * ( MAX( zWui, 0._wp ) - MIN( zWus, 0._wp ) )229 zwi(ji,jj,jk) = zzwi - zdt * MIN( zWui, 0._wp ) 230 zws(ji,jj,jk) = zzws + zdt * MAX( zWus, 0._wp ) 231 zwd(ji,jj,jk) = 1._wp - zzwi - zzws - zdt * ( MAX( zWui, 0._wp ) - MIN( zWus, 0._wp ) ) 230 232 END DO 231 233 END DO … … 240 242 DO ji = fs_2, fs_jpim1 ! vector opt. 241 243 ze3ua = ( 1._wp - r_vvl ) * e3u_n(ji,jj,jk) + r_vvl * e3u_a(ji,jj,jk) ! after scale factor at U-point 242 zzwi = ( avm(ji+1,jj,jk ) + avm(ji,jj,jk ) + akzu(ji,jj,jk ) ) &243 & / ( ze3ua * e3uw_ a(ji,jj,jk ) ) * wumask(ji,jj,jk )244 zzws = ( avm(ji+1,jj,jk+1) + avm(ji,jj,jk+1) + akzu(ji,jj,jk+1) ) &245 & / ( ze3ua * e3uw_ a(ji,jj,jk+1) ) * wumask(ji,jj,jk+1)246 zwi(ji,jj,jk) = - zdt *zzwi247 zws(ji,jj,jk) = - zdt *zzws248 zwd(ji,jj,jk) = 1._wp + zzwi +zzws244 zzwi = - zdt * ( avm(ji+1,jj,jk ) + avm(ji,jj,jk ) + akzu(ji,jj,jk ) ) & 245 & / ( ze3ua * e3uw_n(ji,jj,jk ) ) * wumask(ji,jj,jk ) 246 zzws = - zdt * ( avm(ji+1,jj,jk+1) + avm(ji,jj,jk+1) + akzu(ji,jj,jk+1) ) & 247 & / ( ze3ua * e3uw_n(ji,jj,jk+1) ) * wumask(ji,jj,jk+1) 248 zwi(ji,jj,jk) = zzwi 249 zws(ji,jj,jk) = zzws 250 zwd(ji,jj,jk) = 1._wp - zzwi - zzws 249 251 END DO 250 252 END DO … … 255 257 DO ji = fs_2, fs_jpim1 ! vector opt. 256 258 ze3ua = ( 1._wp - r_vvl ) * e3u_n(ji,jj,jk) + r_vvl * e3u_a(ji,jj,jk) ! after scale factor at U-point 257 zzwi = ( avm(ji+1,jj,jk ) + avm(ji,jj,jk ) ) / ( ze3ua * e3uw_a(ji,jj,jk ) ) * wumask(ji,jj,jk )258 zzws = ( avm(ji+1,jj,jk+1) + avm(ji,jj,jk+1) ) / ( ze3ua * e3uw_a(ji,jj,jk+1) ) * wumask(ji,jj,jk+1)259 zwi(ji,jj,jk) = - zdt *zzwi260 zws(ji,jj,jk) = - zdt *zzws261 zwd(ji,jj,jk) = 1._wp + zzwi +zzws259 zzwi = - zdt * ( avm(ji+1,jj,jk ) + avm(ji,jj,jk ) ) / ( ze3ua * e3uw_n(ji,jj,jk ) ) * wumask(ji,jj,jk ) 260 zzws = - zdt * ( avm(ji+1,jj,jk+1) + avm(ji,jj,jk+1) ) / ( ze3ua * e3uw_n(ji,jj,jk+1) ) * wumask(ji,jj,jk+1) 261 zwi(ji,jj,jk) = zzwi 262 zws(ji,jj,jk) = zzws 263 zwd(ji,jj,jk) = 1._wp - zzwi - zzws 262 264 END DO 263 265 END DO … … 361 363 DO jj = 2, jpjm1 362 364 DO ji = fs_2, fs_jpim1 ! vector opt. 363 z1_e3vn = 1._wp / e3v_n(ji,jj,jk) 364 zzwi = ( ( avm (ji,jj+1,jk ) + avm (ji,jj,jk ) + akzv(ji,jj,jk ) ) & 365 & / e3vw_a(ji,jj ,jk ) ) * z1_e3vn * wvmask(ji,jj,jk ) 366 zzws = ( ( avm (ji,jj+1,jk+1) + avm (ji,jj,jk+1) + akzv(ji,jj,jk+1) ) & 367 & / e3vw_a(ji,jj ,jk+1) ) * z1_e3vn * wvmask(ji,jj,jk+1) 365 ze3va = e3v_a(ji,jj,jk) 366 z1_e3va = 1._wp / ze3va 367 zzwi = - zdt * ( avm (ji,jj+1,jk ) + avm (ji,jj,jk ) + akzv(ji,jj,jk ) ) & 368 & / ( ze3va * e3vw_n(ji,jj ,jk ) ) * wvmask(ji,jj,jk ) 369 zzws = - zdt * ( avm (ji,jj+1,jk+1) + avm (ji,jj,jk+1) + akzv(ji,jj,jk+1) ) & 370 & / ( ze3va * e3vw_n(ji,jj ,jk+1) ) * wvmask(ji,jj,jk+1) 368 371 zWv = 0.25_wp * ( wi(ji,jj,jk ) + wi(ji,jj+1,jk ) & 369 372 & + wi(ji,jj,jk+1) + wi(ji,jj+1,jk+1) ) 370 zwi(ji,jj,jk) = - 1._wp * ( zzwi + MIN( zWv, 0._wp ) * z1_e3vn )371 zws(ji,jj,jk) = - 1._wp * ( zzws - MAX( zWv, 0._wp ) * z1_e3vn )372 zwd(ji,jj,jk) = 1._wp + zdt * ( zzwi + zzws + ( - MAX( zWv, 0._wp ) + MIN( zWv, 0._wp ) ) * z1_e3vn )373 zwi(ji,jj,jk) = zzwi - zdt * MIN( zWv, 0._wp ) * z1_e3va 374 zws(ji,jj,jk) = zzws + zdt * MAX( zWv, 0._wp ) * z1_e3va 375 zwd(ji,jj,jk) = 1._wp - zzwi - zzws - zdt * ( - MAX( zWv, 0._wp ) + MIN( zWv, 0._wp ) ) * z1_e3va 373 376 END DO 374 377 END DO … … 378 381 DO jj = 2, jpjm1 379 382 DO ji = fs_2, fs_jpim1 ! vector opt. 380 z1_e3vn = 1._wp / e3v_n(ji,jj,jk) 381 zzwi = ( ( avm (ji,jj+1,jk ) + avm(ji,jj,jk ) ) & 382 & / e3vw_a(ji,jj ,jk ) ) * z1_e3vn * wvmask(ji,jj,jk ) 383 zzws = ( ( avm (ji,jj+1,jk+1) + avm(ji,jj,jk+1) ) & 384 & / e3vw_a(ji ,jj,jk+1) ) * z1_e3vn * wvmask(ji,jj,jk+1) 383 ze3va = e3v_a(ji,jj,jk) 384 z1_e3va = 1._wp / ze3va 385 zzwi = - zdt * ( avm (ji,jj+1,jk ) + avm(ji,jj,jk ) ) & 386 & / ( ze3va * e3vw_n(ji,jj ,jk ) ) * wvmask(ji,jj,jk ) 387 zzws = - zdt * ( avm (ji,jj+1,jk+1) + avm(ji,jj,jk+1) ) & 388 & / ( ze3va * e3vw_n(ji ,jj,jk+1) ) * wvmask(ji,jj,jk+1) 385 389 zWv = 0.25_wp * ( wi(ji,jj,jk ) + wi(ji,jj+1,jk ) & 386 390 & + wi(ji,jj,jk+1) + wi(ji,jj+1,jk+1) ) 387 zwi(ji,jj,jk) = - 1._wp * ( zzwi + MIN( zWv, 0._wp ) * z1_e3vn )388 zws(ji,jj,jk) = - 1._wp * ( zzws - MAX( zWv, 0._wp ) * z1_e3vn )389 zwd(ji,jj,jk) = 1._wp + zdt * ( zzwi + zzws + ( - MAX( zWv, 0._wp ) + MIN( zWv, 0._wp ) ) * z1_e3vn )391 zwi(ji,jj,jk) = zzwi - zdt * MIN( zWv, 0._wp ) * z1_e3va 392 zws(ji,jj,jk) = zzws + zdt * MAX( zWv, 0._wp ) * z1_e3va 393 zwd(ji,jj,jk) = 1._wp - zzwi - zzws - zdt * ( - MAX( zWv, 0._wp ) + MIN( zWv, 0._wp ) ) * z1_e3va 390 394 END DO 391 395 END DO … … 399 403 DO ji = fs_2, fs_jpim1 ! vector opt. 400 404 ze3va = ( 1._wp - r_vvl ) * e3v_n(ji,jj,jk) + r_vvl * e3v_a(ji,jj,jk) ! after scale factor at U-point 401 zzwi = ( avm(ji,jj+1,jk ) + avm(ji,jj,jk ) + akzv(ji,jj,jk ) ) &402 & / ( ze3va * e3vw_ a(ji,jj,jk ) ) * wvmask(ji,jj,jk )403 zzws = ( avm(ji,jj+1,jk+1) + avm(ji,jj,jk+1) + akzv(ji,jj,jk+1) ) &404 & / ( ze3va * e3vw_ a(ji,jj,jk+1) ) * wvmask(ji,jj,jk+1)405 zWvi = 0.5_wp * ( wi(ji,jj,jk ) + wi(ji,jj+1,jk ) ) 406 zWvs = 0.5_wp * ( wi(ji,jj,jk+1) + wi(ji,jj+1,jk+1) ) 407 zwi(ji,jj,jk) = - 1._wp * ( zzwi + MIN( zWvi, 0._wp ) )408 zws(ji,jj,jk) = - 1._wp * ( zzws - MAX( zWvs, 0._wp ))409 zwd(ji,jj,jk) = 1._wp + zdt * ( zzwi + zzws- MAX( zWvi, 0._wp ) + MIN( zWvs, 0._wp ) )405 zzwi = - zdt * ( avm(ji,jj+1,jk ) + avm(ji,jj,jk ) + akzv(ji,jj,jk ) ) & 406 & / ( ze3va * e3vw_n(ji,jj,jk ) ) * wvmask(ji,jj,jk ) 407 zzws = - zdt * ( avm(ji,jj+1,jk+1) + avm(ji,jj,jk+1) + akzv(ji,jj,jk+1) ) & 408 & / ( ze3va * e3vw_n(ji,jj,jk+1) ) * wvmask(ji,jj,jk+1) 409 zWvi = 0.5_wp * ( wi(ji,jj,jk ) + wi(ji,jj+1,jk ) ) * wvmask(ji,jj,jk ) 410 zWvs = 0.5_wp * ( wi(ji,jj,jk+1) + wi(ji,jj+1,jk+1) ) * wvmask(ji,jj,jk+1) 411 zwi(ji,jj,jk) = zzwi - zdt * MIN( zWvi, 0._wp ) 412 zws(ji,jj,jk) = zzws + zdt * MAX( zWvs, 0._wp ) 413 zwd(ji,jj,jk) = 1._wp - zzwi - zzws - zdt * ( - MAX( zWvi, 0._wp ) + MIN( zWvs, 0._wp ) ) 410 414 END DO 411 415 END DO … … 416 420 DO ji = fs_2, fs_jpim1 ! vector opt. 417 421 ze3va = ( 1._wp - r_vvl ) * e3v_n(ji,jj,jk) + r_vvl * e3v_a(ji,jj,jk) ! after scale factor at U-point 418 zzwi = ( avm(ji,jj+1,jk ) + avm(ji,jj,jk ) ) / ( ze3va * e3vw_a(ji,jj,jk ) ) * wvmask(ji,jj,jk )419 zzws = ( avm(ji,jj+1,jk+1) + avm(ji,jj,jk+1) ) / ( ze3va * e3vw_a(ji,jj,jk+1) ) * wvmask(ji,jj,jk+1)420 zWvi = 0.5_wp * ( wi(ji,jj,jk ) + wi(ji,jj+1,jk ) ) 421 zWvs = 0.5_wp * ( wi(ji,jj,jk+1) + wi(ji,jj+1,jk+1) ) 422 zwi(ji,jj,jk) = - 1._wp * ( zzwi + MIN( zWvi, 0._wp ) )423 zws(ji,jj,jk) = - 1._wp * ( zzws - MAX( zWvs, 0._wp ))424 zwd(ji,jj,jk) = 1._wp + zdt * ( zzwi + zzws- MAX( zWvi, 0._wp ) + MIN( zWvs, 0._wp ) )422 zzwi = - zdt * ( avm(ji,jj+1,jk ) + avm(ji,jj,jk ) ) / ( ze3va * e3vw_n(ji,jj,jk ) ) * wvmask(ji,jj,jk ) 423 zzws = - zdt * ( avm(ji,jj+1,jk+1) + avm(ji,jj,jk+1) ) / ( ze3va * e3vw_n(ji,jj,jk+1) ) * wvmask(ji,jj,jk+1) 424 zWvi = 0.5_wp * ( wi(ji,jj,jk ) + wi(ji,jj+1,jk ) ) * wvmask(ji,jj,jk ) 425 zWvs = 0.5_wp * ( wi(ji,jj,jk+1) + wi(ji,jj+1,jk+1) ) * wvmask(ji,jj,jk+1) 426 zwi(ji,jj,jk) = zzwi - zdt * MIN( zWvi, 0._wp ) 427 zws(ji,jj,jk) = zzws + zdt * MAX( zWvs, 0._wp ) 428 zwd(ji,jj,jk) = 1._wp - zzwi - zzws - zdt * ( - MAX( zWvi, 0._wp ) + MIN( zWvs, 0._wp ) ) 425 429 END DO 426 430 END DO … … 439 443 zzws = - zdt * ( avm(ji,jj+1,jk+1) + avm(ji,jj,jk+1) + akzv(ji,jj,jk+1) ) & 440 444 & / ( ze3va * e3vw_n(ji,jj,jk+1) ) * wvmask(ji,jj,jk+1) 441 zwi(ji,jj,jk) = zzwi * wvmask(ji,jj,jk )442 zws(ji,jj,jk) = zzws * wvmask(ji,jj,jk+1)445 zwi(ji,jj,jk) = zzwi 446 zws(ji,jj,jk) = zzws 443 447 zwd(ji,jj,jk) = 1._wp - zzwi - zzws 444 448 END DO … … 452 456 zzwi = - zdt * ( avm(ji,jj+1,jk ) + avm(ji,jj,jk ) ) / ( ze3va * e3vw_n(ji,jj,jk ) ) * wvmask(ji,jj,jk ) 453 457 zzws = - zdt * ( avm(ji,jj+1,jk+1) + avm(ji,jj,jk+1) ) / ( ze3va * e3vw_n(ji,jj,jk+1) ) * wvmask(ji,jj,jk+1) 454 zwi(ji,jj,jk) = zzwi * wvmask(ji,jj,jk )455 zws(ji,jj,jk) = zzws * wvmask(ji,jj,jk+1)458 zwi(ji,jj,jk) = zzwi 459 zws(ji,jj,jk) = zzws 456 460 zwd(ji,jj,jk) = 1._wp - zzwi - zzws 457 461 END DO
Note: See TracChangeset
for help on using the changeset viewer.