Changeset 12737
- Timestamp:
- 2020-04-10T19:55:11+02:00 (4 years ago)
- Location:
- NEMO/releases/r4.0/r4.0-HEAD/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/releases/r4.0/r4.0-HEAD/src/NST/agrif_oce_interp.F90
r10068 r12737 96 96 i1 = 1 ; i2 = nlci 97 97 j1 = 1 ; j2 = nlcj 98 IF( nbondj == -1 .OR. nbondj == 2) j1 = 2 + nbghostcells99 IF( nbondj == +1 .OR. nbondj == 2) j2 = nlcj - nbghostcells - 1100 IF( nbondi == -1 .OR. nbondi == 2 )i1 = 2 + nbghostcells101 IF( nbondi == +1 .OR. nbondi == 2 )i2 = nlci - nbghostcells - 198 IF( l_Northedge ) j1 = 2 + nbghostcells 99 IF( l_Southedge ) j2 = nlcj - nbghostcells - 1 100 IF( l_Westedge ) i1 = 2 + nbghostcells 101 IF( l_Eastedge ) i2 = nlci - nbghostcells - 1 102 102 103 103 ! --- West --- ! 104 IF( nbondi == -1 .OR. nbondi == 2) THEN104 IF( l_Westedge ) THEN 105 105 ibdy1 = 2 106 106 ibdy2 = 1+nbghostcells … … 173 173 174 174 ! --- East --- ! 175 IF( nbondi == 1 .OR. nbondi == 2) THEN175 IF( l_Eastedge ) THEN 176 176 ibdy1 = nlci-1-nbghostcells 177 177 ibdy2 = nlci-2 … … 246 246 247 247 ! --- South --- ! 248 IF ( nbondj == -1 .OR. nbondj == 2) THEN248 IF ( l_Southedge ) THEN 249 249 jbdy1 = 2 250 250 jbdy2 = 1+nbghostcells … … 318 318 319 319 ! --- North --- ! 320 IF( nbondj == 1 .OR. nbondj == 2) THEN320 IF( l_Northedge ) THEN 321 321 jbdy1 = nlcj-1-nbghostcells 322 322 jbdy2 = nlcj-2 … … 405 405 IF( Agrif_Root() ) RETURN 406 406 ! 407 IF( (nbondi == -1).OR.(nbondi == 2)) THEN407 IF( l_Westedge ) THEN 408 408 DO jj=1,jpj 409 409 va_e(2:nbghostcells+1,jj) = vbdy_w(1:nbghostcells,jj) * hvr_e(2:nbghostcells+1,jj) … … 416 416 ENDIF 417 417 ! 418 IF( (nbondi == 1).OR.(nbondi == 2)) THEN418 IF( l_Eastedge ) THEN 419 419 DO jj=1,jpj 420 420 va_e(nlci-nbghostcells:nlci-1,jj) = vbdy_e(1:nbghostcells,jj) * hvr_e(nlci-nbghostcells:nlci-1,jj) … … 427 427 ENDIF 428 428 ! 429 IF ((nbondj == -1).OR.(nbondj == 2)) THEN429 IF ( l_Southedge ) THEN 430 430 DO ji=1,jpi 431 431 ua_e(ji,2:nbghostcells+1) = ubdy_s(ji,1:nbghostcells) * hur_e(ji,2:nbghostcells+1) … … 438 438 ENDIF 439 439 ! 440 IF ((nbondj == 1).OR.(nbondj == 2)) THEN440 IF ( l_Northedge ) THEN 441 441 DO ji=1,jpi 442 442 ua_e(ji,nlcj-nbghostcells:nlcj-1) = ubdy_n(ji,1:nbghostcells) * hur_e(ji,nlcj-nbghostcells:nlcj-1) … … 516 516 ! 517 517 ! --- West --- ! 518 IF( (nbondi == -1).OR.(nbondi == 2)) THEN518 IF( l_Westedge ) THEN 519 519 indx = 1+nbghostcells 520 520 DO jj = 1, jpj … … 526 526 ! 527 527 ! --- East --- ! 528 IF( (nbondi == 1).OR.(nbondi == 2)) THEN528 IF( l_Eastedge ) THEN 529 529 indx = nlci-nbghostcells 530 530 DO jj = 1, jpj … … 536 536 ! 537 537 ! --- South --- ! 538 IF ((nbondj == -1).OR.(nbondj == 2)) THEN538 IF ( l_Southedge ) THEN 539 539 indy = 1+nbghostcells 540 540 DO jj = 2, indy … … 546 546 ! 547 547 ! --- North --- ! 548 IF ((nbondj == 1).OR.(nbondj == 2)) THEN548 IF ( l_Northedge ) THEN 549 549 indy = nlcj-nbghostcells 550 550 DO jj = indy, nlcj-1 … … 571 571 ! 572 572 ! --- West --- ! 573 IF( (nbondi == -1).OR.(nbondi == 2)) THEN573 IF( l_Westedge ) THEN 574 574 indx = 1+nbghostcells 575 575 DO jj = 1, jpj … … 581 581 ! 582 582 ! --- East --- ! 583 IF( (nbondi == 1).OR.(nbondi == 2)) THEN583 IF( l_Eastedge ) THEN 584 584 indx = nlci-nbghostcells 585 585 DO jj = 1, jpj … … 591 591 ! 592 592 ! --- South --- ! 593 IF( (nbondj == -1).OR.(nbondj == 2)) THEN593 IF( l_Southedge ) THEN 594 594 indy = 1+nbghostcells 595 595 DO jj = 2, indy … … 601 601 ! 602 602 ! --- North --- ! 603 IF( (nbondj == 1).OR.(nbondj == 2)) THEN603 IF( l_Northedge ) THEN 604 604 indy = nlcj-nbghostcells 605 605 DO jj = indy, nlcj-1 … … 722 722 ! 723 723 ! Remove CORNERS 724 IF( (nbondj == -1).OR.(nbondj == 2)) jmin = 2 + nbghostcells725 IF( (nbondj == +1).OR.(nbondj == 2)) jmax = nlcj - nbghostcells - 1726 IF( (nbondi == -1).OR.(nbondi == 2))imin = 2 + nbghostcells727 IF( (nbondi == +1).OR.(nbondi == 2))imax = nlci - nbghostcells - 1724 IF( l_Southedge ) jmin = 2 + nbghostcells 725 IF( l_Northedge ) jmax = nlcj - nbghostcells - 1 726 IF( l_Westedge ) imin = 2 + nbghostcells 727 IF( l_Eastedge ) imax = nlci - nbghostcells - 1 728 728 ! 729 729 IF( eastern_side ) THEN -
NEMO/releases/r4.0/r4.0-HEAD/src/NST/agrif_oce_sponge.F90
r10425 r12737 109 109 110 110 ! --- West --- ! 111 IF( (nbondi == -1) .OR. (nbondi == 2)) THEN111 IF( l_Westedge ) THEN 112 112 ind1 = 1+nbghostcells 113 113 ind2 = 1+nbghostcells + ispongearea … … 120 120 121 121 ! --- East --- ! 122 IF( (nbondi == 1) .OR. (nbondi == 2)) THEN122 IF( l_Eastedge ) THEN 123 123 ind1 = nlci - nbghostcells - ispongearea 124 124 ind2 = nlci - nbghostcells … … 131 131 132 132 ! --- South --- ! 133 IF( (nbondj == -1) .OR. (nbondj == 2)) THEN133 IF( l_Southedge ) THEN 134 134 ind1 = 1+nbghostcells 135 135 ind2 = 1+nbghostcells + ispongearea … … 142 142 143 143 ! --- North --- ! 144 IF( (nbondj == 1) .OR. (nbondj == 2)) THEN144 IF( l_Northedge ) THEN 145 145 ind1 = nlcj - nbghostcells - ispongearea 146 146 ind2 = nlcj - nbghostcells … … 454 454 455 455 jmax = j2-1 456 IF ( (nbondj == 1).OR.(nbondj == 2)) jmax = MIN(jmax,nlcj-nbghostcells-2) ! North456 IF ( l_Northedge ) jmax = MIN(jmax,nlcj-nbghostcells-2) ! North 457 457 458 458 DO jj = j1+1, jmax … … 580 580 581 581 imax = i2 - 1 582 IF ( (nbondi == 1).OR.(nbondi == 2)) imax = MIN(imax,nlci-nbghostcells-2) ! East582 IF ( l_Eastedge ) imax = MIN(imax,nlci-nbghostcells-2) ! East 583 583 584 584 DO jj = j1+1, j2 -
NEMO/releases/r4.0/r4.0-HEAD/src/NST/agrif_top_interp.F90
r10068 r12737 136 136 ! 137 137 ! Remove CORNERS 138 IF( (nbondj == -1).OR.(nbondj == 2)) jmin = 2 + nbghostcells139 IF( (nbondj == +1).OR.(nbondj == 2)) jmax = nlcj - nbghostcells - 1140 IF( (nbondi == -1).OR.(nbondi == 2))imin = 2 + nbghostcells141 IF( (nbondi == +1).OR.(nbondi == 2))imax = nlci - nbghostcells - 1138 IF( l_Southedge ) jmin = 2 + nbghostcells 139 IF( l_Northedge ) jmax = nlcj - nbghostcells - 1 140 IF( l_Westedge ) imin = 2 + nbghostcells 141 IF( l_Eastedge ) imax = nlci - nbghostcells - 1 142 142 ! 143 143 IF( eastern_side ) THEN -
NEMO/releases/r4.0/r4.0-HEAD/src/OCE/DOM/dom_oce.F90
r10068 r12737 74 74 ! ! = 7 bi-cyclic East-West AND North-South 75 75 LOGICAL, PUBLIC :: l_Iperio, l_Jperio ! should we explicitely take care I/J periodicity 76 LOGICAL, PUBLIC :: l_Westedge, l_Eastedge, l_Northedge, l_Southedge ! flag to detect global domain edges 77 ! on local domain (needed for AGRIF) 76 78 77 79 ! ! domain MPP decomposition parameters -
NEMO/releases/r4.0/r4.0-HEAD/src/OCE/DOM/dommsk.F90
r11536 r12737 273 273 #if defined key_agrif 274 274 IF( .NOT. AGRIF_Root() ) THEN 275 IF ( (nbondi == 1).OR.(nbondi == 2))fmask(nlci-1 , : ,jk) = 0.e0 ! east276 IF ( (nbondi == -1).OR.(nbondi == 2))fmask(1 , : ,jk) = 0.e0 ! west277 IF ( (nbondj == 1).OR.(nbondj == 2)) fmask(: ,nlcj-1 ,jk) = 0.e0 ! north278 IF ( (nbondj == -1).OR.(nbondj == 2)) fmask(: ,1 ,jk) = 0.e0 ! south275 IF ( l_Eastedge ) fmask(nlci-1 , : ,jk) = 0.e0 ! east 276 IF ( l_Westedge ) fmask(1 , : ,jk) = 0.e0 ! west 277 IF ( l_Northedge ) fmask(: ,nlcj-1 ,jk) = 0.e0 ! north 278 IF ( l_Southedge ) fmask(: ,1 ,jk) = 0.e0 ! south 279 279 ENDIF 280 280 #endif -
NEMO/releases/r4.0/r4.0-HEAD/src/OCE/DYN/divhor.F90
r12141 r12737 88 88 #if defined key_agrif 89 89 IF( .NOT. Agrif_Root() ) THEN 90 IF( nbondi == -1 .OR. nbondi == 2) hdivn( 2 , : ,:) = 0._wp ! west91 IF( nbondi == 1 .OR. nbondi == 2) hdivn( nlci-1, : ,:) = 0._wp ! east92 IF( nbondj == -1 .OR. nbondj == 2 )hdivn( : , 2 ,:) = 0._wp ! south93 IF( nbondj == 1 .OR. nbondj == 2 )hdivn( : ,nlcj-1,:) = 0._wp ! north90 IF( l_Westedge ) hdivn( 2 , : ,:) = 0._wp ! west 91 IF( l_Eastedge ) hdivn( nlci-1, : ,:) = 0._wp ! east 92 IF( l_Southedge ) hdivn( : , 2 ,:) = 0._wp ! south 93 IF( l_Northedge ) hdivn( : ,nlcj-1,:) = 0._wp ! north 94 94 ENDIF 95 95 #endif -
NEMO/releases/r4.0/r4.0-HEAD/src/OCE/DYN/dynspg_ts.F90
r12206 r12737 487 487 ! Set fluxes during predictor step to ensure volume conservation 488 488 IF( .NOT.Agrif_Root() .AND. ln_bt_fw ) THEN 489 IF( (nbondi == -1).OR.(nbondi == 2)) THEN489 IF( l_Westedge ) THEN 490 490 DO jj = 1, jpj 491 491 zhU(2:nbghostcells+1,jj) = ubdy_w(1:nbghostcells,jj) * e2u(2:nbghostcells+1,jj) … … 493 493 END DO 494 494 ENDIF 495 IF( (nbondi == 1).OR.(nbondi == 2)) THEN495 IF( l_Eastedge ) THEN 496 496 DO jj=1,jpj 497 497 zhU(nlci-nbghostcells-1:nlci-2,jj) = ubdy_e(1:nbghostcells,jj) * e2u(nlci-nbghostcells-1:nlci-2,jj) … … 499 499 END DO 500 500 ENDIF 501 IF( (nbondj == -1).OR.(nbondj == 2)) THEN501 IF( l_Southedge ) THEN 502 502 DO ji=1,jpi 503 503 zhV(ji,2:nbghostcells+1) = vbdy_s(ji,1:nbghostcells) * e1v(ji,2:nbghostcells+1) … … 505 505 END DO 506 506 ENDIF 507 IF( (nbondj == 1).OR.(nbondj == 2)) THEN507 IF( l_Northedge ) THEN 508 508 DO ji=1,jpi 509 509 zhV(ji,nlcj-nbghostcells-1:nlcj-2) = vbdy_n(ji,1:nbghostcells) * e1v(ji,nlcj-nbghostcells-1:nlcj-2) -
NEMO/releases/r4.0/r4.0-HEAD/src/OCE/DYN/sshwzv.F90
r11414 r12737 203 203 #if defined key_agrif 204 204 IF( .NOT. AGRIF_Root() ) THEN 205 IF ( (nbondi == 1).OR.(nbondi == 2))wn(nlci-1 , : ,:) = 0.e0 ! east206 IF ( (nbondi == -1).OR.(nbondi == 2))wn(2 , : ,:) = 0.e0 ! west207 IF ( (nbondj == 1).OR.(nbondj == 2)) wn(: ,nlcj-1 ,:) = 0.e0 ! north208 IF ( (nbondj == -1).OR.(nbondj == 2)) wn(: ,2 ,:) = 0.e0 ! south205 IF ( l_Eastedge ) wn(nlci-1 , : ,:) = 0.e0 ! east 206 IF ( l_Westedge ) wn(2 , : ,:) = 0.e0 ! west 207 IF ( l_Northedge ) wn(: ,nlcj-1 ,:) = 0.e0 ! north 208 IF ( l_Southedge ) wn(: ,2 ,:) = 0.e0 ! south 209 209 ENDIF 210 210 #endif -
NEMO/releases/r4.0/r4.0-HEAD/src/OCE/LBC/mppini.F90
r11640 r12737 90 90 l_Jperio = jpnj == 1 .AND. (jperio == 2 .OR. jperio == 7) 91 91 ! 92 ! Set flags to detect global domain edges for AGRIF 93 l_Westedge = .true. ; l_Eastedge = .true. ; l_Northedge = .true.; l_Southedge = .true. 94 ! 92 95 IF(lwp) THEN 93 96 WRITE(numout,*) … … 162 165 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: ilej, ildj, ioso, iowe ! - - 163 166 LOGICAL, ALLOCATABLE, DIMENSION(:,:) :: llisoce ! - - 167 LOGICAL, ALLOCATABLE, DIMENSION(:,:) :: lliswest, lliseast, llisnorth, llissouth ! - - 164 168 NAMELIST/nambdy/ ln_bdy, nb_bdy, ln_coords_file, cn_coords_file, & 165 169 & ln_mask_file, cn_mask_file, cn_dyn2d, nn_dyn2d_dta, & … … 331 335 & ilei(jpni,jpnj), ildi(jpni,jpnj), iono(jpni,jpnj), ioea(jpni,jpnj), & 332 336 & ilej(jpni,jpnj), ildj(jpni,jpnj), ioso(jpni,jpnj), iowe(jpni,jpnj), & 337 #if defined key_agrif 338 lliswest(jpni,jpnj), lliseast(jpni,jpnj), & 339 & llisnorth(jpni,jpnj),llissouth(jpni,jpnj), & 340 #endif 333 341 & STAT=ierr ) 334 342 CALL mpp_sum( 'mppini', ierr ) … … 343 351 IF( ln_use_jattr ) CALL ctl_stop( 'STOP', 'mpp_init:Agrif children requires ln_use_jattr = .false. ' ) 344 352 ENDIF 353 lliswest(:,:) = .false. ; lliseast(:,:) = .false. ; llisnorth(:,:) = .false. ; llissouth(:,:) = .false. 345 354 #endif 346 355 ! … … 430 439 ENDIF 431 440 ! 441 #if defined key_agrif 442 IF ((ibondi(ii,ij) == 1).OR.(ibondi(ii,ij) == 2)) lliseast(ii,ij) = .true. ! east 443 IF ((ibondi(ii,ij) == -1).OR.(ibondi(ii,ij) == 2)) lliswest(ii,ij) = .true. ! west 444 IF ((ibondj(ii,ij) == 1).OR.(ibondj(ii,ij) == 2)) llisnorth(ii,ij) = .true. ! north 445 IF ((ibondj(ii,ij) == -1).OR.(ibondj(ii,ij) == 2)) llissouth(ii,ij) = .true. ! south 446 #endif 432 447 END DO 433 434 448 ! 4. deal with land subdomains 435 449 ! ---------------------------- … … 601 615 ! Suppress once vertical online interpolation is ok 602 616 !!$ IF(.NOT.Agrif_Root()) jpkglo = Agrif_Parent( jpkglo ) 617 l_Westedge = lliswest(ii,ij) 618 l_Eastedge = lliseast(ii,ij) 619 l_Northedge = llisnorth(ii,ij) 620 l_Southedge = llissouth(ii,ij) 603 621 #endif 604 622 jpim1 = jpi-1 ! inner domain indices … … 716 734 & ilci, ilcj, ilei, ilej, ildi, ildj, & 717 735 & iono, ioea, ioso, iowe, llisoce) 736 #if defined key_agrif 737 DEALLOCATE(lliswest, lliseast, llisnorth, llissouth) 738 #endif 718 739 ! 719 740 END SUBROUTINE mpp_init -
NEMO/releases/r4.0/r4.0-HEAD/src/OCE/SBC/sbcwave.F90
r11536 r12737 233 233 #if defined key_agrif 234 234 IF( .NOT. Agrif_Root() ) THEN 235 IF( nbondi == -1 .OR. nbondi == 2 )ze3divh( 2:nbghostcells+1,: ,:) = 0._wp ! west236 IF( nbondi == 1 .OR. nbondi == 2 )ze3divh( nlci-nbghostcells:nlci-1,:,:) = 0._wp ! east237 IF( nbondj == -1 .OR. nbondj == 2) ze3divh( :,2:nbghostcells+1 ,:) = 0._wp ! south238 IF( nbondj == 1 .OR. nbondj == 2) ze3divh( :,nlcj-nbghostcells:nlcj-1,:) = 0._wp ! north235 IF( l_Westedge ) ze3divh( 2:nbghostcells+1,: ,:) = 0._wp ! west 236 IF( l_Eastedge ) ze3divh( nlci-nbghostcells:nlci-1,:,:) = 0._wp ! east 237 IF( l_Southedge ) ze3divh( :,2:nbghostcells+1 ,:) = 0._wp ! south 238 IF( l_Northedge ) ze3divh( :,nlcj-nbghostcells:nlcj-1,:) = 0._wp ! north 239 239 ENDIF 240 240 #endif
Note: See TracChangeset
for help on using the changeset viewer.