Changeset 12340 for NEMO/branches/2019/dev_r11943_MERGE_2019/src/OFF
 Timestamp:
 20200127T15:31:53+01:00 (17 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

NEMO/branches/2019/dev_r11943_MERGE_2019/src/OFF/dtadyn.F90
r12250 r12340 89 89 INTEGER, SAVE :: nprevrec, nsecdyn 90 90 91 !! * Substitutions 92 # include "do_loop_substitute.h90" 91 93 !! 92 94 !! NEMO/OFF 4.0 , NEMO Consortium (2018) … … 350 352 gdepw(:,:,1,Kmm) = 0.0_wp 351 353 352 DO jk = 2, jpk 353 DO jj = 1,jpj 354 DO ji = 1,jpi 355 ! zcoef = (tmask(ji,jj,jk)  wmask(ji,jj,jk)) ! 0 everywhere 356 ! tmask = wmask, ie everywhere expect at jk = mikt 357 ! 1 for jk = 358 ! mikt 359 zcoef = (tmask(ji,jj,jk)  wmask(ji,jj,jk)) 360 gdepw(ji,jj,jk,Kmm) = gdepw(ji,jj,jk1,Kmm) + e3t(ji,jj,jk1,Kmm) 361 gdept(ji,jj,jk,Kmm) = zcoef * ( gdepw(ji,jj,jk ,Kmm) + 0.5 * e3w(ji,jj,jk,Kmm)) & 362 & + (1zcoef) * ( gdept(ji,jj,jk1,Kmm) + e3w(ji,jj,jk,Kmm)) 363 END DO 364 END DO 365 END DO 354 DO_3D_11_11( 2, jpk ) 355 ! zcoef = (tmask(ji,jj,jk)  wmask(ji,jj,jk)) ! 0 everywhere 356 ! tmask = wmask, ie everywhere expect at jk = mikt 357 ! 1 for jk = 358 ! mikt 359 zcoef = (tmask(ji,jj,jk)  wmask(ji,jj,jk)) 360 gdepw(ji,jj,jk,Kmm) = gdepw(ji,jj,jk1,Kmm) + e3t(ji,jj,jk1,Kmm) 361 gdept(ji,jj,jk,Kmm) = zcoef * ( gdepw(ji,jj,jk ,Kmm) + 0.5 * e3w(ji,jj,jk,Kmm)) & 362 & + (1zcoef) * ( gdept(ji,jj,jk1,Kmm) + e3w(ji,jj,jk,Kmm)) 363 END_3D 366 364 367 365 gdept(:,:,:,Kbb) = gdept(:,:,:,Kmm) … … 378 376 ! 379 377 nk_rnf(:,:) = 0 ! set the number of level over which river runoffs are applied 380 DO jj = 1, jpj 381 DO ji = 1, jpi 382 IF( h_rnf(ji,jj) > 0._wp ) THEN 383 jk = 2 384 DO WHILE ( jk /= mbkt(ji,jj) .AND. gdept_0(ji,jj,jk) < h_rnf(ji,jj) ) ; jk = jk + 1 385 END DO 386 nk_rnf(ji,jj) = jk 387 ELSEIF( h_rnf(ji,jj) == 1._wp ) THEN ; nk_rnf(ji,jj) = 1 388 ELSEIF( h_rnf(ji,jj) == 999._wp ) THEN ; nk_rnf(ji,jj) = mbkt(ji,jj) 389 ELSE 390 CALL ctl_stop( 'sbc_rnf_init: runoff depth not positive, and not 999 or 1, rnf value in file fort.999' ) 391 WRITE(999,*) 'ji, jj, h_rnf(ji,jj) :', ji, jj, h_rnf(ji,jj) 392 ENDIF 378 DO_2D_11_11 379 IF( h_rnf(ji,jj) > 0._wp ) THEN 380 jk = 2 381 DO WHILE ( jk /= mbkt(ji,jj) .AND. gdept_0(ji,jj,jk) < h_rnf(ji,jj) ) ; jk = jk + 1 382 END DO 383 nk_rnf(ji,jj) = jk 384 ELSEIF( h_rnf(ji,jj) == 1._wp ) THEN ; nk_rnf(ji,jj) = 1 385 ELSEIF( h_rnf(ji,jj) == 999._wp ) THEN ; nk_rnf(ji,jj) = mbkt(ji,jj) 386 ELSE 387 CALL ctl_stop( 'sbc_rnf_init: runoff depth not positive, and not 999 or 1, rnf value in file fort.999' ) 388 WRITE(999,*) 'ji, jj, h_rnf(ji,jj) :', ji, jj, h_rnf(ji,jj) 389 ENDIF 390 END_2D 391 DO_2D_11_11 392 h_rnf(ji,jj) = 0._wp 393 DO jk = 1, nk_rnf(ji,jj) 394 h_rnf(ji,jj) = h_rnf(ji,jj) + e3t(ji,jj,jk,Kmm) 393 395 END DO 394 END DO 395 DO jj = 1, jpj ! set the associated depth 396 DO ji = 1, jpi 397 h_rnf(ji,jj) = 0._wp 398 DO jk = 1, nk_rnf(ji,jj) 399 h_rnf(ji,jj) = h_rnf(ji,jj) + e3t(ji,jj,jk,Kmm) 400 END DO 401 END DO 402 END DO 396 END_2D 403 397 ELSE ! runoffs applied at the surface 404 398 nk_rnf(:,:) = 1 … … 586 580 gdepw(:,:,1,Kmm) = 0.0_wp 587 581 ! 588 DO jk = 2, jpk 589 DO jj = 1,jpj 590 DO ji = 1,jpi 591 zcoef = (tmask(ji,jj,jk)  wmask(ji,jj,jk)) 592 gdepw(ji,jj,jk,Kmm) = gdepw(ji,jj,jk1,Kmm) + e3t(ji,jj,jk1,Kmm) 593 gdept(ji,jj,jk,Kmm) = zcoef * ( gdepw(ji,jj,jk ,Kmm) + 0.5 * e3w(ji,jj,jk,Kmm)) & 594 & + (1zcoef) * ( gdept(ji,jj,jk1,Kmm) + e3w(ji,jj,jk,Kmm)) 595 END DO 596 END DO 597 END DO 582 DO_3D_11_11( 2, jpk ) 583 zcoef = (tmask(ji,jj,jk)  wmask(ji,jj,jk)) 584 gdepw(ji,jj,jk,Kmm) = gdepw(ji,jj,jk1,Kmm) + e3t(ji,jj,jk1,Kmm) 585 gdept(ji,jj,jk,Kmm) = zcoef * ( gdepw(ji,jj,jk ,Kmm) + 0.5 * e3w(ji,jj,jk,Kmm)) & 586 & + (1zcoef) * ( gdept(ji,jj,jk1,Kmm) + e3w(ji,jj,jk,Kmm)) 587 END_3D 598 588 ! 599 589 END SUBROUTINE dta_dyn_sf_interp … … 667 657 !! 668 658 ! 669 DO jj = 1, jpj ! update the depth over which runoffs are distributed 670 DO ji = 1, jpi 671 h_rnf(ji,jj) = 0._wp 672 DO jk = 1, nk_rnf(ji,jj) ! recalculates h_rnf to be the depth in metres 673 h_rnf(ji,jj) = h_rnf(ji,jj) + e3t(ji,jj,jk,Kmm) ! to the bottom of the relevant grid box 674 END DO 675 END DO 676 END DO 659 DO_2D_11_11 660 h_rnf(ji,jj) = 0._wp 661 DO jk = 1, nk_rnf(ji,jj) ! recalculates h_rnf to be the depth in metres 662 h_rnf(ji,jj) = h_rnf(ji,jj) + e3t(ji,jj,jk,Kmm) ! to the bottom of the relevant grid box 663 END DO 664 END_2D 677 665 ! 678 666 END SUBROUTINE dta_dyn_hrnf
Note: See TracChangeset
for help on using the changeset viewer.