Changeset 10989
- Timestamp:
- 2019-05-16T17:45:46+02:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src
- Files:
-
- 11 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/NST/agrif_oce_interp.F90
r10068 r10989 107 107 ! 108 108 IF( .NOT.ln_dynspg_ts ) THEN ! Store transport 109 u a_b(ibdy1:ibdy2,:) = 0._wp109 uu_b(ibdy1:ibdy2,:,Krhs) = 0._wp 110 110 DO jk = 1, jpkm1 111 111 DO jj = 1, jpj 112 u a_b(ibdy1:ibdy2,jj) = ua_b(ibdy1:ibdy2,jj) &113 & + e3u _a(ibdy1:ibdy2,jj,jk) * ua(ibdy1:ibdy2,jj,jk) * umask(ibdy1:ibdy2,jj,jk)112 uu_b(ibdy1:ibdy2,jj,Krhs) = uu_b(ibdy1:ibdy2,jj,Krhs) & 113 & + e3u(ibdy1:ibdy2,jj,jk,Krhs) * uu(ibdy1:ibdy2,jj,jk,Krhs) * umask(ibdy1:ibdy2,jj,jk) 114 114 END DO 115 115 END DO 116 116 DO jj = 1, jpj 117 u a_b(ibdy1:ibdy2,jj) = ua_b(ibdy1:ibdy2,jj) * r1_hu_a(ibdy1:ibdy2,jj)117 uu_b(ibdy1:ibdy2,jj,Krhs) = uu_b(ibdy1:ibdy2,jj,Krhs) * r1_hu_a(ibdy1:ibdy2,jj) 118 118 END DO 119 119 ENDIF … … 122 122 DO jk=1,jpkm1 ! Smooth 123 123 DO jj=j1,j2 124 u a(ibdy2,jj,jk) = 0.25_wp*(ua(ibdy2-1,jj,jk)+2._wp*ua(ibdy2,jj,jk)+ua(ibdy2+1,jj,jk))124 uu(ibdy2,jj,jk,Krhs) = 0.25_wp*(uu(ibdy2-1,jj,jk,Krhs)+2._wp*uu(ibdy2,jj,jk,Krhs)+uu(ibdy2+1,jj,jk,Krhs)) 125 125 END DO 126 126 END DO … … 131 131 DO jj = 1, jpj 132 132 zub(ibdy1:ibdy2,jj) = zub(ibdy1:ibdy2,jj) & 133 & + e3u _a(ibdy1:ibdy2,jj,jk) * ua(ibdy1:ibdy2,jj,jk)*umask(ibdy1:ibdy2,jj,jk)133 & + e3u(ibdy1:ibdy2,jj,jk,Krhs) * uu(ibdy1:ibdy2,jj,jk,Krhs)*umask(ibdy1:ibdy2,jj,jk) 134 134 END DO 135 135 END DO … … 140 140 DO jk = 1, jpkm1 141 141 DO jj = 1, jpj 142 u a(ibdy1:ibdy2,jj,jk) = ( ua(ibdy1:ibdy2,jj,jk) &143 & + u a_b(ibdy1:ibdy2,jj)-zub(ibdy1:ibdy2,jj)) * umask(ibdy1:ibdy2,jj,jk)142 uu(ibdy1:ibdy2,jj,jk,Krhs) = ( uu(ibdy1:ibdy2,jj,jk,Krhs) & 143 & + uu_b(ibdy1:ibdy2,jj,Krhs)-zub(ibdy1:ibdy2,jj)) * umask(ibdy1:ibdy2,jj,jk) 144 144 END DO 145 145 END DO … … 150 150 DO jj = 1, jpj 151 151 zvb(ibdy1:ibdy2,jj) = zvb(ibdy1:ibdy2,jj) & 152 & + e3v _a(ibdy1:ibdy2,jj,jk) * va(ibdy1:ibdy2,jj,jk) * vmask(ibdy1:ibdy2,jj,jk)152 & + e3v(ibdy1:ibdy2,jj,jk,Krhs) * vv(ibdy1:ibdy2,jj,jk,Krhs) * vmask(ibdy1:ibdy2,jj,jk) 153 153 END DO 154 154 END DO … … 158 158 DO jk = 1, jpkm1 159 159 DO jj = 1, jpj 160 v a(ibdy1:ibdy2,jj,jk) = ( va(ibdy1:ibdy2,jj,jk) &161 & + v a_b(ibdy1:ibdy2,jj)-zvb(ibdy1:ibdy2,jj))*vmask(ibdy1:ibdy2,jj,jk)160 vv(ibdy1:ibdy2,jj,jk,Krhs) = ( vv(ibdy1:ibdy2,jj,jk,Krhs) & 161 & + vv_b(ibdy1:ibdy2,jj,Krhs)-zvb(ibdy1:ibdy2,jj))*vmask(ibdy1:ibdy2,jj,jk) 162 162 END DO 163 163 END DO … … 166 166 DO jk = 1, jpkm1 ! Mask domain edges 167 167 DO jj = 1, jpj 168 u a(1,jj,jk) = 0._wp169 v a(1,jj,jk) = 0._wp168 uu(1,jj,jk,Krhs) = 0._wp 169 vv(1,jj,jk,Krhs) = 0._wp 170 170 END DO 171 171 END DO … … 178 178 ! 179 179 IF( .NOT.ln_dynspg_ts ) THEN ! Store transport 180 u a_b(ibdy1:ibdy2,:) = 0._wp180 uu_b(ibdy1:ibdy2,:,Krhs) = 0._wp 181 181 DO jk = 1, jpkm1 182 182 DO jj = 1, jpj 183 u a_b(ibdy1:ibdy2,jj) = ua_b(ibdy1:ibdy2,jj) &184 & + e3u _a(ibdy1:ibdy2,jj,jk) * ua(ibdy1:ibdy2,jj,jk) * umask(ibdy1:ibdy2,jj,jk)183 uu_b(ibdy1:ibdy2,jj,Krhs) = uu_b(ibdy1:ibdy2,jj,Krhs) & 184 & + e3u(ibdy1:ibdy2,jj,jk,Krhs) * uu(ibdy1:ibdy2,jj,jk,Krhs) * umask(ibdy1:ibdy2,jj,jk) 185 185 END DO 186 186 END DO 187 187 DO jj = 1, jpj 188 u a_b(ibdy1:ibdy2,jj) = ua_b(ibdy1:ibdy2,jj) * r1_hu_a(ibdy1:ibdy2,jj)188 uu_b(ibdy1:ibdy2,jj,Krhs) = uu_b(ibdy1:ibdy2,jj,Krhs) * r1_hu_a(ibdy1:ibdy2,jj) 189 189 END DO 190 190 ENDIF … … 193 193 DO jk=1,jpkm1 ! Smooth 194 194 DO jj=j1,j2 195 u a(ibdy1,jj,jk) = 0.25_wp*(ua(ibdy1-1,jj,jk)+2._wp*ua(ibdy1,jj,jk)+ua(ibdy1+1,jj,jk))195 uu(ibdy1,jj,jk,Krhs) = 0.25_wp*(uu(ibdy1-1,jj,jk,Krhs)+2._wp*uu(ibdy1,jj,jk,Krhs)+uu(ibdy1+1,jj,jk,Krhs)) 196 196 END DO 197 197 END DO … … 202 202 DO jj = 1, jpj 203 203 zub(ibdy1:ibdy2,jj) = zub(ibdy1:ibdy2,jj) & 204 & + e3u _a(ibdy1:ibdy2,jj,jk) * ua(ibdy1:ibdy2,jj,jk) * umask(ibdy1:ibdy2,jj,jk)204 & + e3u(ibdy1:ibdy2,jj,jk,Krhs) * uu(ibdy1:ibdy2,jj,jk,Krhs) * umask(ibdy1:ibdy2,jj,jk) 205 205 END DO 206 206 END DO … … 211 211 DO jk = 1, jpkm1 212 212 DO jj = 1, jpj 213 u a(ibdy1:ibdy2,jj,jk) = ( ua(ibdy1:ibdy2,jj,jk) &214 & + u a_b(ibdy1:ibdy2,jj)-zub(ibdy1:ibdy2,jj))*umask(ibdy1:ibdy2,jj,jk)213 uu(ibdy1:ibdy2,jj,jk,Krhs) = ( uu(ibdy1:ibdy2,jj,jk,Krhs) & 214 & + uu_b(ibdy1:ibdy2,jj,Krhs)-zub(ibdy1:ibdy2,jj))*umask(ibdy1:ibdy2,jj,jk) 215 215 END DO 216 216 END DO … … 223 223 DO jj = 1, jpj 224 224 zvb(ibdy1:ibdy2,jj) = zvb(ibdy1:ibdy2,jj) & 225 & + e3v _a(ibdy1:ibdy2,jj,jk) * va(ibdy1:ibdy2,jj,jk) * vmask(ibdy1:ibdy2,jj,jk)225 & + e3v(ibdy1:ibdy2,jj,jk,Krhs) * vv(ibdy1:ibdy2,jj,jk,Krhs) * vmask(ibdy1:ibdy2,jj,jk) 226 226 END DO 227 227 END DO … … 231 231 DO jk = 1, jpkm1 232 232 DO jj = 1, jpj 233 v a(ibdy1:ibdy2,jj,jk) = ( va(ibdy1:ibdy2,jj,jk) &234 & + v a_b(ibdy1:ibdy2,jj)-zvb(ibdy1:ibdy2,jj)) * vmask(ibdy1:ibdy2,jj,jk)233 vv(ibdy1:ibdy2,jj,jk,Krhs) = ( vv(ibdy1:ibdy2,jj,jk,Krhs) & 234 & + vv_b(ibdy1:ibdy2,jj,Krhs)-zvb(ibdy1:ibdy2,jj)) * vmask(ibdy1:ibdy2,jj,jk) 235 235 END DO 236 236 END DO … … 239 239 DO jk = 1, jpkm1 ! Mask domain edges 240 240 DO jj = 1, jpj 241 u a(nlci-1,jj,jk) = 0._wp242 v a(nlci ,jj,jk) = 0._wp241 uu(nlci-1,jj,jk,Krhs) = 0._wp 242 vv(nlci ,jj,jk,Krhs) = 0._wp 243 243 END DO 244 244 END DO … … 251 251 ! 252 252 IF( .NOT.ln_dynspg_ts ) THEN ! Store transport 253 v a_b(:,jbdy1:jbdy2) = 0._wp253 vv_b(:,jbdy1:jbdy2,Krhs) = 0._wp 254 254 DO jk = 1, jpkm1 255 255 DO ji = 1, jpi 256 v a_b(ji,jbdy1:jbdy2) = va_b(ji,jbdy1:jbdy2) &257 & + e3v _a(ji,jbdy1:jbdy2,jk) * va(ji,jbdy1:jbdy2,jk) * vmask(ji,jbdy1:jbdy2,jk)256 vv_b(ji,jbdy1:jbdy2,Krhs) = vv_b(ji,jbdy1:jbdy2,Krhs) & 257 & + e3v(ji,jbdy1:jbdy2,jk,Krhs) * vv(ji,jbdy1:jbdy2,jk,Krhs) * vmask(ji,jbdy1:jbdy2,jk) 258 258 END DO 259 259 END DO 260 260 DO ji=1,jpi 261 v a_b(ji,jbdy1:jbdy2) = va_b(ji,jbdy1:jbdy2) * r1_hv_a(ji,jbdy1:jbdy2)261 vv_b(ji,jbdy1:jbdy2,Krhs) = vv_b(ji,jbdy1:jbdy2,Krhs) * r1_hv_a(ji,jbdy1:jbdy2) 262 262 END DO 263 263 ENDIF … … 266 266 DO jk = 1, jpkm1 ! Smooth 267 267 DO ji = i1, i2 268 v a(ji,jbdy2,jk) = 0.25_wp*(va(ji,jbdy2-1,jk)+2._wp*va(ji,jbdy2,jk)+va(ji,jbdy2+1,jk))268 vv(ji,jbdy2,jk,Krhs) = 0.25_wp*(vv(ji,jbdy2-1,jk,Krhs)+2._wp*vv(ji,jbdy2,jk,Krhs)+vv(ji,jbdy2+1,jk,Krhs)) 269 269 END DO 270 270 END DO … … 275 275 DO ji=1,jpi 276 276 zvb(ji,jbdy1:jbdy2) = zvb(ji,jbdy1:jbdy2) & 277 & + e3v _a(ji,jbdy1:jbdy2,jk) * va(ji,jbdy1:jbdy2,jk) * vmask(ji,jbdy1:jbdy2,jk)277 & + e3v(ji,jbdy1:jbdy2,jk,Krhs) * vv(ji,jbdy1:jbdy2,jk,Krhs) * vmask(ji,jbdy1:jbdy2,jk) 278 278 END DO 279 279 END DO … … 284 284 DO jk = 1, jpkm1 285 285 DO ji = 1, jpi 286 v a(ji,jbdy1:jbdy2,jk) = ( va(ji,jbdy1:jbdy2,jk) &287 & + v a_b(ji,jbdy1:jbdy2) - zvb(ji,jbdy1:jbdy2) ) * vmask(ji,jbdy1:jbdy2,jk)286 vv(ji,jbdy1:jbdy2,jk,Krhs) = ( vv(ji,jbdy1:jbdy2,jk,Krhs) & 287 & + vv_b(ji,jbdy1:jbdy2,Krhs) - zvb(ji,jbdy1:jbdy2) ) * vmask(ji,jbdy1:jbdy2,jk) 288 288 END DO 289 289 END DO … … 294 294 DO ji = 1, jpi 295 295 zub(ji,jbdy1:jbdy2) = zub(ji,jbdy1:jbdy2) & 296 & + e3u _a(ji,jbdy1:jbdy2,jk) * ua(ji,jbdy1:jbdy2,jk) * umask(ji,jbdy1:jbdy2,jk)296 & + e3u(ji,jbdy1:jbdy2,jk,Krhs) * uu(ji,jbdy1:jbdy2,jk,Krhs) * umask(ji,jbdy1:jbdy2,jk) 297 297 END DO 298 298 END DO … … 303 303 DO jk = 1, jpkm1 304 304 DO ji = 1, jpi 305 u a(ji,jbdy1:jbdy2,jk) = ( ua(ji,jbdy1:jbdy2,jk) &306 & + u a_b(ji,jbdy1:jbdy2) - zub(ji,jbdy1:jbdy2) ) * umask(ji,jbdy1:jbdy2,jk)305 uu(ji,jbdy1:jbdy2,jk,Krhs) = ( uu(ji,jbdy1:jbdy2,jk,Krhs) & 306 & + uu_b(ji,jbdy1:jbdy2,Krhs) - zub(ji,jbdy1:jbdy2) ) * umask(ji,jbdy1:jbdy2,jk) 307 307 END DO 308 308 END DO … … 311 311 DO jk = 1, jpkm1 ! Mask domain edges 312 312 DO ji = 1, jpi 313 u a(ji,1,jk) = 0._wp314 v a(ji,1,jk) = 0._wp313 uu(ji,1,jk,Krhs) = 0._wp 314 vv(ji,1,jk,Krhs) = 0._wp 315 315 END DO 316 316 END DO … … 323 323 ! 324 324 IF( .NOT.ln_dynspg_ts ) THEN ! Store transport 325 v a_b(:,jbdy1:jbdy2) = 0._wp325 vv_b(:,jbdy1:jbdy2,Krhs) = 0._wp 326 326 DO jk = 1, jpkm1 327 327 DO ji = 1, jpi 328 v a_b(ji,jbdy1:jbdy2) = va_b(ji,jbdy1:jbdy2) &329 & + e3v _a(ji,jbdy1:jbdy2,jk) * va(ji,jbdy1:jbdy2,jk) * vmask(ji,jbdy1:jbdy2,jk)328 vv_b(ji,jbdy1:jbdy2,Krhs) = vv_b(ji,jbdy1:jbdy2,Krhs) & 329 & + e3v(ji,jbdy1:jbdy2,jk,Krhs) * vv(ji,jbdy1:jbdy2,jk,Krhs) * vmask(ji,jbdy1:jbdy2,jk) 330 330 END DO 331 331 END DO 332 332 DO ji=1,jpi 333 v a_b(ji,jbdy1:jbdy2) = va_b(ji,jbdy1:jbdy2) * r1_hv_a(ji,jbdy1:jbdy2)333 vv_b(ji,jbdy1:jbdy2,Krhs) = vv_b(ji,jbdy1:jbdy2,Krhs) * r1_hv_a(ji,jbdy1:jbdy2) 334 334 END DO 335 335 ENDIF … … 338 338 DO jk = 1, jpkm1 ! Smooth 339 339 DO ji = i1, i2 340 v a(ji,jbdy1,jk) = 0.25_wp*(va(ji,jbdy1-1,jk)+2._wp*va(ji,jbdy1,jk)+va(ji,jbdy1+1,jk))340 vv(ji,jbdy1,jk,Krhs) = 0.25_wp*(vv(ji,jbdy1-1,jk,Krhs)+2._wp*vv(ji,jbdy1,jk,Krhs)+vv(ji,jbdy1+1,jk,Krhs)) 341 341 END DO 342 342 END DO … … 347 347 DO ji=1,jpi 348 348 zvb(ji,jbdy1:jbdy2) = zvb(ji,jbdy1:jbdy2) & 349 & + e3v _a(ji,jbdy1:jbdy2,jk) * va(ji,jbdy1:jbdy2,jk) * vmask(ji,jbdy1:jbdy2,jk)349 & + e3v(ji,jbdy1:jbdy2,jk,Krhs) * vv(ji,jbdy1:jbdy2,jk,Krhs) * vmask(ji,jbdy1:jbdy2,jk) 350 350 END DO 351 351 END DO … … 356 356 DO jk = 1, jpkm1 357 357 DO ji = 1, jpi 358 v a(ji,jbdy1:jbdy2,jk) = ( va(ji,jbdy1:jbdy2,jk) &359 & + v a_b(ji,jbdy1:jbdy2) - zvb(ji,jbdy1:jbdy2) ) * vmask(ji,jbdy1:jbdy2,jk)358 vv(ji,jbdy1:jbdy2,jk,Krhs) = ( vv(ji,jbdy1:jbdy2,jk,Krhs) & 359 & + vv_b(ji,jbdy1:jbdy2,Krhs) - zvb(ji,jbdy1:jbdy2) ) * vmask(ji,jbdy1:jbdy2,jk) 360 360 END DO 361 361 END DO … … 368 368 DO ji = 1, jpi 369 369 zub(ji,jbdy1:jbdy2) = zub(ji,jbdy1:jbdy2) & 370 & + e3u _a(ji,jbdy1:jbdy2,jk) * ua(ji,jbdy1:jbdy2,jk) * umask(ji,jbdy1:jbdy2,jk)370 & + e3u(ji,jbdy1:jbdy2,jk,Krhs) * uu(ji,jbdy1:jbdy2,jk,Krhs) * umask(ji,jbdy1:jbdy2,jk) 371 371 END DO 372 372 END DO … … 377 377 DO jk = 1, jpkm1 378 378 DO ji = 1, jpi 379 u a(ji,jbdy1:jbdy2,jk) = ( ua(ji,jbdy1:jbdy2,jk) &380 & + u a_b(ji,jbdy1:jbdy2) - zub(ji,jbdy1:jbdy2) ) * umask(ji,jbdy1:jbdy2,jk)379 uu(ji,jbdy1:jbdy2,jk,Krhs) = ( uu(ji,jbdy1:jbdy2,jk,Krhs) & 380 & + uu_b(ji,jbdy1:jbdy2,Krhs) - zub(ji,jbdy1:jbdy2) ) * umask(ji,jbdy1:jbdy2,jk) 381 381 END DO 382 382 END DO … … 385 385 DO jk = 1, jpkm1 ! Mask domain edges 386 386 DO ji = 1, jpi 387 u a(ji,nlcj ,jk) = 0._wp388 v a(ji,nlcj-1,jk) = 0._wp387 uu(ji,nlcj ,jk,Krhs) = 0._wp 388 vv(ji,nlcj-1,jk,Krhs) = 0._wp 389 389 END DO 390 390 END DO … … 520 520 DO jj = 1, jpj 521 521 DO ji = 2, indx 522 ssh a(ji,jj) = hbdy_w(ji-1,jj)522 ssh(ji,jj,Krhs) = hbdy_w(ji-1,jj) 523 523 ENDDO 524 524 ENDDO … … 530 530 DO jj = 1, jpj 531 531 DO ji = indx, nlci-1 532 ssh a(ji,jj) = hbdy_e(ji-indx+1,jj)532 ssh(ji,jj,Krhs) = hbdy_e(ji-indx+1,jj) 533 533 ENDDO 534 534 ENDDO … … 540 540 DO jj = 2, indy 541 541 DO ji = 1, jpi 542 ssh a(ji,jj) = hbdy_s(ji,jj-1)542 ssh(ji,jj,Krhs) = hbdy_s(ji,jj-1) 543 543 ENDDO 544 544 ENDDO … … 550 550 DO jj = indy, nlcj-1 551 551 DO ji = 1, jpi 552 ssh a(ji,jj) = hbdy_n(ji,jj-indy+1)552 ssh(ji,jj,Krhs) = hbdy_n(ji,jj-indy+1) 553 553 ENDDO 554 554 ENDDO … … 659 659 DO jj=j1,j2 660 660 DO ji=i1,i2 661 ptab(ji,jj,jk,jn) = ts n(ji,jj,jk,jn)661 ptab(ji,jj,jk,jn) = ts(ji,jj,jk,jn,Kmm) 662 662 END DO 663 663 END DO … … 669 669 DO jj=j1,j2 670 670 DO ji=i1,i2 671 ptab(ji,jj,jk,jpts+1) = tmask(ji,jj,jk) * e3t _n(ji,jj,jk)671 ptab(ji,jj,jk,jpts+1) = tmask(ji,jj,jk) * e3t(ji,jj,jk,Kmm) 672 672 END DO 673 673 END DO … … 699 699 IF (tmask(iref,jref,jk) == 0) EXIT 700 700 N_out = N_out + 1 701 h_out(jk) = e3t _n(iref,jref,jk)701 h_out(jk) = e3t(iref,jref,jk,Kmm) 702 702 ENDDO 703 703 IF (N_in > 0) THEN … … 713 713 ! 714 714 DO jn=1, jpts 715 ts a(i1:i2,j1:j2,1:jpk,jn)=ptab_child(i1:i2,j1:j2,1:jpk,jn)*tmask(i1:i2,j1:j2,1:jpk)715 ts(i1:i2,j1:j2,1:jpk,jn,Krhs)=ptab_child(i1:i2,j1:j2,1:jpk,jn)*tmask(i1:i2,j1:j2,1:jpk) 716 716 END DO 717 717 … … 737 737 ibdy = nlci-nbghostcells 738 738 DO jn = 1, jpts 739 ts a(ibdy+1,jmin:jmax,1:jpkm1,jn) = z1 * ptab_child(ibdy+1,jmin:jmax,1:jpkm1,jn) + z2 * ptab_child(ibdy,jmin:jmax,1:jpkm1,jn)739 ts(ibdy+1,jmin:jmax,1:jpkm1,jn,Krhs) = z1 * ptab_child(ibdy+1,jmin:jmax,1:jpkm1,jn) + z2 * ptab_child(ibdy,jmin:jmax,1:jpkm1,jn) 740 740 DO jk = 1, jpkm1 741 741 DO jj = jmin,jmax 742 742 IF( umask(ibdy-1,jj,jk) == 0._wp ) THEN 743 ts a(ibdy,jj,jk,jn) = tsa(ibdy+1,jj,jk,jn) * tmask(ibdy,jj,jk)743 ts(ibdy,jj,jk,jn,Krhs) = ts(ibdy+1,jj,jk,jn,Krhs) * tmask(ibdy,jj,jk) 744 744 ELSE 745 ts a(ibdy,jj,jk,jn)=(z4*tsa(ibdy+1,jj,jk,jn)+z3*tsa(ibdy-1,jj,jk,jn))*tmask(ibdy,jj,jk)746 IF( u n(ibdy-1,jj,jk) > 0._wp ) THEN747 ts a(ibdy,jj,jk,jn)=( z6*tsa(ibdy-1,jj,jk,jn)+z5*tsa(ibdy+1,jj,jk,jn) &748 + z7*ts a(ibdy-2,jj,jk,jn) ) * tmask(ibdy,jj,jk)745 ts(ibdy,jj,jk,jn,Krhs)=(z4*ts(ibdy+1,jj,jk,jn,Krhs)+z3*ts(ibdy-1,jj,jk,jn,Krhs))*tmask(ibdy,jj,jk) 746 IF( uu(ibdy-1,jj,jk,Kmm) > 0._wp ) THEN 747 ts(ibdy,jj,jk,jn,Krhs)=( z6*ts(ibdy-1,jj,jk,jn,Krhs)+z5*ts(ibdy+1,jj,jk,jn,Krhs) & 748 + z7*ts(ibdy-2,jj,jk,jn,Krhs) ) * tmask(ibdy,jj,jk) 749 749 ENDIF 750 750 ENDIF … … 752 752 END DO 753 753 ! Restore ghost points: 754 ts a(ibdy+1,jmin:jmax,1:jpkm1,jn) = ptab_child(ibdy+1,jmin:jmax,1:jpkm1,jn) * tmask(ibdy+1,jmin:jmax,1:jpkm1)754 ts(ibdy+1,jmin:jmax,1:jpkm1,jn,Krhs) = ptab_child(ibdy+1,jmin:jmax,1:jpkm1,jn) * tmask(ibdy+1,jmin:jmax,1:jpkm1) 755 755 END DO 756 756 ENDIF … … 766 766 jbdy = nlcj-nbghostcells 767 767 DO jn = 1, jpts 768 ts a(imin:imax,jbdy+1,1:jpkm1,jn) = z1 * ptab_child(imin:imax,jbdy+1,1:jpkm1,jn) + z2 * ptab_child(imin:imax,jbdy,1:jpkm1,jn)768 ts(imin:imax,jbdy+1,1:jpkm1,jn,Krhs) = z1 * ptab_child(imin:imax,jbdy+1,1:jpkm1,jn) + z2 * ptab_child(imin:imax,jbdy,1:jpkm1,jn) 769 769 DO jk = 1, jpkm1 770 770 DO ji = imin,imax 771 771 IF( vmask(ji,jbdy-1,jk) == 0._wp ) THEN 772 ts a(ji,jbdy,jk,jn) = tsa(ji,jbdy+1,jk,jn) * tmask(ji,jbdy,jk)772 ts(ji,jbdy,jk,jn,Krhs) = ts(ji,jbdy+1,jk,jn,Krhs) * tmask(ji,jbdy,jk) 773 773 ELSE 774 ts a(ji,jbdy,jk,jn)=(z4*tsa(ji,jbdy+1,jk,jn)+z3*tsa(ji,jbdy-1,jk,jn))*tmask(ji,jbdy,jk)775 IF (v n(ji,jbdy-1,jk) > 0._wp ) THEN776 ts a(ji,jbdy,jk,jn)=( z6*tsa(ji,jbdy-1,jk,jn)+z5*tsa(ji,jbdy+1,jk,jn) &777 + z7*ts a(ji,jbdy-2,jk,jn) ) * tmask(ji,jbdy,jk)774 ts(ji,jbdy,jk,jn,Krhs)=(z4*ts(ji,jbdy+1,jk,jn,Krhs)+z3*ts(ji,jbdy-1,jk,jn,Krhs))*tmask(ji,jbdy,jk) 775 IF (vv(ji,jbdy-1,jk,Kmm) > 0._wp ) THEN 776 ts(ji,jbdy,jk,jn,Krhs)=( z6*ts(ji,jbdy-1,jk,jn,Krhs)+z5*ts(ji,jbdy+1,jk,jn,Krhs) & 777 + z7*ts(ji,jbdy-2,jk,jn,Krhs) ) * tmask(ji,jbdy,jk) 778 778 ENDIF 779 779 ENDIF … … 781 781 END DO 782 782 ! Restore ghost points: 783 ts a(imin:imax,jbdy+1,1:jpkm1,jn) = ptab_child(imin:imax,jbdy+1,1:jpkm1,jn) * tmask(imin:imax,jbdy+1,1:jpkm1)783 ts(imin:imax,jbdy+1,1:jpkm1,jn,Krhs) = ptab_child(imin:imax,jbdy+1,1:jpkm1,jn) * tmask(imin:imax,jbdy+1,1:jpkm1) 784 784 END DO 785 785 ENDIF … … 795 795 ibdy = 1+nbghostcells 796 796 DO jn = 1, jpts 797 ts a(ibdy-1,jmin:jmax,1:jpkm1,jn) = z1 * ptab_child(ibdy-1,jmin:jmax,1:jpkm1,jn) + z2 * ptab_child(ibdy,jmin:jmax,1:jpkm1,jn)797 ts(ibdy-1,jmin:jmax,1:jpkm1,jn,Krhs) = z1 * ptab_child(ibdy-1,jmin:jmax,1:jpkm1,jn) + z2 * ptab_child(ibdy,jmin:jmax,1:jpkm1,jn) 798 798 DO jk = 1, jpkm1 799 799 DO jj = jmin,jmax 800 800 IF( umask(ibdy,jj,jk) == 0._wp ) THEN 801 ts a(ibdy,jj,jk,jn) = tsa(ibdy-1,jj,jk,jn) * tmask(ibdy,jj,jk)801 ts(ibdy,jj,jk,jn,Krhs) = ts(ibdy-1,jj,jk,jn,Krhs) * tmask(ibdy,jj,jk) 802 802 ELSE 803 ts a(ibdy,jj,jk,jn)=(z4*tsa(ibdy-1,jj,jk,jn)+z3*tsa(ibdy+1,jj,jk,jn))*tmask(ibdy,jj,jk)804 IF( u n(ibdy,jj,jk) < 0._wp ) THEN805 ts a(ibdy,jj,jk,jn)=( z6*tsa(ibdy+1,jj,jk,jn)+z5*tsa(ibdy-1,jj,jk,jn) &806 + z7*ts a(ibdy+2,jj,jk,jn) ) * tmask(ibdy,jj,jk)803 ts(ibdy,jj,jk,jn,Krhs)=(z4*ts(ibdy-1,jj,jk,jn,Krhs)+z3*ts(ibdy+1,jj,jk,jn,Krhs))*tmask(ibdy,jj,jk) 804 IF( uu(ibdy,jj,jk,Kmm) < 0._wp ) THEN 805 ts(ibdy,jj,jk,jn,Krhs)=( z6*ts(ibdy+1,jj,jk,jn,Krhs)+z5*ts(ibdy-1,jj,jk,jn,Krhs) & 806 + z7*ts(ibdy+2,jj,jk,jn,Krhs) ) * tmask(ibdy,jj,jk) 807 807 ENDIF 808 808 ENDIF … … 810 810 END DO 811 811 ! Restore ghost points: 812 ts a(ibdy-1,jmin:jmax,1:jpkm1,jn) = ptab_child(ibdy-1,jmin:jmax,1:jpkm1,jn) * tmask(ibdy-1,jmin:jmax,1:jpkm1)812 ts(ibdy-1,jmin:jmax,1:jpkm1,jn,Krhs) = ptab_child(ibdy-1,jmin:jmax,1:jpkm1,jn) * tmask(ibdy-1,jmin:jmax,1:jpkm1) 813 813 END DO 814 814 ENDIF … … 824 824 jbdy=1+nbghostcells 825 825 DO jn = 1, jpts 826 ts a(imin:imax,jbdy-1,1:jpkm1,jn) = z1 * ptab_child(imin:imax,jbdy-1,1:jpkm1,jn) + z2 * ptab_child(imin:imax,jbdy,1:jpkm1,jn)826 ts(imin:imax,jbdy-1,1:jpkm1,jn,Krhs) = z1 * ptab_child(imin:imax,jbdy-1,1:jpkm1,jn) + z2 * ptab_child(imin:imax,jbdy,1:jpkm1,jn) 827 827 DO jk = 1, jpkm1 828 828 DO ji = imin,imax 829 829 IF( vmask(ji,jbdy,jk) == 0._wp ) THEN 830 ts a(ji,jbdy,jk,jn)=tsa(ji,jbdy-1,jk,jn) * tmask(ji,jbdy,jk)830 ts(ji,jbdy,jk,jn,Krhs)=ts(ji,jbdy-1,jk,jn,Krhs) * tmask(ji,jbdy,jk) 831 831 ELSE 832 ts a(ji,jbdy,jk,jn)=(z4*tsa(ji,jbdy-1,jk,jn)+z3*tsa(ji,jbdy+1,jk,jn))*tmask(ji,jbdy,jk)833 IF( v n(ji,jbdy,jk) < 0._wp ) THEN834 ts a(ji,jbdy,jk,jn)=( z6*tsa(ji,jbdy+1,jk,jn)+z5*tsa(ji,jbdy-1,jk,jn) &835 + z7*ts a(ji,jbdy+2,jk,jn) ) * tmask(ji,jbdy,jk)832 ts(ji,jbdy,jk,jn,Krhs)=(z4*ts(ji,jbdy-1,jk,jn,Krhs)+z3*ts(ji,jbdy+1,jk,jn,Krhs))*tmask(ji,jbdy,jk) 833 IF( vv(ji,jbdy,jk,Kmm) < 0._wp ) THEN 834 ts(ji,jbdy,jk,jn,Krhs)=( z6*ts(ji,jbdy+1,jk,jn,Krhs)+z5*ts(ji,jbdy-1,jk,jn,Krhs) & 835 + z7*ts(ji,jbdy+2,jk,jn,Krhs) ) * tmask(ji,jbdy,jk) 836 836 ENDIF 837 837 ENDIF … … 839 839 END DO 840 840 ! Restore ghost points: 841 ts a(imin:imax,jbdy-1,1:jpkm1,jn) = ptab_child(imin:imax,jbdy-1,1:jpkm1,jn) * tmask(imin:imax,jbdy-1,1:jpkm1)841 ts(imin:imax,jbdy-1,1:jpkm1,jn,Krhs) = ptab_child(imin:imax,jbdy-1,1:jpkm1,jn) * tmask(imin:imax,jbdy-1,1:jpkm1) 842 842 END DO 843 843 ENDIF … … 861 861 ! 862 862 IF( before) THEN 863 ptab(i1:i2,j1:j2) = ssh n(i1:i2,j1:j2)863 ptab(i1:i2,j1:j2) = ssh(i1:i2,j1:j2,Kmm) 864 864 ELSE 865 865 western_side = (nb == 1).AND.(ndir == 1) … … 900 900 DO jj=j1,j2 901 901 DO ji=i1,i2 902 ptab(ji,jj,jk,1) = (e2u(ji,jj) * e3u _n(ji,jj,jk) * un(ji,jj,jk)*umask(ji,jj,jk))902 ptab(ji,jj,jk,1) = (e2u(ji,jj) * e3u(ji,jj,jk,Kmm) * uu(ji,jj,jk,Kmm)*umask(ji,jj,jk)) 903 903 # if defined key_vertical 904 ptab(ji,jj,jk,2) = (umask(ji,jj,jk) * e2u(ji,jj) * e3u _n(ji,jj,jk))904 ptab(ji,jj,jk,2) = (umask(ji,jj,jk) * e2u(ji,jj) * e3u(ji,jj,jk,Kmm)) 905 905 # endif 906 906 END DO … … 928 928 929 929 IF (N_in == 0) THEN 930 u a(ji,jj,:) = 0._wp930 uu(ji,jj,:,Krhs) = 0._wp 931 931 CYCLE 932 932 ENDIF … … 936 936 if (umask(iref,jj,jk) == 0) EXIT 937 937 N_out = N_out + 1 938 h_out(N_out) = e3u _a(iref,jj,jk)938 h_out(N_out) = e3u(iref,jj,jk,Krhs) 939 939 ENDDO 940 940 941 941 IF (N_out == 0) THEN 942 u a(ji,jj,:) = 0._wp942 uu(ji,jj,:,Krhs) = 0._wp 943 943 CYCLE 944 944 ENDIF … … 952 952 endif 953 953 ENDIF 954 call reconstructandremap(tabin(1:N_in),h_in(1:N_in),u a(ji,jj,1:N_out),h_out(1:N_out),N_in,N_out)954 call reconstructandremap(tabin(1:N_in),h_in(1:N_in),uu(ji,jj,1:N_out,Krhs),h_out(1:N_out),N_in,N_out) 955 955 ENDDO 956 956 ENDDO … … 959 959 DO jk = 1, jpkm1 960 960 DO jj=j1,j2 961 u a(i1:i2,jj,jk) = ptab(i1:i2,jj,jk,1) / ( zrhoy * e2u(i1:i2,jj) * e3u_a(i1:i2,jj,jk) )961 uu(i1:i2,jj,jk,Krhs) = ptab(i1:i2,jj,jk,1) / ( zrhoy * e2u(i1:i2,jj) * e3u(i1:i2,jj,jk,Krhs) ) 962 962 END DO 963 963 END DO … … 992 992 DO jj=j1,j2 993 993 DO ji=i1,i2 994 ptab(ji,jj,jk,1) = (e1v(ji,jj) * e3v _n(ji,jj,jk) * vn(ji,jj,jk)*vmask(ji,jj,jk))994 ptab(ji,jj,jk,1) = (e1v(ji,jj) * e3v(ji,jj,jk,Kmm) * vv(ji,jj,jk,Kmm)*vmask(ji,jj,jk)) 995 995 # if defined key_vertical 996 ptab(ji,jj,jk,2) = vmask(ji,jj,jk) * e1v(ji,jj) * e3v _n(ji,jj,jk)996 ptab(ji,jj,jk,2) = vmask(ji,jj,jk) * e1v(ji,jj) * e3v(ji,jj,jk,Kmm) 997 997 # endif 998 998 END DO … … 1019 1019 END DO 1020 1020 IF (N_in == 0) THEN 1021 v a(ji,jj,:) = 0._wp1021 vv(ji,jj,:,Krhs) = 0._wp 1022 1022 CYCLE 1023 1023 ENDIF … … 1027 1027 if (vmask(ji,jref,jk) == 0) EXIT 1028 1028 N_out = N_out + 1 1029 h_out(N_out) = e3v _a(ji,jref,jk)1029 h_out(N_out) = e3v(ji,jref,jk,Krhs) 1030 1030 END DO 1031 1031 IF (N_out == 0) THEN 1032 v a(ji,jj,:) = 0._wp1032 vv(ji,jj,:,Krhs) = 0._wp 1033 1033 CYCLE 1034 1034 ENDIF 1035 call reconstructandremap(tabin(1:N_in),h_in(1:N_in),v a(ji,jj,1:N_out),h_out(1:N_out),N_in,N_out)1035 call reconstructandremap(tabin(1:N_in),h_in(1:N_in),vv(ji,jj,1:N_out,Krhs),h_out(1:N_out),N_in,N_out) 1036 1036 END DO 1037 1037 END DO 1038 1038 # else 1039 1039 DO jk = 1, jpkm1 1040 v a(i1:i2,j1:j2,jk) = ptab(i1:i2,j1:j2,jk,1) / ( zrhox * e1v(i1:i2,j1:j2) * e3v_a(i1:i2,j1:j2,jk) )1040 vv(i1:i2,j1:j2,jk,Krhs) = ptab(i1:i2,j1:j2,jk,1) / ( zrhox * e1v(i1:i2,j1:j2) * e3v(i1:i2,j1:j2,jk,Krhs) ) 1041 1041 END DO 1042 1042 # endif … … 1060 1060 ! 1061 1061 IF( before ) THEN 1062 ptab(i1:i2,j1:j2) = e2u(i1:i2,j1:j2) * hu_n(i1:i2,j1:j2) * u n_b(i1:i2,j1:j2)1062 ptab(i1:i2,j1:j2) = e2u(i1:i2,j1:j2) * hu_n(i1:i2,j1:j2) * uu_b(i1:i2,j1:j2,Kmm) 1063 1063 ELSE 1064 1064 western_side = (nb == 1).AND.(ndir == 1) … … 1113 1113 ! 1114 1114 IF( before ) THEN 1115 ptab(i1:i2,j1:j2) = e1v(i1:i2,j1:j2) * hv_n(i1:i2,j1:j2) * v n_b(i1:i2,j1:j2)1115 ptab(i1:i2,j1:j2) = e1v(i1:i2,j1:j2) * hv_n(i1:i2,j1:j2) * vv_b(i1:i2,j1:j2,Kmm) 1116 1116 ELSE 1117 1117 western_side = (nb == 1).AND.(ndir == 1) … … 1394 1394 DO jj=j1,j2 1395 1395 DO ji=i1,i2 1396 ptab(ji,jj,jk,2) = wmask(ji,jj,jk) * e3w _n(ji,jj,jk)1396 ptab(ji,jj,jk,2) = wmask(ji,jj,jk) * e3w(ji,jj,jk,Kmm) 1397 1397 END DO 1398 1398 END DO … … 1415 1415 IF (wmask(ji,jj,jk) == 0) EXIT 1416 1416 N_out = N_out + 1 1417 h_out(jk) = e3t _n(ji,jj,jk)1417 h_out(jk) = e3t(ji,jj,jk,Kmm) 1418 1418 ENDDO 1419 1419 IF (N_in > 0) THEN -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/NST/agrif_oce_sponge.F90
r10425 r10989 218 218 DO jj=j1,j2 219 219 DO ji=i1,i2 220 tabres(ji,jj,jk,jn) = ts b(ji,jj,jk,jn)220 tabres(ji,jj,jk,jn) = ts(ji,jj,jk,jn,Kbb) 221 221 END DO 222 222 END DO … … 228 228 DO jj=j1,j2 229 229 DO ji=i1,i2 230 tabres(ji,jj,jk,jpts+1) = tmask(ji,jj,jk) * e3t _n(ji,jj,jk)230 tabres(ji,jj,jk,jpts+1) = tmask(ji,jj,jk) * e3t(ji,jj,jk,Kmm) 231 231 END DO 232 232 END DO … … 251 251 IF (tmask(ji,jj,jk) == 0) EXIT 252 252 N_out = N_out + 1 253 h_out(jk) = e3t _n(ji,jj,jk) !Child grid scale factors. Could multiply by e1e2t here instead of division above253 h_out(jk) = e3t(ji,jj,jk,Kmm) !Child grid scale factors. Could multiply by e1e2t here instead of division above 254 254 ENDDO 255 255 IF (N_in > 0) THEN … … 268 268 DO jk=1,jpkm1 269 269 # if defined key_vertical 270 tsbdiff(ji,jj,jk,1:jpts) = ts b(ji,jj,jk,1:jpts) - tabres_child(ji,jj,jk,1:jpts)270 tsbdiff(ji,jj,jk,1:jpts) = ts(ji,jj,jk,1:jpts,Kbb) - tabres_child(ji,jj,jk,1:jpts) 271 271 # else 272 tsbdiff(ji,jj,jk,1:jpts) = ts b(ji,jj,jk,1:jpts) - tabres(ji,jj,jk,1:jpts)272 tsbdiff(ji,jj,jk,1:jpts) = ts(ji,jj,jk,1:jpts,Kbb) - tabres(ji,jj,jk,1:jpts) 273 273 # endif 274 274 ENDDO … … 281 281 DO jj = j1,j2 282 282 DO ji = i1,i2-1 283 zabe1 = fsaht_spu(ji,jj) * umask(ji,jj,jk) * e2_e1u(ji,jj) * e3u _n(ji,jj,jk)283 zabe1 = fsaht_spu(ji,jj) * umask(ji,jj,jk) * e2_e1u(ji,jj) * e3u(ji,jj,jk,Kmm) 284 284 ztu(ji,jj,jk) = zabe1 * ( tsbdiff(ji+1,jj ,jk,jn) - tsbdiff(ji,jj,jk,jn) ) 285 285 END DO … … 288 288 DO ji = i1,i2 289 289 DO jj = j1,j2-1 290 zabe2 = fsaht_spv(ji,jj) * vmask(ji,jj,jk) * e1_e2v(ji,jj) * e3v _n(ji,jj,jk)290 zabe2 = fsaht_spv(ji,jj) * vmask(ji,jj,jk) * e1_e2v(ji,jj) * e3v(ji,jj,jk,Kmm) 291 291 ztv(ji,jj,jk) = zabe2 * ( tsbdiff(ji ,jj+1,jk,jn) - tsbdiff(ji,jj,jk,jn) ) 292 292 END DO … … 310 310 DO ji = i1+1,i2-1 311 311 IF (.NOT. tabspongedone_tsn(ji,jj)) THEN 312 zbtr = r1_e1e2t(ji,jj) / e3t _n(ji,jj,jk)312 zbtr = r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm) 313 313 ! horizontal diffusive trends 314 314 ztsa = zbtr * ( ztu(ji,jj,jk) - ztu(ji-1,jj,jk) + ztv(ji,jj,jk) - ztv(ji,jj-1,jk) ) 315 315 ! add it to the general tracer trends 316 ts a(ji,jj,jk,jn) = tsa(ji,jj,jk,jn) + ztsa316 ts(ji,jj,jk,jn,Krhs) = ts(ji,jj,jk,jn,Krhs) + ztsa 317 317 ENDIF 318 318 END DO … … 353 353 DO jj=j1,j2 354 354 DO ji=i1,i2 355 tabres(ji,jj,jk,m1) = u b(ji,jj,jk)355 tabres(ji,jj,jk,m1) = uu(ji,jj,jk,Kbb) 356 356 # if defined key_vertical 357 tabres(ji,jj,jk,m2) = e3u _n(ji,jj,jk)*umask(ji,jj,jk)357 tabres(ji,jj,jk,m2) = e3u(ji,jj,jk,Kmm)*umask(ji,jj,jk) 358 358 # endif 359 359 END DO … … 384 384 if (umask(ji,jj,jk) == 0) EXIT 385 385 N_out = N_out + 1 386 h_out(N_out) = e3u _n(ji,jj,jk)386 h_out(N_out) = e3u(ji,jj,jk,Kmm) 387 387 ENDDO 388 388 … … 403 403 ENDDO 404 404 405 ubdiff(i1:i2,j1:j2,:) = (u b(i1:i2,j1:j2,:) - tabres_child(i1:i2,j1:j2,:))*umask(i1:i2,j1:j2,:)405 ubdiff(i1:i2,j1:j2,:) = (uu(i1:i2,j1:j2,:,Kbb) - tabres_child(i1:i2,j1:j2,:))*umask(i1:i2,j1:j2,:) 406 406 #else 407 ubdiff(i1:i2,j1:j2,:) = (u b(i1:i2,j1:j2,:) - tabres(i1:i2,j1:j2,:,1))*umask(i1:i2,j1:j2,:)407 ubdiff(i1:i2,j1:j2,:) = (uu(i1:i2,j1:j2,:,Kbb) - tabres(i1:i2,j1:j2,:,1))*umask(i1:i2,j1:j2,:) 408 408 #endif 409 409 ! … … 416 416 DO jj = j1,j2 417 417 DO ji = i1+1,i2 ! vector opt. 418 zbtr = r1_e1e2t(ji,jj) / e3t _n(ji,jj,jk) * fsahm_spt(ji,jj)419 hdivdiff(ji,jj,jk) = ( e2u(ji ,jj)*e3u _n(ji ,jj,jk) * ubdiff(ji ,jj,jk) &420 & -e2u(ji-1,jj)*e3u _n(ji-1,jj,jk) * ubdiff(ji-1,jj,jk) ) * zbtr418 zbtr = r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm) * fsahm_spt(ji,jj) 419 hdivdiff(ji,jj,jk) = ( e2u(ji ,jj)*e3u(ji ,jj,jk,Kmm) * ubdiff(ji ,jj,jk) & 420 & -e2u(ji-1,jj)*e3u(ji-1,jj,jk,Kmm) * ubdiff(ji-1,jj,jk) ) * zbtr 421 421 END DO 422 422 END DO … … 424 424 DO jj = j1,j2-1 425 425 DO ji = i1,i2 ! vector opt. 426 zbtr = r1_e1e2f(ji,jj) * e3f _n(ji,jj,jk) * fsahm_spf(ji,jj)426 zbtr = r1_e1e2f(ji,jj) * e3f(ji,jj,jk) * fsahm_spf(ji,jj) 427 427 rotdiff(ji,jj,jk) = ( -e1u(ji,jj+1) * ubdiff(ji,jj+1,jk) & 428 428 & +e1u(ji,jj ) * ubdiff(ji,jj ,jk) ) * fmask(ji,jj,jk) * zbtr … … 439 439 ze1v = hdivdiff(ji,jj,jk) 440 440 ! horizontal diffusive trends 441 zua = - ( ze2u - rotdiff (ji,jj-1,jk) ) / ( e2u(ji,jj) * e3u _n(ji,jj,jk) ) &441 zua = - ( ze2u - rotdiff (ji,jj-1,jk) ) / ( e2u(ji,jj) * e3u(ji,jj,jk,Kmm) ) & 442 442 + ( hdivdiff(ji+1,jj,jk) - ze1v ) * r1_e1u(ji,jj) 443 443 444 444 ! add it to the general momentum trends 445 u a(ji,jj,jk) = ua(ji,jj,jk) + zua445 uu(ji,jj,jk,Krhs) = uu(ji,jj,jk,Krhs) + zua 446 446 447 447 END DO … … 465 465 466 466 ! horizontal diffusive trends 467 zva = + ( ze2u - rotdiff (ji-1,jj,jk) ) / ( e1v(ji,jj) * e3v _n(ji,jj,jk) ) &467 zva = + ( ze2u - rotdiff (ji-1,jj,jk) ) / ( e1v(ji,jj) * e3v(ji,jj,jk,Kmm) ) & 468 468 + ( hdivdiff(ji,jj+1,jk) - ze1v ) * r1_e2v(ji,jj) 469 469 470 470 ! add it to the general momentum trends 471 v a(ji,jj,jk) = va(ji,jj,jk) + zva471 vv(ji,jj,jk,Krhs) = vv(ji,jj,jk,Krhs) + zva 472 472 END DO 473 473 ENDIF … … 506 506 DO jj=j1,j2 507 507 DO ji=i1,i2 508 tabres(ji,jj,jk,m1) = v b(ji,jj,jk)508 tabres(ji,jj,jk,m1) = vv(ji,jj,jk,Kbb) 509 509 # if defined key_vertical 510 tabres(ji,jj,jk,m2) = vmask(ji,jj,jk) * e3v _n(ji,jj,jk)510 tabres(ji,jj,jk,m2) = vmask(ji,jj,jk) * e3v(ji,jj,jk,Kmm) 511 511 # endif 512 512 END DO … … 536 536 if (vmask(ji,jj,jk) == 0) EXIT 537 537 N_out = N_out + 1 538 h_out(N_out) = e3v _n(ji,jj,jk)538 h_out(N_out) = e3v(ji,jj,jk,Kmm) 539 539 ENDDO 540 540 … … 549 549 ENDDO 550 550 551 vbdiff(i1:i2,j1:j2,:) = (v b(i1:i2,j1:j2,:) - tabres_child(i1:i2,j1:j2,:))*vmask(i1:i2,j1:j2,:)551 vbdiff(i1:i2,j1:j2,:) = (vv(i1:i2,j1:j2,:,Kbb) - tabres_child(i1:i2,j1:j2,:))*vmask(i1:i2,j1:j2,:) 552 552 # else 553 vbdiff(i1:i2,j1:j2,:) = (v b(i1:i2,j1:j2,:) - tabres(i1:i2,j1:j2,:,1))*vmask(i1:i2,j1:j2,:)553 vbdiff(i1:i2,j1:j2,:) = (vv(i1:i2,j1:j2,:,Kbb) - tabres(i1:i2,j1:j2,:,1))*vmask(i1:i2,j1:j2,:) 554 554 # endif 555 555 ! … … 562 562 DO jj = j1+1,j2 563 563 DO ji = i1,i2 ! vector opt. 564 zbtr = r1_e1e2t(ji,jj) / e3t _n(ji,jj,jk) * fsahm_spt(ji,jj)565 hdivdiff(ji,jj,jk) = ( e1v(ji,jj ) * e3v _n(ji,jj ,jk) * vbdiff(ji,jj ,jk) &566 & -e1v(ji,jj-1) * e3v _n(ji,jj-1,jk) * vbdiff(ji,jj-1,jk) ) * zbtr564 zbtr = r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm) * fsahm_spt(ji,jj) 565 hdivdiff(ji,jj,jk) = ( e1v(ji,jj ) * e3v(ji,jj ,jk,Kmm) * vbdiff(ji,jj ,jk) & 566 & -e1v(ji,jj-1) * e3v(ji,jj-1,jk,Kmm) * vbdiff(ji,jj-1,jk) ) * zbtr 567 567 END DO 568 568 END DO 569 569 DO jj = j1,j2 570 570 DO ji = i1,i2-1 ! vector opt. 571 zbtr = r1_e1e2f(ji,jj) * e3f _n(ji,jj,jk) * fsahm_spf(ji,jj)571 zbtr = r1_e1e2f(ji,jj) * e3f(ji,jj,jk) * fsahm_spf(ji,jj) 572 572 rotdiff(ji,jj,jk) = ( e2v(ji+1,jj) * vbdiff(ji+1,jj,jk) & 573 573 & -e2v(ji ,jj) * vbdiff(ji ,jj,jk) ) * fmask(ji,jj,jk) * zbtr … … 586 586 IF( .NOT. tabspongedone_u(ji,jj) ) THEN 587 587 DO jk = 1, jpkm1 588 u a(ji,jj,jk) = ua(ji,jj,jk) &589 & - ( rotdiff (ji ,jj,jk) - rotdiff (ji,jj-1,jk)) / ( e2u(ji,jj) * e3u _n(ji,jj,jk) ) &588 uu(ji,jj,jk,Krhs) = uu(ji,jj,jk,Krhs) & 589 & - ( rotdiff (ji ,jj,jk) - rotdiff (ji,jj-1,jk)) / ( e2u(ji,jj) * e3u(ji,jj,jk,Kmm) ) & 590 590 & + ( hdivdiff(ji+1,jj,jk) - hdivdiff(ji,jj ,jk)) * r1_e1u(ji,jj) 591 591 END DO … … 600 600 IF( .NOT. tabspongedone_v(ji,jj) ) THEN 601 601 DO jk = 1, jpkm1 602 v a(ji,jj,jk) = va(ji,jj,jk) &603 & + ( rotdiff (ji,jj ,jk) - rotdiff (ji-1,jj,jk) ) / ( e1v(ji,jj) * e3v _n(ji,jj,jk) ) &602 vv(ji,jj,jk,Krhs) = vv(ji,jj,jk,Krhs) & 603 & + ( rotdiff (ji,jj ,jk) - rotdiff (ji-1,jj,jk) ) / ( e1v(ji,jj) * e3v(ji,jj,jk,Kmm) ) & 604 604 & + ( hdivdiff(ji,jj+1,jk) - hdivdiff(ji ,jj,jk) ) * r1_e2v(ji,jj) 605 605 END DO -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/NST/agrif_oce_update.F90
r10068 r10989 230 230 ! ----------------------- 231 231 ! 232 e3u _a(:,:,:) = e3u_n(:,:,:)233 e3v _a(:,:,:) = e3v_n(:,:,:)234 ! u a(:,:,:) = e3u_b(:,:,:)235 ! v a(:,:,:) = e3v_b(:,:,:)232 e3u(:,:,:,Krhs) = e3u(:,:,:,Kmm) 233 e3v(:,:,:,Krhs) = e3v(:,:,:,Kmm) 234 ! uu(:,:,:,Krhs) = e3u(:,:,:,Kbb) 235 ! vv(:,:,:,Krhs) = e3v(:,:,:,Kbb) 236 236 hu_a(:,:) = hu_n(:,:) 237 237 hv_a(:,:) = hv_n(:,:) … … 242 242 ! Vertical scale factor interpolations 243 243 ! ------------------------------------ 244 CALL dom_vvl_interpol( e3t _n(:,:,:), e3u_n(:,:,:) , 'U' )245 CALL dom_vvl_interpol( e3t _n(:,:,:), e3v_n(:,:,:) , 'V' )246 CALL dom_vvl_interpol( e3u _n(:,:,:), e3f_n(:,:,:) , 'F' )247 248 CALL dom_vvl_interpol( e3u _n(:,:,:), e3uw_n(:,:,:), 'UW' )249 CALL dom_vvl_interpol( e3v _n(:,:,:), e3vw_n(:,:,:), 'VW' )244 CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3u(:,:,:,Kmm) , 'U' ) 245 CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3v(:,:,:,Kmm) , 'V' ) 246 CALL dom_vvl_interpol( e3u(:,:,:,Kmm), e3f(:,:,:) , 'F' ) 247 248 CALL dom_vvl_interpol( e3u(:,:,:,Kmm), e3uw(:,:,:,Kmm), 'UW' ) 249 CALL dom_vvl_interpol( e3v(:,:,:,Kmm), e3vw(:,:,:,Kmm), 'VW' ) 250 250 251 251 ! Update total depths: … … 254 254 hv_n(:,:) = 0._wp ! Ocean depth at V-points 255 255 DO jk = 1, jpkm1 256 hu_n(:,:) = hu_n(:,:) + e3u _n(:,:,jk) * umask(:,:,jk)257 hv_n(:,:) = hv_n(:,:) + e3v _n(:,:,jk) * vmask(:,:,jk)256 hu_n(:,:) = hu_n(:,:) + e3u(:,:,jk,Kmm) * umask(:,:,jk) 257 hv_n(:,:) = hv_n(:,:) + e3v(:,:,jk,Kmm) * vmask(:,:,jk) 258 258 END DO 259 259 ! ! Inverse of the local depth … … 268 268 ! Vertical scale factor interpolations 269 269 ! ------------------------------------ 270 CALL dom_vvl_interpol( e3t _b(:,:,:), e3u_b(:,:,:), 'U' )271 CALL dom_vvl_interpol( e3t _b(:,:,:), e3v_b(:,:,:), 'V' )272 273 CALL dom_vvl_interpol( e3u _b(:,:,:), e3uw_b(:,:,:), 'UW' )274 CALL dom_vvl_interpol( e3v _b(:,:,:), e3vw_b(:,:,:), 'VW' )270 CALL dom_vvl_interpol( e3t(:,:,:,Kbb), e3u(:,:,:,Kbb), 'U' ) 271 CALL dom_vvl_interpol( e3t(:,:,:,Kbb), e3v(:,:,:,Kbb), 'V' ) 272 273 CALL dom_vvl_interpol( e3u(:,:,:,Kbb), e3uw(:,:,:,Kbb), 'UW' ) 274 CALL dom_vvl_interpol( e3v(:,:,:,Kbb), e3vw(:,:,:,Kbb), 'VW' ) 275 275 276 276 ! Update total depths: … … 279 279 hv_b(:,:) = 0._wp ! Ocean depth at V-points 280 280 DO jk = 1, jpkm1 281 hu_b(:,:) = hu_b(:,:) + e3u _b(:,:,jk) * umask(:,:,jk)282 hv_b(:,:) = hv_b(:,:) + e3v _b(:,:,jk) * vmask(:,:,jk)281 hu_b(:,:) = hu_b(:,:) + e3u(:,:,jk,Kbb) * umask(:,:,jk) 282 hv_b(:,:) = hv_b(:,:) + e3v(:,:,jk,Kbb) * vmask(:,:,jk) 283 283 END DO 284 284 ! ! Inverse of the local depth … … 315 315 DO jj=j1,j2 316 316 DO ji=i1,i2 317 tabres(ji,jj,jk,jn) = (ts n(ji,jj,jk,jn) * e3t_n(ji,jj,jk) ) &317 tabres(ji,jj,jk,jn) = (ts(ji,jj,jk,jn,Kmm) * e3t(ji,jj,jk,Kmm) ) & 318 318 * tmask(ji,jj,jk) + (tmask(ji,jj,jk)-1)*999._wp 319 319 END DO … … 324 324 DO jj=j1,j2 325 325 DO ji=i1,i2 326 tabres(ji,jj,jk,n2) = tmask(ji,jj,jk) * e3t _n(ji,jj,jk) &326 tabres(ji,jj,jk,n2) = tmask(ji,jj,jk) * e3t(ji,jj,jk,Kmm) & 327 327 + (tmask(ji,jj,jk)-1)*999._wp 328 328 END DO … … 345 345 IF (tmask(ji,jj,jk) < -900) EXIT ! TODO: Will not work with ISF 346 346 N_out = N_out + 1 347 h_out(N_out) = e3t _n(ji,jj,jk)347 h_out(N_out) = e3t(ji,jj,jk,Kmm) 348 348 ENDDO 349 349 IF (N_in > 0) THEN !Remove this? … … 369 369 DO ji=i1,i2 370 370 IF( tabres_child(ji,jj,jk,jn) .NE. 0. ) THEN 371 ts b(ji,jj,jk,jn) = tsb(ji,jj,jk,jn) &371 ts(ji,jj,jk,jn,Kbb) = ts(ji,jj,jk,jn,Kbb) & 372 372 & + atfp * ( tabres_child(ji,jj,jk,jn) & 373 & - ts n(ji,jj,jk,jn) ) * tmask(ji,jj,jk)373 & - ts(ji,jj,jk,jn,Kmm) ) * tmask(ji,jj,jk) 374 374 ENDIF 375 375 ENDDO … … 383 383 DO ji=i1,i2 384 384 IF( tabres_child(ji,jj,jk,jn) .NE. 0. ) THEN 385 ts n(ji,jj,jk,jn) = tabres_child(ji,jj,jk,jn) * tmask(ji,jj,jk)385 ts(ji,jj,jk,jn,Kmm) = tabres_child(ji,jj,jk,jn) * tmask(ji,jj,jk) 386 386 END IF 387 387 END DO … … 413 413 DO ji=i1,i2 414 414 !> jc tmp 415 tabres(ji,jj,jk,jn) = ts n(ji,jj,jk,jn) * e3t_n(ji,jj,jk) / e3t_0(ji,jj,jk)416 ! tabres(ji,jj,jk,jn) = ts n(ji,jj,jk,jn) * e3t_n(ji,jj,jk)415 tabres(ji,jj,jk,jn) = ts(ji,jj,jk,jn,Kmm) * e3t(ji,jj,jk,Kmm) / e3t_0(ji,jj,jk) 416 ! tabres(ji,jj,jk,jn) = ts(ji,jj,jk,jn,Kmm) * e3t(ji,jj,jk,Kmm) 417 417 !< jc tmp 418 418 END DO … … 434 434 DO ji = i1, i2 435 435 IF( tabres(ji,jj,jk,jn) /= 0._wp ) THEN 436 ztb = ts b(ji,jj,jk,jn) * e3t_b(ji,jj,jk) ! fse3t_b prior update should be used436 ztb = ts(ji,jj,jk,jn,Kbb) * e3t(ji,jj,jk,Kbb) ! fse3t_b prior update should be used 437 437 ztnu = tabres(ji,jj,jk,jn) 438 ztno = ts n(ji,jj,jk,jn) * e3t_a(ji,jj,jk)439 ts b(ji,jj,jk,jn) = ( ztb + atfp * ( ztnu - ztno) ) &440 & * tmask(ji,jj,jk) / e3t _b(ji,jj,jk)438 ztno = ts(ji,jj,jk,jn,Kmm) * e3t(ji,jj,jk,Krhs) 439 ts(ji,jj,jk,jn,Kbb) = ( ztb + atfp * ( ztnu - ztno) ) & 440 & * tmask(ji,jj,jk) / e3t(ji,jj,jk,Kbb) 441 441 ENDIF 442 442 END DO … … 450 450 DO ji=i1,i2 451 451 IF( tabres(ji,jj,jk,jn) /= 0._wp ) THEN 452 ts n(ji,jj,jk,jn) = tabres(ji,jj,jk,jn) / e3t_n(ji,jj,jk)452 ts(ji,jj,jk,jn,Kmm) = tabres(ji,jj,jk,jn) / e3t(ji,jj,jk,Kmm) 453 453 END IF 454 454 END DO … … 458 458 ! 459 459 IF ((neuler==0).AND.(Agrif_Nb_Step()==0) ) THEN 460 ts b(i1:i2,j1:j2,k1:k2,1:jpts) = tsn(i1:i2,j1:j2,k1:k2,1:jpts)460 ts(i1:i2,j1:j2,k1:k2,1:jpts,Kbb) = ts(i1:i2,j1:j2,k1:k2,1:jpts,Kmm) 461 461 ENDIF 462 462 ! … … 495 495 DO jj=j1,j2 496 496 DO ji=i1,i2 497 tabres(ji,jj,jk,1) = zrhoy * e2u(ji,jj) * e3u _n(ji,jj,jk) * umask(ji,jj,jk) * un(ji,jj,jk) &497 tabres(ji,jj,jk,1) = zrhoy * e2u(ji,jj) * e3u(ji,jj,jk,Kmm) * umask(ji,jj,jk) * uu(ji,jj,jk,Kmm) & 498 498 + (umask(ji,jj,jk)-1)*999._wp 499 tabres(ji,jj,jk,2) = zrhoy * umask(ji,jj,jk) * e2u(ji,jj) * e3u _n(ji,jj,jk) &499 tabres(ji,jj,jk,2) = zrhoy * umask(ji,jj,jk) * e2u(ji,jj) * e3u(ji,jj,jk,Kmm) & 500 500 + (umask(ji,jj,jk)-1)*999._wp 501 501 END DO … … 520 520 IF (umask(ji,jj,jk) == 0) EXIT 521 521 N_out = N_out + 1 522 h_out(N_out) = e3u _n(ji,jj,jk)522 h_out(N_out) = e3u(ji,jj,jk,Kmm) 523 523 ENDDO 524 524 IF (N_in * N_out > 0) THEN … … 550 550 DO ji=i1,i2 551 551 IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part 552 u b(ji,jj,jk) = ub(ji,jj,jk) &553 & + atfp * ( tabres_child(ji,jj,jk) - u n(ji,jj,jk) ) * umask(ji,jj,jk)552 uu(ji,jj,jk,Kbb) = uu(ji,jj,jk,Kbb) & 553 & + atfp * ( tabres_child(ji,jj,jk) - uu(ji,jj,jk,Kmm) ) * umask(ji,jj,jk) 554 554 ENDIF 555 555 ! 556 u n(ji,jj,jk) = tabres_child(ji,jj,jk) * umask(ji,jj,jk)556 uu(ji,jj,jk,Kmm) = tabres_child(ji,jj,jk) * umask(ji,jj,jk) 557 557 END DO 558 558 END DO … … 579 579 zrhoy = Agrif_Rhoy() 580 580 DO jk = k1, k2 581 tabres(i1:i2,j1:j2,jk,1) = zrhoy * e2u(i1:i2,j1:j2) * e3u _n(i1:i2,j1:j2,jk) * un(i1:i2,j1:j2,jk)581 tabres(i1:i2,j1:j2,jk,1) = zrhoy * e2u(i1:i2,j1:j2) * e3u(i1:i2,j1:j2,jk,Kmm) * uu(i1:i2,j1:j2,jk,Kmm) 582 582 END DO 583 583 ELSE … … 588 588 ! 589 589 IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part 590 zub = u b(ji,jj,jk) * e3u_b(ji,jj,jk) ! fse3t_b prior update should be used591 zuno = u n(ji,jj,jk) * e3u_a(ji,jj,jk)590 zub = uu(ji,jj,jk,Kbb) * e3u(ji,jj,jk,Kbb) ! fse3t_b prior update should be used 591 zuno = uu(ji,jj,jk,Kmm) * e3u(ji,jj,jk,Krhs) 592 592 zunu = tabres(ji,jj,jk,1) 593 u b(ji,jj,jk) = ( zub + atfp * ( zunu - zuno) ) &594 & * umask(ji,jj,jk) / e3u _b(ji,jj,jk)593 uu(ji,jj,jk,Kbb) = ( zub + atfp * ( zunu - zuno) ) & 594 & * umask(ji,jj,jk) / e3u(ji,jj,jk,Kbb) 595 595 ENDIF 596 596 ! 597 u n(ji,jj,jk) = tabres(ji,jj,jk,1) * umask(ji,jj,jk) / e3u_n(ji,jj,jk)597 uu(ji,jj,jk,Kmm) = tabres(ji,jj,jk,1) * umask(ji,jj,jk) / e3u(ji,jj,jk,Kmm) 598 598 END DO 599 599 END DO … … 601 601 ! 602 602 IF ((neuler==0).AND.(Agrif_Nb_Step()==0) ) THEN 603 u b(i1:i2,j1:j2,k1:k2) = un(i1:i2,j1:j2,k1:k2)603 uu(i1:i2,j1:j2,k1:k2,Kbb) = uu(i1:i2,j1:j2,k1:k2,Kmm) 604 604 ENDIF 605 605 ! … … 632 632 IF (western_side) THEN 633 633 DO jj=j1,j2 634 zcor = u n_b(i1-1,jj) * hu_a(i1-1,jj) * r1_hu_n(i1-1,jj) - un_b(i1-1,jj)635 u n_b(i1-1,jj) = un_b(i1-1,jj) + zcor634 zcor = uu_b(i1-1,jj,Kmm) * hu_a(i1-1,jj) * r1_hu_n(i1-1,jj) - uu_b(i1-1,jj,Kmm) 635 uu_b(i1-1,jj,Kmm) = uu_b(i1-1,jj,Kmm) + zcor 636 636 DO jk=1,jpkm1 637 u n(i1-1,jj,jk) = un(i1-1,jj,jk) + zcor * umask(i1-1,jj,jk)637 uu(i1-1,jj,jk,Kmm) = uu(i1-1,jj,jk,Kmm) + zcor * umask(i1-1,jj,jk) 638 638 END DO 639 639 END DO … … 642 642 IF (eastern_side) THEN 643 643 DO jj=j1,j2 644 zcor = u n_b(i2+1,jj) * hu_a(i2+1,jj) * r1_hu_n(i2+1,jj) - un_b(i2+1,jj)645 u n_b(i2+1,jj) = un_b(i2+1,jj) + zcor644 zcor = uu_b(i2+1,jj,Kmm) * hu_a(i2+1,jj) * r1_hu_n(i2+1,jj) - uu_b(i2+1,jj,Kmm) 645 uu_b(i2+1,jj,Kmm) = uu_b(i2+1,jj,Kmm) + zcor 646 646 DO jk=1,jpkm1 647 u n(i2+1,jj,jk) = un(i2+1,jj,jk) + zcor * umask(i2+1,jj,jk)647 uu(i2+1,jj,jk,Kmm) = uu(i2+1,jj,jk,Kmm) + zcor * umask(i2+1,jj,jk) 648 648 END DO 649 649 END DO … … 682 682 DO jj=j1,j2 683 683 DO ji=i1,i2 684 tabres(ji,jj,jk,1) = zrhox * e1v(ji,jj) * e3v _n(ji,jj,jk) * vmask(ji,jj,jk) * vn(ji,jj,jk) &684 tabres(ji,jj,jk,1) = zrhox * e1v(ji,jj) * e3v(ji,jj,jk,Kmm) * vmask(ji,jj,jk) * vv(ji,jj,jk,Kmm) & 685 685 + (vmask(ji,jj,jk)-1)*999._wp 686 tabres(ji,jj,jk,2) = vmask(ji,jj,jk) * zrhox * e1v(ji,jj) * e3v _n(ji,jj,jk) &686 tabres(ji,jj,jk,2) = vmask(ji,jj,jk) * zrhox * e1v(ji,jj) * e3v(ji,jj,jk,Kmm) & 687 687 + (vmask(ji,jj,jk)-1)*999._wp 688 688 END DO … … 705 705 IF (vmask(ji,jj,jk) == 0) EXIT 706 706 N_out = N_out + 1 707 h_out(N_out) = e3v _n(ji,jj,jk)707 h_out(N_out) = e3v(ji,jj,jk,Kmm) 708 708 ENDDO 709 709 IF (N_in * N_out > 0) THEN … … 736 736 ! 737 737 IF( .NOT.(lk_agrif_fstep.AND.(neuler==0)) ) THEN ! Add asselin part 738 v b(ji,jj,jk) = vb(ji,jj,jk) &739 & + atfp * ( tabres_child(ji,jj,jk) - v n(ji,jj,jk) ) * vmask(ji,jj,jk)738 vv(ji,jj,jk,Kbb) = vv(ji,jj,jk,Kbb) & 739 & + atfp * ( tabres_child(ji,jj,jk) - vv(ji,jj,jk,Kmm) ) * vmask(ji,jj,jk) 740 740 ENDIF 741 741 ! 742 v n(ji,jj,jk) = tabres_child(ji,jj,jk) * vmask(ji,jj,jk)742 vv(ji,jj,jk,Kmm) = tabres_child(ji,jj,jk) * vmask(ji,jj,jk) 743 743 END DO 744 744 END DO … … 767 767 DO jj=j1,j2 768 768 DO ji=i1,i2 769 tabres(ji,jj,jk,1) = zrhox * e1v(ji,jj) * e3v _n(ji,jj,jk) * vn(ji,jj,jk)769 tabres(ji,jj,jk,1) = zrhox * e1v(ji,jj) * e3v(ji,jj,jk,Kmm) * vv(ji,jj,jk,Kmm) 770 770 END DO 771 771 END DO … … 778 778 ! 779 779 IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part 780 zvb = v b(ji,jj,jk) * e3v_b(ji,jj,jk) ! fse3t_b prior update should be used781 zvno = v n(ji,jj,jk) * e3v_a(ji,jj,jk)780 zvb = vv(ji,jj,jk,Kbb) * e3v(ji,jj,jk,Kbb) ! fse3t_b prior update should be used 781 zvno = vv(ji,jj,jk,Kmm) * e3v(ji,jj,jk,Krhs) 782 782 zvnu = tabres(ji,jj,jk,1) 783 v b(ji,jj,jk) = ( zvb + atfp * ( zvnu - zvno) ) &784 & * vmask(ji,jj,jk) / e3v _b(ji,jj,jk)783 vv(ji,jj,jk,Kbb) = ( zvb + atfp * ( zvnu - zvno) ) & 784 & * vmask(ji,jj,jk) / e3v(ji,jj,jk,Kbb) 785 785 ENDIF 786 786 ! 787 v n(ji,jj,jk) = tabres(ji,jj,jk,1) * vmask(ji,jj,jk) / e3v_n(ji,jj,jk)787 vv(ji,jj,jk,Kmm) = tabres(ji,jj,jk,1) * vmask(ji,jj,jk) / e3v(ji,jj,jk,Kmm) 788 788 END DO 789 789 END DO … … 791 791 ! 792 792 IF ((neuler==0).AND.(Agrif_Nb_Step()==0) ) THEN 793 v b(i1:i2,j1:j2,k1:k2) = vn(i1:i2,j1:j2,k1:k2)793 vv(i1:i2,j1:j2,k1:k2,Kbb) = vv(i1:i2,j1:j2,k1:k2,Kmm) 794 794 ENDIF 795 795 ! … … 822 822 IF (southern_side) THEN 823 823 DO ji=i1,i2 824 zcor = v n_b(ji,j1-1) * hv_a(ji,j1-1) * r1_hv_n(ji,j1-1) - vn_b(ji,j1-1)825 v n_b(ji,j1-1) = vn_b(ji,j1-1) + zcor824 zcor = vv_b(ji,j1-1,Kmm) * hv_a(ji,j1-1) * r1_hv_n(ji,j1-1) - vv_b(ji,j1-1,Kmm) 825 vv_b(ji,j1-1,Kmm) = vv_b(ji,j1-1,Kmm) + zcor 826 826 DO jk=1,jpkm1 827 v n(ji,j1-1,jk) = vn(ji,j1-1,jk) + zcor * vmask(ji,j1-1,jk)827 vv(ji,j1-1,jk,Kmm) = vv(ji,j1-1,jk,Kmm) + zcor * vmask(ji,j1-1,jk) 828 828 END DO 829 829 END DO … … 832 832 IF (northern_side) THEN 833 833 DO ji=i1,i2 834 zcor = v n_b(ji,j2+1) * hv_a(ji,j2+1) * r1_hv_n(ji,j2+1) - vn_b(ji,j2+1)835 v n_b(ji,j2+1) = vn_b(ji,j2+1) + zcor834 zcor = vv_b(ji,j2+1,Kmm) * hv_a(ji,j2+1) * r1_hv_n(ji,j2+1) - vv_b(ji,j2+1,Kmm) 835 vv_b(ji,j2+1,Kmm) = vv_b(ji,j2+1,Kmm) + zcor 836 836 DO jk=1,jpkm1 837 v n(ji,j2+1,jk) = vn(ji,j2+1,jk) + zcor * vmask(ji,j2+1,jk)837 vv(ji,j2+1,jk,Kmm) = vv(ji,j2+1,jk,Kmm) + zcor * vmask(ji,j2+1,jk) 838 838 END DO 839 839 END DO … … 862 862 DO jj=j1,j2 863 863 DO ji=i1,i2 864 tabres(ji,jj) = zrhoy * u n_b(ji,jj) * hu_n(ji,jj) * e2u(ji,jj)864 tabres(ji,jj) = zrhoy * uu_b(ji,jj,Kmm) * hu_n(ji,jj) * e2u(ji,jj) 865 865 END DO 866 866 END DO … … 873 873 spgu(ji,jj) = 0._wp 874 874 DO jk=1,jpkm1 875 spgu(ji,jj) = spgu(ji,jj) + e3u _n(ji,jj,jk) * un(ji,jj,jk)875 spgu(ji,jj) = spgu(ji,jj) + e3u(ji,jj,jk,Kmm) * uu(ji,jj,jk,Kmm) 876 876 END DO 877 877 ! 878 878 zcorr = (tabres(ji,jj) - spgu(ji,jj)) * r1_hu_n(ji,jj) 879 879 DO jk=1,jpkm1 880 u n(ji,jj,jk) = un(ji,jj,jk) + zcorr * umask(ji,jj,jk)880 uu(ji,jj,jk,Kmm) = uu(ji,jj,jk,Kmm) + zcorr * umask(ji,jj,jk) 881 881 END DO 882 882 ! … … 884 884 IF ( .NOT.ln_dynspg_ts .OR. (ln_dynspg_ts.AND.(.NOT.ln_bt_fw)) ) THEN 885 885 IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part 886 zcorr = (tabres(ji,jj) - u n_b(ji,jj) * hu_a(ji,jj)) * r1_hu_b(ji,jj)887 u b_b(ji,jj) = ub_b(ji,jj) + atfp * zcorr * umask(ji,jj,1)886 zcorr = (tabres(ji,jj) - uu_b(ji,jj,Kmm) * hu_a(ji,jj)) * r1_hu_b(ji,jj) 887 uu_b(ji,jj,Kbb) = uu_b(ji,jj,Kbb) + atfp * zcorr * umask(ji,jj,1) 888 888 END IF 889 889 ENDIF 890 u n_b(ji,jj) = tabres(ji,jj) * r1_hu_n(ji,jj) * umask(ji,jj,1)890 uu_b(ji,jj,Kmm) = tabres(ji,jj) * r1_hu_n(ji,jj) * umask(ji,jj,1) 891 891 ! 892 892 ! Correct "before" velocities to hold correct bt component: 893 893 spgu(ji,jj) = 0.e0 894 894 DO jk=1,jpkm1 895 spgu(ji,jj) = spgu(ji,jj) + e3u _b(ji,jj,jk) * ub(ji,jj,jk)895 spgu(ji,jj) = spgu(ji,jj) + e3u(ji,jj,jk,Kbb) * uu(ji,jj,jk,Kbb) 896 896 END DO 897 897 ! 898 zcorr = u b_b(ji,jj) - spgu(ji,jj) * r1_hu_b(ji,jj)898 zcorr = uu_b(ji,jj,Kbb) - spgu(ji,jj) * r1_hu_b(ji,jj) 899 899 DO jk=1,jpkm1 900 u b(ji,jj,jk) = ub(ji,jj,jk) + zcorr * umask(ji,jj,jk)900 uu(ji,jj,jk,Kbb) = uu(ji,jj,jk,Kbb) + zcorr * umask(ji,jj,jk) 901 901 END DO 902 902 ! … … 905 905 ! 906 906 IF ((neuler==0).AND.(Agrif_Nb_Step()==0) ) THEN 907 u b_b(i1:i2,j1:j2) = un_b(i1:i2,j1:j2)907 uu_b(i1:i2,j1:j2,Kbb) = uu_b(i1:i2,j1:j2,Kmm) 908 908 ENDIF 909 909 ENDIF … … 928 928 DO jj=j1,j2 929 929 DO ji=i1,i2 930 tabres(ji,jj) = zrhox * v n_b(ji,jj) * hv_n(ji,jj) * e1v(ji,jj)930 tabres(ji,jj) = zrhox * vv_b(ji,jj,Kmm) * hv_n(ji,jj) * e1v(ji,jj) 931 931 END DO 932 932 END DO … … 939 939 spgv(ji,jj) = 0.e0 940 940 DO jk=1,jpkm1 941 spgv(ji,jj) = spgv(ji,jj) + e3v _n(ji,jj,jk) * vn(ji,jj,jk)941 spgv(ji,jj) = spgv(ji,jj) + e3v(ji,jj,jk,Kmm) * vv(ji,jj,jk,Kmm) 942 942 END DO 943 943 ! 944 944 zcorr = (tabres(ji,jj) - spgv(ji,jj)) * r1_hv_n(ji,jj) 945 945 DO jk=1,jpkm1 946 v n(ji,jj,jk) = vn(ji,jj,jk) + zcorr * vmask(ji,jj,jk)946 vv(ji,jj,jk,Kmm) = vv(ji,jj,jk,Kmm) + zcorr * vmask(ji,jj,jk) 947 947 END DO 948 948 ! … … 950 950 IF ( .NOT.ln_dynspg_ts .OR. (ln_dynspg_ts.AND.(.NOT.ln_bt_fw)) ) THEN 951 951 IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part 952 zcorr = (tabres(ji,jj) - v n_b(ji,jj) * hv_a(ji,jj)) * r1_hv_b(ji,jj)953 v b_b(ji,jj) = vb_b(ji,jj) + atfp * zcorr * vmask(ji,jj,1)952 zcorr = (tabres(ji,jj) - vv_b(ji,jj,Kmm) * hv_a(ji,jj)) * r1_hv_b(ji,jj) 953 vv_b(ji,jj,Kbb) = vv_b(ji,jj,Kbb) + atfp * zcorr * vmask(ji,jj,1) 954 954 END IF 955 955 ENDIF 956 v n_b(ji,jj) = tabres(ji,jj) * r1_hv_n(ji,jj) * vmask(ji,jj,1)956 vv_b(ji,jj,Kmm) = tabres(ji,jj) * r1_hv_n(ji,jj) * vmask(ji,jj,1) 957 957 ! 958 958 ! Correct "before" velocities to hold correct bt component: 959 959 spgv(ji,jj) = 0.e0 960 960 DO jk=1,jpkm1 961 spgv(ji,jj) = spgv(ji,jj) + e3v _b(ji,jj,jk) * vb(ji,jj,jk)961 spgv(ji,jj) = spgv(ji,jj) + e3v(ji,jj,jk,Kbb) * vv(ji,jj,jk,Kbb) 962 962 END DO 963 963 ! 964 zcorr = v b_b(ji,jj) - spgv(ji,jj) * r1_hv_b(ji,jj)964 zcorr = vv_b(ji,jj,Kbb) - spgv(ji,jj) * r1_hv_b(ji,jj) 965 965 DO jk=1,jpkm1 966 v b(ji,jj,jk) = vb(ji,jj,jk) + zcorr * vmask(ji,jj,jk)966 vv(ji,jj,jk,Kbb) = vv(ji,jj,jk,Kbb) + zcorr * vmask(ji,jj,jk) 967 967 END DO 968 968 ! … … 971 971 ! 972 972 IF ((neuler==0).AND.(Agrif_Nb_Step()==0) ) THEN 973 v b_b(i1:i2,j1:j2) = vn_b(i1:i2,j1:j2)973 vv_b(i1:i2,j1:j2,Kbb) = vv_b(i1:i2,j1:j2,Kmm) 974 974 ENDIF 975 975 ! … … 993 993 DO jj=j1,j2 994 994 DO ji=i1,i2 995 tabres(ji,jj) = ssh n(ji,jj)995 tabres(ji,jj) = ssh(ji,jj,Kmm) 996 996 END DO 997 997 END DO … … 1000 1000 DO jj=j1,j2 1001 1001 DO ji=i1,i2 1002 ssh b(ji,jj) = sshb(ji,jj) &1003 & + atfp * ( tabres(ji,jj) - ssh n(ji,jj) ) * tmask(ji,jj,1)1002 ssh(ji,jj,Kbb) = ssh(ji,jj,Kbb) & 1003 & + atfp * ( tabres(ji,jj) - ssh(ji,jj,Kmm) ) * tmask(ji,jj,1) 1004 1004 END DO 1005 1005 END DO … … 1008 1008 DO jj=j1,j2 1009 1009 DO ji=i1,i2 1010 ssh n(ji,jj) = tabres(ji,jj) * tmask(ji,jj,1)1010 ssh(ji,jj,Kmm) = tabres(ji,jj) * tmask(ji,jj,1) 1011 1011 END DO 1012 1012 END DO 1013 1013 ! 1014 1014 IF ((neuler==0).AND.(Agrif_Nb_Step()==0) ) THEN 1015 ssh b(i1:i2,j1:j2) = sshn(i1:i2,j1:j2)1015 ssh(i1:i2,j1:j2,Kbb) = ssh(i1:i2,j1:j2,Kmm) 1016 1016 ENDIF 1017 1017 ! … … 1094 1094 DO jj=j1,j2 1095 1095 zcor = rdt * r1_e1e2t(i1 ,jj) * e2u(i1,jj) * (ub2_b(i1,jj)-tabres(i1,jj)) 1096 ssh n(i1 ,jj) = sshn(i1 ,jj) + zcor1097 IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) ssh b(i1 ,jj) = sshb(i1 ,jj) + atfp * zcor1096 ssh(i1 ,jj,Kmm) = ssh(i1 ,jj,Kmm) + zcor 1097 IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) ssh(i1 ,jj,Kbb) = ssh(i1 ,jj,Kbb) + atfp * zcor 1098 1098 END DO 1099 1099 ENDIF … … 1101 1101 DO jj=j1,j2 1102 1102 zcor = - rdt * r1_e1e2t(i2+1,jj) * e2u(i2,jj) * (ub2_b(i2,jj)-tabres(i2,jj)) 1103 ssh n(i2+1,jj) = sshn(i2+1,jj) + zcor1104 IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) ssh b(i2+1,jj) = sshb(i2+1,jj) + atfp * zcor1103 ssh(i2+1,jj,Kmm) = ssh(i2+1,jj,Kmm) + zcor 1104 IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) ssh(i2+1,jj,Kbb) = ssh(i2+1,jj,Kbb) + atfp * zcor 1105 1105 END DO 1106 1106 ENDIF … … 1182 1182 DO ji=i1,i2 1183 1183 zcor = rdt * r1_e1e2t(ji,j1 ) * e1v(ji,j1 ) * (vb2_b(ji,j1)-tabres(ji,j1)) 1184 ssh n(ji,j1 ) = sshn(ji,j1) + zcor1185 IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) ssh b(ji,j1 ) = sshb(ji,j1) + atfp * zcor1184 ssh(ji,j1 ,Kmm) = ssh(ji,j1 ,Kmm) + zcor 1185 IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) ssh(ji,j1 ,Kbb) = ssh(ji,j1,Kbb) + atfp * zcor 1186 1186 END DO 1187 1187 ENDIF … … 1189 1189 DO ji=i1,i2 1190 1190 zcor = - rdt * r1_e1e2t(ji,j2+1) * e1v(ji,j2 ) * (vb2_b(ji,j2)-tabres(ji,j2)) 1191 ssh n(ji,j2+1) = sshn(ji,j2+1) + zcor1192 IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) ssh b(ji,j2+1) = sshb(ji,j2+1) + atfp * zcor1191 ssh(ji,j2+1,Kmm) = ssh(ji,j2+1,Kmm) + zcor 1192 IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) ssh(ji,j2+1,Kbb) = ssh(ji,j2+1,Kbb) + atfp * zcor 1193 1193 END DO 1194 1194 ENDIF … … 1319 1319 DO jj=j1,j2 1320 1320 DO ji=i1,i2 1321 ptab(ji,jj,jk) = e3t_0(ji,jj,jk) * (1._wp + ssh n(ji,jj) &1321 ptab(ji,jj,jk) = e3t_0(ji,jj,jk) * (1._wp + ssh(ji,jj,Kmm) & 1322 1322 & *ssmask(ji,jj)/(ht_0(ji,jj)-1._wp + ssmask(ji,jj))) 1323 1323 END DO … … 1330 1330 ! Save "old" scale factor (prior update) for subsequent asselin correction 1331 1331 ! of prognostic variables 1332 e3t _a(i1:i2,j1:j2,1:jpkm1) = e3t_n(i1:i2,j1:j2,1:jpkm1)1333 1334 ! One should also save e3t _b, but lacking of workspace...1335 ! hdiv n(i1:i2,j1:j2,1:jpkm1) = e3t_b(i1:i2,j1:j2,1:jpkm1)1332 e3t(i1:i2,j1:j2,1:jpkm1,Krhs) = e3t(i1:i2,j1:j2,1:jpkm1,Kmm) 1333 1334 ! One should also save e3t(:,:,:,Kbb), but lacking of workspace... 1335 ! hdiv(i1:i2,j1:j2,1:jpkm1) = e3t(i1:i2,j1:j2,1:jpkm1,Kbb) 1336 1336 1337 1337 IF (.NOT.(lk_agrif_fstep.AND.(neuler==0) )) THEN … … 1339 1339 DO jj=j1,j2 1340 1340 DO ji=i1,i2 1341 e3t _b(ji,jj,jk) = e3t_b(ji,jj,jk) &1342 & + atfp * ( ptab(ji,jj,jk) - e3t _n(ji,jj,jk) )1341 e3t(ji,jj,jk,Kbb) = e3t(ji,jj,jk,Kbb) & 1342 & + atfp * ( ptab(ji,jj,jk) - e3t(ji,jj,jk,Kmm) ) 1343 1343 END DO 1344 1344 END DO 1345 1345 END DO 1346 1346 ! 1347 e3w _b (i1:i2,j1:j2,1) = e3w_0(i1:i2,j1:j2,1) + e3t_b(i1:i2,j1:j2,1) - e3t_0(i1:i2,j1:j2,1)1348 gdepw _b(i1:i2,j1:j2,1) = 0.0_wp1349 gdept _b(i1:i2,j1:j2,1) = 0.5_wp * e3w_b(i1:i2,j1:j2,1)1347 e3w (i1:i2,j1:j2,1,Kbb) = e3w_0(i1:i2,j1:j2,1) + e3t(i1:i2,j1:j2,1,Kbb) - e3t_0(i1:i2,j1:j2,1) 1348 gdepw(i1:i2,j1:j2,1,Kbb) = 0.0_wp 1349 gdept(i1:i2,j1:j2,1,Kbb) = 0.5_wp * e3w(i1:i2,j1:j2,1,Kbb) 1350 1350 ! 1351 1351 DO jk = 2, jpk … … 1353 1353 DO ji = i1,i2 1354 1354 zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk)) 1355 e3w _b(ji,jj,jk) = e3w_0(ji,jj,jk) + ( 1.0_wp - 0.5_wp * tmask(ji,jj,jk) ) * &1356 & ( e3t _b(ji,jj,jk-1) - e3t_0(ji,jj,jk-1) ) &1355 e3w(ji,jj,jk,Kbb) = e3w_0(ji,jj,jk) + ( 1.0_wp - 0.5_wp * tmask(ji,jj,jk) ) * & 1356 & ( e3t(ji,jj,jk-1,Kbb) - e3t_0(ji,jj,jk-1) ) & 1357 1357 & + 0.5_wp * tmask(ji,jj,jk) * & 1358 & ( e3t _b(ji,jj,jk) - e3t_0(ji,jj,jk ) )1359 gdepw _b(ji,jj,jk) = gdepw_b(ji,jj,jk-1) + e3t_b(ji,jj,jk-1)1360 gdept _b(ji,jj,jk) = zcoef * ( gdepw_b(ji,jj,jk ) + 0.5 * e3w_b(ji,jj,jk)) &1361 & + (1-zcoef) * ( gdept _b(ji,jj,jk-1) + e3w_b(ji,jj,jk))1358 & ( e3t(ji,jj,jk ,Kbb) - e3t_0(ji,jj,jk ) ) 1359 gdepw(ji,jj,jk,Kbb) = gdepw(ji,jj,jk-1,Kbb) + e3t(ji,jj,jk-1,Kbb) 1360 gdept(ji,jj,jk,Kbb) = zcoef * ( gdepw(ji,jj,jk ,Kbb) + 0.5 * e3w(ji,jj,jk,Kbb)) & 1361 & + (1-zcoef) * ( gdept(ji,jj,jk-1,Kbb) + e3w(ji,jj,jk,Kbb)) 1362 1362 END DO 1363 1363 END DO … … 1370 1370 ! 1371 1371 ! Update vertical scale factor at T-points: 1372 e3t _n(i1:i2,j1:j2,1:jpkm1) = ptab(i1:i2,j1:j2,1:jpkm1)1372 e3t(i1:i2,j1:j2,1:jpkm1,Kmm) = ptab(i1:i2,j1:j2,1:jpkm1) 1373 1373 ! 1374 1374 ! Update total depth: 1375 1375 ht_n(i1:i2,j1:j2) = 0._wp 1376 1376 DO jk = 1, jpkm1 1377 ht_n(i1:i2,j1:j2) = ht_n(i1:i2,j1:j2) + e3t _n(i1:i2,j1:j2,jk) * tmask(i1:i2,j1:j2,jk)1377 ht_n(i1:i2,j1:j2) = ht_n(i1:i2,j1:j2) + e3t(i1:i2,j1:j2,jk,Kmm) * tmask(i1:i2,j1:j2,jk) 1378 1378 END DO 1379 1379 ! 1380 1380 ! Update vertical scale factor at W-points and depths: 1381 e3w _n (i1:i2,j1:j2,1) = e3w_0(i1:i2,j1:j2,1) + e3t_n(i1:i2,j1:j2,1) - e3t_0(i1:i2,j1:j2,1)1382 gdept _n(i1:i2,j1:j2,1) = 0.5_wp * e3w_n(i1:i2,j1:j2,1)1383 gdepw _n(i1:i2,j1:j2,1) = 0.0_wp1384 gde3w _n(i1:i2,j1:j2,1) = gdept_n(i1:i2,j1:j2,1) - (ht_n(i1:i2,j1:j2)-ht_0(i1:i2,j1:j2)) ! Last term in the rhs is ssh1381 e3w (i1:i2,j1:j2,1,Kmm) = e3w_0(i1:i2,j1:j2,1) + e3t(i1:i2,j1:j2,1,Kmm) - e3t_0(i1:i2,j1:j2,1) 1382 gdept(i1:i2,j1:j2,1,Kmm) = 0.5_wp * e3w(i1:i2,j1:j2,1,Kmm) 1383 gdepw(i1:i2,j1:j2,1,Kmm) = 0.0_wp 1384 gde3w(i1:i2,j1:j2,1) = gdept(i1:i2,j1:j2,1,Kmm) - (ht_n(i1:i2,j1:j2)-ht_0(i1:i2,j1:j2)) ! Last term in the rhs is ssh 1385 1385 ! 1386 1386 DO jk = 2, jpk … … 1388 1388 DO ji = i1,i2 1389 1389 zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk)) 1390 e3w _n(ji,jj,jk) = e3w_0(ji,jj,jk) + ( 1.0_wp - 0.5_wp * tmask(ji,jj,jk) ) * ( e3t_n(ji,jj,jk-1) - e3t_0(ji,jj,jk-1) ) &1391 & + 0.5_wp * tmask(ji,jj,jk) * ( e3t _n(ji,jj,jk) - e3t_0(ji,jj,jk ) )1392 gdepw _n(ji,jj,jk) = gdepw_n(ji,jj,jk-1) + e3t_n(ji,jj,jk-1)1393 gdept _n(ji,jj,jk) = zcoef * ( gdepw_n(ji,jj,jk ) + 0.5 * e3w_n(ji,jj,jk)) &1394 & + (1-zcoef) * ( gdept _n(ji,jj,jk-1) + e3w_n(ji,jj,jk))1395 gde3w _n(ji,jj,jk) = gdept_n(ji,jj,jk) - (ht_n(ji,jj)-ht_0(ji,jj)) ! Last term in the rhs is ssh1390 e3w(ji,jj,jk,Kmm) = e3w_0(ji,jj,jk) + ( 1.0_wp - 0.5_wp * tmask(ji,jj,jk) ) * ( e3t(ji,jj,jk-1,Kmm) - e3t_0(ji,jj,jk-1) ) & 1391 & + 0.5_wp * tmask(ji,jj,jk) * ( e3t(ji,jj,jk ,Kmm) - e3t_0(ji,jj,jk ) ) 1392 gdepw(ji,jj,jk,Kmm) = gdepw(ji,jj,jk-1,Kmm) + e3t(ji,jj,jk-1,Kmm) 1393 gdept(ji,jj,jk,Kmm) = zcoef * ( gdepw(ji,jj,jk ,Kmm) + 0.5 * e3w(ji,jj,jk,Kmm)) & 1394 & + (1-zcoef) * ( gdept(ji,jj,jk-1,Kmm) + e3w(ji,jj,jk,Kmm)) 1395 gde3w(ji,jj,jk) = gdept(ji,jj,jk,Kmm) - (ht_n(ji,jj)-ht_0(ji,jj)) ! Last term in the rhs is ssh 1396 1396 END DO 1397 1397 END DO … … 1399 1399 ! 1400 1400 IF ((neuler==0).AND.(Agrif_Nb_Step()==0) ) THEN 1401 e3t _b (i1:i2,j1:j2,1:jpk) = e3t_n (i1:i2,j1:j2,1:jpk)1402 e3w _b (i1:i2,j1:j2,1:jpk) = e3w_n (i1:i2,j1:j2,1:jpk)1403 gdepw _b(i1:i2,j1:j2,1:jpk) = gdepw_n(i1:i2,j1:j2,1:jpk)1404 gdept _b(i1:i2,j1:j2,1:jpk) = gdept_n(i1:i2,j1:j2,1:jpk)1401 e3t (i1:i2,j1:j2,1:jpk,Kbb) = e3t (i1:i2,j1:j2,1:jpk,Kmm) 1402 e3w (i1:i2,j1:j2,1:jpk,Kbb) = e3w (i1:i2,j1:j2,1:jpk,Kmm) 1403 gdepw(i1:i2,j1:j2,1:jpk,Kbb) = gdepw(i1:i2,j1:j2,1:jpk,Kmm) 1404 gdept(i1:i2,j1:j2,1:jpk,Kbb) = gdept(i1:i2,j1:j2,1:jpk,Kmm) 1405 1405 ENDIF 1406 1406 ! -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/NST/agrif_top_interp.F90
r10068 r10989 73 73 DO jj=j1,j2 74 74 DO ji=i1,i2 75 ptab(ji,jj,jk,jn) = tr n(ji,jj,jk,jn)75 ptab(ji,jj,jk,jn) = tr(ji,jj,jk,jn,Kmm) 76 76 END DO 77 77 END DO … … 83 83 DO jj=j1,j2 84 84 DO ji=i1,i2 85 ptab(ji,jj,jk,jptra+1) = tmask(ji,jj,jk) * e3t _n(ji,jj,jk)85 ptab(ji,jj,jk,jptra+1) = tmask(ji,jj,jk) * e3t(ji,jj,jk,Kmm) 86 86 END DO 87 87 END DO … … 113 113 IF (tmask(iref,jref,jk) == 0) EXIT 114 114 N_out = N_out + 1 115 h_out(jk) = e3t _n(iref,jref,jk)115 h_out(jk) = e3t(iref,jref,jk,Kmm) 116 116 ENDDO 117 117 IF (N_in > 0) THEN … … 127 127 ! 128 128 DO jn=1, jptra 129 tr a(i1:i2,j1:j2,1:jpk,jn)=ptab_child(i1:i2,j1:j2,1:jpk,jn)*tmask(i1:i2,j1:j2,1:jpk)129 tr(i1:i2,j1:j2,1:jpk,jn,Krhs)=ptab_child(i1:i2,j1:j2,1:jpk,jn)*tmask(i1:i2,j1:j2,1:jpk) 130 130 END DO 131 131 … … 151 151 ibdy = nlci-nbghostcells 152 152 DO jn = 1, jptra 153 tr a(ibdy+1,jmin:jmax,1:jpkm1,jn) = z1 * ptab_child(ibdy+1,jmin:jmax,1:jpkm1,jn) + z2 * ptab_child(ibdy,jmin:jmax,1:jpkm1,jn)153 tr(ibdy+1,jmin:jmax,1:jpkm1,jn,Krhs) = z1 * ptab_child(ibdy+1,jmin:jmax,1:jpkm1,jn) + z2 * ptab_child(ibdy,jmin:jmax,1:jpkm1,jn) 154 154 DO jk = 1, jpkm1 155 155 DO jj = jmin,jmax 156 156 IF( umask(ibdy-1,jj,jk) == 0._wp ) THEN 157 tr a(ibdy,jj,jk,jn) = tra(ibdy+1,jj,jk,jn) * tmask(ibdy,jj,jk)158 ELSE 159 tr a(ibdy,jj,jk,jn)=(z4*tra(ibdy+1,jj,jk,jn)+z3*tra(ibdy-1,jj,jk,jn))*tmask(ibdy,jj,jk)160 IF( u n(ibdy-1,jj,jk) > 0._wp ) THEN161 tr a(ibdy,jj,jk,jn)=( z6*tra(ibdy-1,jj,jk,jn)+z5*tra(ibdy+1,jj,jk,jn) &162 + z7*tr a(ibdy-2,jj,jk,jn) ) * tmask(ibdy,jj,jk)163 ENDIF 164 ENDIF 165 END DO 166 END DO 167 ! Restore ghost points: 168 tr a(ibdy+1,jmin:jmax,1:jpkm1,jn) = ptab_child(ibdy+1,jmin:jmax,1:jpkm1,jn) * tmask(ibdy+1,jmin:jmax,1:jpkm1)157 tr(ibdy,jj,jk,jn,Krhs) = tr(ibdy+1,jj,jk,jn,Krhs) * tmask(ibdy,jj,jk) 158 ELSE 159 tr(ibdy,jj,jk,jn,Krhs)=(z4*tr(ibdy+1,jj,jk,jn,Krhs)+z3*tr(ibdy-1,jj,jk,jn,Krhs))*tmask(ibdy,jj,jk) 160 IF( uu(ibdy-1,jj,jk,Kmm) > 0._wp ) THEN 161 tr(ibdy,jj,jk,jn,Krhs)=( z6*tr(ibdy-1,jj,jk,jn,Krhs)+z5*tr(ibdy+1,jj,jk,jn,Krhs) & 162 + z7*tr(ibdy-2,jj,jk,jn,Krhs) ) * tmask(ibdy,jj,jk) 163 ENDIF 164 ENDIF 165 END DO 166 END DO 167 ! Restore ghost points: 168 tr(ibdy+1,jmin:jmax,1:jpkm1,jn,Krhs) = ptab_child(ibdy+1,jmin:jmax,1:jpkm1,jn) * tmask(ibdy+1,jmin:jmax,1:jpkm1) 169 169 END DO 170 170 ENDIF … … 180 180 jbdy = nlcj-nbghostcells 181 181 DO jn = 1, jptra 182 tr a(imin:imax,jbdy+1,1:jpkm1,jn) = z1 * ptab_child(imin:imax,jbdy+1,1:jpkm1,jn) + z2 * ptab_child(imin:imax,jbdy,1:jpkm1,jn)182 tr(imin:imax,jbdy+1,1:jpkm1,jn,Krhs) = z1 * ptab_child(imin:imax,jbdy+1,1:jpkm1,jn) + z2 * ptab_child(imin:imax,jbdy,1:jpkm1,jn) 183 183 DO jk = 1, jpkm1 184 184 DO ji = imin,imax 185 185 IF( vmask(ji,jbdy-1,jk) == 0._wp ) THEN 186 tr a(ji,jbdy,jk,jn) = tra(ji,jbdy+1,jk,jn) * tmask(ji,jbdy,jk)187 ELSE 188 tr a(ji,jbdy,jk,jn)=(z4*tra(ji,jbdy+1,jk,jn)+z3*tra(ji,jbdy-1,jk,jn))*tmask(ji,jbdy,jk)189 IF (v n(ji,jbdy-1,jk) > 0._wp ) THEN190 tr a(ji,jbdy,jk,jn)=( z6*tra(ji,jbdy-1,jk,jn)+z5*tra(ji,jbdy+1,jk,jn) &191 + z7*tr a(ji,jbdy-2,jk,jn) ) * tmask(ji,jbdy,jk)192 ENDIF 193 ENDIF 194 END DO 195 END DO 196 ! Restore ghost points: 197 tr a(imin:imax,jbdy+1,1:jpkm1,jn) = ptab_child(imin:imax,jbdy+1,1:jpkm1,jn) * tmask(imin:imax,jbdy+1,1:jpkm1)186 tr(ji,jbdy,jk,jn,Krhs) = tr(ji,jbdy+1,jk,jn,Krhs) * tmask(ji,jbdy,jk) 187 ELSE 188 tr(ji,jbdy,jk,jn,Krhs)=(z4*tr(ji,jbdy+1,jk,jn,Krhs)+z3*tr(ji,jbdy-1,jk,jn,Krhs))*tmask(ji,jbdy,jk) 189 IF (vv(ji,jbdy-1,jk,Kmm) > 0._wp ) THEN 190 tr(ji,jbdy,jk,jn,Krhs)=( z6*tr(ji,jbdy-1,jk,jn,Krhs)+z5*tr(ji,jbdy+1,jk,jn,Krhs) & 191 + z7*tr(ji,jbdy-2,jk,jn,Krhs) ) * tmask(ji,jbdy,jk) 192 ENDIF 193 ENDIF 194 END DO 195 END DO 196 ! Restore ghost points: 197 tr(imin:imax,jbdy+1,1:jpkm1,jn,Krhs) = ptab_child(imin:imax,jbdy+1,1:jpkm1,jn) * tmask(imin:imax,jbdy+1,1:jpkm1) 198 198 END DO 199 199 ENDIF … … 209 209 ibdy = 1+nbghostcells 210 210 DO jn = 1, jptra 211 tr a(ibdy-1,jmin:jmax,1:jpkm1,jn) = z1 * ptab_child(ibdy-1,jmin:jmax,1:jpkm1,jn) + z2 * ptab_child(ibdy,jmin:jmax,1:jpkm1,jn)211 tr(ibdy-1,jmin:jmax,1:jpkm1,jn,Krhs) = z1 * ptab_child(ibdy-1,jmin:jmax,1:jpkm1,jn) + z2 * ptab_child(ibdy,jmin:jmax,1:jpkm1,jn) 212 212 DO jk = 1, jpkm1 213 213 DO jj = jmin,jmax 214 214 IF( umask(ibdy,jj,jk) == 0._wp ) THEN 215 tr a(ibdy,jj,jk,jn) = tra(ibdy-1,jj,jk,jn) * tmask(ibdy,jj,jk)216 ELSE 217 tr a(ibdy,jj,jk,jn)=(z4*tra(ibdy-1,jj,jk,jn)+z3*tra(ibdy+1,jj,jk,jn))*tmask(ibdy,jj,jk)218 IF( u n(ibdy,jj,jk) < 0._wp ) THEN219 tr a(ibdy,jj,jk,jn)=( z6*tra(ibdy+1,jj,jk,jn)+z5*tra(ibdy-1,jj,jk,jn) &220 + z7*tr a(ibdy+2,jj,jk,jn) ) * tmask(ibdy,jj,jk)221 ENDIF 222 ENDIF 223 END DO 224 END DO 225 ! Restore ghost points: 226 tr a(ibdy-1,jmin:jmax,1:jpkm1,jn) = ptab_child(ibdy-1,jmin:jmax,1:jpkm1,jn) * tmask(ibdy-1,jmin:jmax,1:jpkm1)215 tr(ibdy,jj,jk,jn,Krhs) = tr(ibdy-1,jj,jk,jn,Krhs) * tmask(ibdy,jj,jk) 216 ELSE 217 tr(ibdy,jj,jk,jn,Krhs)=(z4*tr(ibdy-1,jj,jk,jn,Krhs)+z3*tr(ibdy+1,jj,jk,jn,Krhs))*tmask(ibdy,jj,jk) 218 IF( uu(ibdy,jj,jk,Kmm) < 0._wp ) THEN 219 tr(ibdy,jj,jk,jn,Krhs)=( z6*tr(ibdy+1,jj,jk,jn,Krhs)+z5*tr(ibdy-1,jj,jk,jn,Krhs) & 220 + z7*tr(ibdy+2,jj,jk,jn,Krhs) ) * tmask(ibdy,jj,jk) 221 ENDIF 222 ENDIF 223 END DO 224 END DO 225 ! Restore ghost points: 226 tr(ibdy-1,jmin:jmax,1:jpkm1,jn,Krhs) = ptab_child(ibdy-1,jmin:jmax,1:jpkm1,jn) * tmask(ibdy-1,jmin:jmax,1:jpkm1) 227 227 END DO 228 228 ENDIF … … 238 238 jbdy=1+nbghostcells 239 239 DO jn = 1, jptra 240 tr a(imin:imax,jbdy-1,1:jpkm1,jn) = z1 * ptab_child(imin:imax,jbdy-1,1:jpkm1,jn) + z2 * ptab_child(imin:imax,jbdy,1:jpkm1,jn)240 tr(imin:imax,jbdy-1,1:jpkm1,jn,Krhs) = z1 * ptab_child(imin:imax,jbdy-1,1:jpkm1,jn) + z2 * ptab_child(imin:imax,jbdy,1:jpkm1,jn) 241 241 DO jk = 1, jpkm1 242 242 DO ji = imin,imax 243 243 IF( vmask(ji,jbdy,jk) == 0._wp ) THEN 244 tr a(ji,jbdy,jk,jn)=tra(ji,jbdy-1,jk,jn) * tmask(ji,jbdy,jk)245 ELSE 246 tr a(ji,jbdy,jk,jn)=(z4*tra(ji,jbdy-1,jk,jn)+z3*tra(ji,jbdy+1,jk,jn))*tmask(ji,jbdy,jk)247 IF( v n(ji,jbdy,jk) < 0._wp ) THEN248 tr a(ji,jbdy,jk,jn)=( z6*tra(ji,jbdy+1,jk,jn)+z5*tra(ji,jbdy-1,jk,jn) &249 + z7*tr a(ji,jbdy+2,jk,jn) ) * tmask(ji,jbdy,jk)250 ENDIF 251 ENDIF 252 END DO 253 END DO 254 ! Restore ghost points: 255 tr a(imin:imax,jbdy-1,1:jpkm1,jn) = ptab_child(imin:imax,jbdy-1,1:jpkm1,jn) * tmask(imin:imax,jbdy-1,1:jpkm1)244 tr(ji,jbdy,jk,jn,Krhs)=tr(ji,jbdy-1,jk,jn,Krhs) * tmask(ji,jbdy,jk) 245 ELSE 246 tr(ji,jbdy,jk,jn,Krhs)=(z4*tr(ji,jbdy-1,jk,jn,Krhs)+z3*tr(ji,jbdy+1,jk,jn,Krhs))*tmask(ji,jbdy,jk) 247 IF( vv(ji,jbdy,jk,Kmm) < 0._wp ) THEN 248 tr(ji,jbdy,jk,jn,Krhs)=( z6*tr(ji,jbdy+1,jk,jn,Krhs)+z5*tr(ji,jbdy-1,jk,jn,Krhs) & 249 + z7*tr(ji,jbdy+2,jk,jn,Krhs) ) * tmask(ji,jbdy,jk) 250 ENDIF 251 ENDIF 252 END DO 253 END DO 254 ! Restore ghost points: 255 tr(imin:imax,jbdy-1,1:jpkm1,jn,Krhs) = ptab_child(imin:imax,jbdy-1,1:jpkm1,jn) * tmask(imin:imax,jbdy-1,1:jpkm1) 256 256 END DO 257 257 ENDIF -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/NST/agrif_top_sponge.F90
r10068 r10989 83 83 DO jj=j1,j2 84 84 DO ji=i1,i2 85 tabres(ji,jj,jk,jn) = tr b(ji,jj,jk,jn)85 tabres(ji,jj,jk,jn) = tr(ji,jj,jk,jn,Kbb) 86 86 END DO 87 87 END DO … … 93 93 DO jj=j1,j2 94 94 DO ji=i1,i2 95 tabres(ji,jj,jk,jpts+1) = tmask(ji,jj,jk) * e3t _n(ji,jj,jk)95 tabres(ji,jj,jk,jpts+1) = tmask(ji,jj,jk) * e3t(ji,jj,jk,Kmm) 96 96 END DO 97 97 END DO … … 114 114 IF (tmask(ji,jj,jk) == 0) EXIT 115 115 N_out = N_out + 1 116 h_out(jk) = e3t _n(ji,jj,jk) !Child grid scale factors. Could multiply by e1e2t here instead of division above116 h_out(jk) = e3t(ji,jj,jk,Kmm) !Child grid scale factors. Could multiply by e1e2t here instead of division above 117 117 ENDDO 118 118 IF (N_in > 0) THEN … … 131 131 DO jk=1,jpkm1 132 132 # if defined key_vertical 133 trbdiff(ji,jj,jk,1:jptra) = tr b(ji,jj,jk,1:jptra) - tabres_child(ji,jj,jk,1:jptra)133 trbdiff(ji,jj,jk,1:jptra) = tr(ji,jj,jk,1:jptra,Kbb) - tabres_child(ji,jj,jk,1:jptra) 134 134 # else 135 trbdiff(ji,jj,jk,1:jptra) = tr b(ji,jj,jk,1:jptra) - tabres(ji,jj,jk,1:jptra)135 trbdiff(ji,jj,jk,1:jptra) = tr(ji,jj,jk,1:jptra,Kbb) - tabres(ji,jj,jk,1:jptra) 136 136 # endif 137 137 ENDDO … … 143 143 DO jj = j1,j2-1 144 144 DO ji = i1,i2-1 145 zabe1 = fsaht_spu(ji,jj) * e2_e1u(ji,jj) * e3u _n(ji,jj,jk) * umask(ji,jj,jk)146 zabe2 = fsaht_spv(ji,jj) * e1_e2v(ji,jj) * e3v _n(ji,jj,jk) * vmask(ji,jj,jk)145 zabe1 = fsaht_spu(ji,jj) * e2_e1u(ji,jj) * e3u(ji,jj,jk,Kmm) * umask(ji,jj,jk) 146 zabe2 = fsaht_spv(ji,jj) * e1_e2v(ji,jj) * e3v(ji,jj,jk,Kmm) * vmask(ji,jj,jk) 147 147 ztu(ji,jj) = zabe1 * ( trbdiff(ji+1,jj ,jk,jn) - trbdiff(ji,jj,jk,jn) ) 148 148 ztv(ji,jj) = zabe2 * ( trbdiff(ji ,jj+1,jk,jn) - trbdiff(ji,jj,jk,jn) ) … … 153 153 DO ji = i1+1,i2-1 154 154 IF( .NOT. tabspongedone_trn(ji,jj) ) THEN 155 tr a(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + ( ztu(ji,jj) - ztu(ji-1,jj ) &155 tr(ji,jj,jk,jn,Krhs) = tr(ji,jj,jk,jn,Krhs) + ( ztu(ji,jj) - ztu(ji-1,jj ) & 156 156 & + ztv(ji,jj) - ztv(ji ,jj-1) ) & 157 & * r1_e1e2t(ji,jj) / e3t _n(ji,jj,jk)157 & * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm) 158 158 ENDIF 159 159 END DO -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/NST/agrif_top_update.F90
r10068 r10989 84 84 DO jj=j1,j2 85 85 DO ji=i1,i2 86 tabres(ji,jj,jk,jn) = (tr n(ji,jj,jk,jn) * e3t_n(ji,jj,jk) ) &86 tabres(ji,jj,jk,jn) = (tr(ji,jj,jk,jn,Kmm) * e3t(ji,jj,jk,Kmm) ) & 87 87 * tmask(ji,jj,jk) + (tmask(ji,jj,jk)-1)*999._wp 88 88 END DO … … 93 93 DO jj=j1,j2 94 94 DO ji=i1,i2 95 tabres(ji,jj,jk,n2) = tmask(ji,jj,jk) * e3t _n(ji,jj,jk) &95 tabres(ji,jj,jk,n2) = tmask(ji,jj,jk) * e3t(ji,jj,jk,Kmm) & 96 96 + (tmask(ji,jj,jk)-1)*999._wp 97 97 END DO … … 114 114 IF (tmask(ji,jj,jk) < -900) EXIT ! TODO: Will not work with ISF 115 115 N_out = N_out + 1 116 h_out(N_out) = e3t _n(ji,jj,jk) !Parent grid scale factors. Could multiply by e1e2t here instead of division above116 h_out(N_out) = e3t(ji,jj,jk,Kmm) !Parent grid scale factors. Could multiply by e1e2t here instead of division above 117 117 ENDDO 118 118 IF (N_in > 0) THEN !Remove this? … … 138 138 DO ji=i1,i2 139 139 IF( tabres_child(ji,jj,jk,jn) .NE. 0. ) THEN 140 tr b(ji,jj,jk,jn) = tsb(ji,jj,jk,jn) &140 tr(ji,jj,jk,jn,Kbb) = ts(ji,jj,jk,jn,Kbb) & 141 141 & + atfp * ( tabres_child(ji,jj,jk,jn) & 142 & - tr n(ji,jj,jk,jn) ) * tmask(ji,jj,jk)142 & - tr(ji,jj,jk,jn,Kmm) ) * tmask(ji,jj,jk) 143 143 ENDIF 144 144 ENDDO … … 152 152 DO ji=i1,i2 153 153 IF( tabres_child(ji,jj,jk,jn) .NE. 0. ) THEN 154 tr n(ji,jj,jk,jn) = tabres_child(ji,jj,jk,jn) * tmask(ji,jj,jk)154 tr(ji,jj,jk,jn,Kmm) = tabres_child(ji,jj,jk,jn) * tmask(ji,jj,jk) 155 155 END IF 156 156 END DO … … 183 183 DO ji=i1,i2 184 184 !> jc tmp 185 tabres(ji,jj,jk,jn) = tr n(ji,jj,jk,jn) * e3t_n(ji,jj,jk) / e3t_0(ji,jj,jk)186 ! tabres(ji,jj,jk,jn) = tr n(ji,jj,jk,jn) * e3t_n(ji,jj,jk)185 tabres(ji,jj,jk,jn) = tr(ji,jj,jk,jn,Kmm) * e3t(ji,jj,jk,Kmm) / e3t_0(ji,jj,jk) 186 ! tabres(ji,jj,jk,jn) = tr(ji,jj,jk,jn,Kmm) * e3t(ji,jj,jk,Kmm) 187 187 !< jc tmp 188 188 END DO … … 204 204 DO ji=i1,i2 205 205 IF( tabres(ji,jj,jk,jn) .NE. 0. ) THEN 206 ztb = tr b(ji,jj,jk,jn) * e3t_b(ji,jj,jk) ! fse3t_b prior update should be used206 ztb = tr(ji,jj,jk,jn,Kbb) * e3t(ji,jj,jk,Kbb) ! fse3t_b prior update should be used 207 207 ztnu = tabres(ji,jj,jk,jn) 208 ztno = tr n(ji,jj,jk,jn) * e3t_a(ji,jj,jk)209 tr b(ji,jj,jk,jn) = ( ztb + atfp * ( ztnu - ztno) ) &210 & * tmask(ji,jj,jk) / e3t _b(ji,jj,jk)208 ztno = tr(ji,jj,jk,jn,Kmm) * e3t(ji,jj,jk,Krhs) 209 tr(ji,jj,jk,jn,Kbb) = ( ztb + atfp * ( ztnu - ztno) ) & 210 & * tmask(ji,jj,jk) / e3t(ji,jj,jk,Kbb) 211 211 ENDIF 212 212 ENDDO … … 220 220 DO ji=i1,i2 221 221 IF( tabres(ji,jj,jk,jn) .NE. 0. ) THEN 222 tr n(ji,jj,jk,jn) = tabres(ji,jj,jk,jn) / e3t_n(ji,jj,jk)222 tr(ji,jj,jk,jn,Kmm) = tabres(ji,jj,jk,jn) / e3t(ji,jj,jk,Kmm) 223 223 END IF 224 224 END DO … … 228 228 ! 229 229 IF ((neuler==0).AND.(Agrif_Nb_Step()==0) ) THEN 230 tr b(i1:i2,j1:j2,k1:k2,n1:n2) = trn(i1:i2,j1:j2,k1:k2,n1:n2)230 tr(i1:i2,j1:j2,k1:k2,n1:n2,Kbb) = tr(i1:i2,j1:j2,k1:k2,n1:n2,Kmm) 231 231 ENDIF 232 232 ! -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/NST/agrif_user.F90
r10425 r10989 175 175 tabspongedone_tsn = .FALSE. 176 176 CALL Agrif_Bc_variable(tsn_sponge_id,calledweight=1.,procname=interptsn_sponge) 177 ! reset ts ato zero178 ts a(:,:,:,:) = 0.177 ! reset ts(:,:,:,:,Krhs) to zero 178 ts(:,:,:,:,Krhs) = 0. 179 179 180 180 Agrif_UseSpecialValue = ln_spc_dyn … … 191 191 CALL Agrif_Bc_variable(sshn_id,calledweight=1., procname=interpsshn ) 192 192 hbdy_w(:,:) = 0.e0 ; hbdy_e(:,:) = 0.e0 ; hbdy_n(:,:) = 0.e0 ; hbdy_s(:,:) = 0.e0 193 ssh a(:,:) = 0.e0193 ssh(:,:,Krhs) = 0.e0 194 194 195 195 IF ( ln_dynspg_ts ) THEN … … 207 207 Agrif_UseSpecialValue = .FALSE. 208 208 ! reset velocities to zero 209 u a(:,:,:) = 0.210 v a(:,:,:) = 0.209 uu(:,:,:,Krhs) = 0. 210 vv(:,:,:,Krhs) = 0. 211 211 212 212 ! 3. Some controls … … 591 591 tabspongedone_trn = .FALSE. 592 592 CALL Agrif_Bc_variable(trn_sponge_id,calledweight=1.,procname=interptrn_sponge) 593 ! reset ts ato zero594 tr a(:,:,:,:) = 0.593 ! reset ts(:,:,:,:,Krhs) to zero 594 tr(:,:,:,:,Krhs) = 0. 595 595 596 596 -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DIA/diawri.F90
r10965 r10989 57 57 USE lib_mpp ! MPP library 58 58 USE timing ! preformance summary 59 USE diu rnal_bulk! diurnal warm layer60 USE cool_skin! Cool skin59 USE diu_bulk ! diurnal warm layer 60 USE diu_coolskin ! Cool skin 61 61 62 62 IMPLICIT NONE -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DIU/diu_bulk.F90
r10985 r10989 1 MODULE diu rnal_bulk1 MODULE diu_bulk 2 2 !!====================================================================== 3 !! *** MODULE diu rnal_bulk ***3 !! *** MODULE diu_bulk *** 4 4 !! Takaya model of diurnal warming (Takaya, 2010) 5 5 !!===================================================================== … … 265 265 END FUNCTION t_imp 266 266 267 END MODULE diu rnal_bulk267 END MODULE diu_bulk -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DIU/diu_coolskin.F90
r10985 r10989 1 MODULE cool_skin1 MODULE diu_coolskin 2 2 !!====================================================================== 3 !! *** MODULE cool_skin ***3 !! *** MODULE diu_coolskin *** 4 4 !! Cool skin thickness and delta T correction using Artele et al. (2002) 5 5 !! [see also Tu and Tsuang (2005)] … … 38 38 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: x_csdsst ! Cool skin delta SST 39 39 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: x_csthick ! Cool skin thickness 40 41 40 PUBLIC diurnal_sst_coolskin_step, diurnal_sst_coolskin_init 42 41 … … 96 95 !!---------------------------------------------------------------------- 97 96 ! 98 IF( .NOT. ln_blk ) CALL ctl_stop(" cool_skin.f90: diurnal flux processing only implemented for bulk forcing")97 IF( .NOT. ln_blk ) CALL ctl_stop("diu_coolskin.f90: diurnal flux processing only implemented for bulk forcing") 99 98 ! 100 99 DO jj = 1,jpj … … 144 143 145 144 !!====================================================================== 146 END MODULE cool_skin145 END MODULE diu_coolskin -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DIU/diu_layers.F90
r10985 r10989 6 6 !! History : 3.7 ! 2015-11 (J. While) Original code 7 7 8 USE diu rnal_bulk! diurnal SST bulk routines (diurnal_sst_takaya routine)9 USE cool_skin! diurnal cool skin correction (diurnal_sst_coolskin routine)8 USE diu_bulk ! diurnal SST bulk routines (diurnal_sst_takaya routine) 9 USE diu_coolskin ! diurnal cool skin correction (diurnal_sst_coolskin routine) 10 10 USE oce 11 11 USE iom 12 12 USE sbc_oce 13 USE sbcmod 13 USE sbcmod ! surface boundary condition (sbc routine) 14 14 15 15 IMPLICIT NONE -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/IOM/iom.F90
r10523 r10989 46 46 #endif 47 47 USE lib_fortran 48 USE diu rnal_bulk, ONLY : ln_diurnal_only, ln_diurnal48 USE diu_bulk, ONLY : ln_diurnal_only, ln_diurnal 49 49 50 50 IMPLICIT NONE -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/IOM/restart.F90
r10922 r10989 27 27 USE in_out_manager ! I/O manager 28 28 USE iom ! I/O module 29 USE diu rnal_bulk29 USE diu_bulk 30 30 USE lib_mpp ! distribued memory computing library 31 31 -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/SBC/sbcmod.F90
r10946 r10989 59 59 USE timing ! Timing 60 60 USE wet_dry 61 USE diu rnal_bulk, ONLY: ln_diurnal_only ! diurnal SST diagnostic61 USE diu_bulk, ONLY: ln_diurnal_only ! diurnal SST diagnostic 62 62 63 63 IMPLICIT NONE
Note: See TracChangeset
for help on using the changeset viewer.