New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 9667 for NEMO/trunk/src – NEMO

Changeset 9667 for NEMO/trunk/src


Ignore:
Timestamp:
2018-05-28T17:47:05+02:00 (6 years ago)
Author:
smasson
Message:

trunk: cyclic north-south periodicity and nperio cleaning, see #2093

Location:
NEMO/trunk/src/OCE
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/CRS/crs.F90

    r9598 r9667  
    276276      jpim1  = jpim1_full 
    277277      jpjm1  = jpjm1_full 
    278       nperio = nperio_full 
     278      jperio = nperio_full 
    279279 
    280280      npolj  = npolj_full 
     
    315315      jpim1  = jpi_crsm1 
    316316      jpjm1  = jpj_crsm1 
    317       nperio = nperio_crs 
     317      jperio = nperio_crs 
    318318 
    319319      npolj  = npolj_crs 
  • NEMO/trunk/src/OCE/CRS/crsdom.F90

    r9598 r9667  
    20372037      jpim1_full  = jpim1 
    20382038      jpjm1_full  = jpjm1 
    2039       nperio_full = nperio 
     2039      nperio_full = jperio 
    20402040 
    20412041      npolj_full  = npolj 
     
    21212121      CASE ( 0 )  
    21222122 
    2123          SELECT CASE ( nperio ) 
     2123         SELECT CASE ( jperio ) 
    21242124      
    21252125  
  • NEMO/trunk/src/OCE/DOM/dom_oce.F90

    r9598 r9667  
    6666   !! space domain parameters 
    6767   !!---------------------------------------------------------------------- 
    68    INTEGER, PUBLIC ::   jperio   !: Global domain lateral boundary type (between 0 and 6) 
     68   INTEGER, PUBLIC ::   jperio   !: Global domain lateral boundary type (between 0 and 7) 
    6969   !                                !  = 0 closed                 ;   = 1 cyclic East-West 
    70    !                                !  = 2 equatorial symmetric   ;   = 3 North fold T-point pivot 
     70   !                                !  = 2 cyclic North-South     ;   = 3 North fold T-point pivot 
    7171   !                                !  = 4 cyclic East-West AND North fold T-point pivot 
    7272   !                                !  = 5 North fold F-point pivot 
    7373   !                                !  = 6 cyclic East-West AND North fold F-point pivot 
    74    INTEGER, PUBLIC ::   nperio   !: Local domain lateral boundary type (deduced from jperio and MPP decomposition) 
     74   !                                !  = 7 bi-cyclic East-West AND North-South 
     75   LOGICAL, PUBLIC ::   l_Iperio, l_Jperio   !   should we explicitely take care I/J periodicity  
    7576 
    7677   !                                 !  domain MPP decomposition parameters 
  • NEMO/trunk/src/OCE/ICB/icblbc.F90

    r9598 r9667  
    8585      !! ============================= 
    8686 
    87       IF( nperio == 1 .OR. nperio == 4 .OR. nperio == 6 ) THEN 
     87      IF( l_Iperio ) THEN 
    8888 
    8989         this => first_berg 
     
    103103      !! north/south boundaries 
    104104      !! ====================== 
    105       ! south symmetric 
    106       IF( nperio == 2 )   CALL ctl_stop(' south symmetric condition not implemented for icebergs') 
     105      IF( l_Jperio)      CALL ctl_stop(' north-south periodicity not implemented for icebergs') 
    107106      ! north fold 
    108       IF( nperio == 3 .OR. nperio == 4 .OR. nperio == 5 .OR. nperio == 6 )   CALL icb_lbc_nfld() 
     107      IF( npolj /= 0 )   CALL icb_lbc_nfld() 
    109108      ! 
    110109   END SUBROUTINE icb_lbc 
  • NEMO/trunk/src/OCE/IOM/prtctl.F90

    r9598 r9667  
    387387      !!                periodic 
    388388      !!                Type :         jperio global periodic condition 
    389       !!                               nperio local  periodic condition 
    390389      !! 
    391390      !! ** Action  : - set domain parameters 
    392391      !!                    nimpp     : longitudinal index  
    393392      !!                    njmpp     : latitudinal  index 
    394       !!                    nperio    : lateral condition type  
    395393      !!                    narea     : number for local area 
    396394      !!                    nlcil      : first dimension 
  • NEMO/trunk/src/OCE/LBC/lbc_lnk_generic.h90

    r9019 r9667  
    6060      INTEGER  ::   ipi, ipj, ipk, ipl, ipf      ! dimension of the input array 
    6161      REAL(wp) ::   zland 
    62       LOGICAL  ::   ll_Iperio, ll_Jperio, ll_nfd 
     62      LOGICAL  ::   ll_nfd 
    6363      !!---------------------------------------------------------------------- 
    6464      ! 
     
    6767      ipf = F_SIZE(ptab)   ! 5th    -      use in "multi" case (array of pointers) 
    6868      ! 
    69       ll_Iperio = nperio==1 .OR. nperio==4 .OR. nperio==6 
    70       ll_Jperio = jperio==7 
    71       ll_nfd    = nperio==3 .OR. nperio==4 .OR. nperio==5 .OR. nperio==6 
     69      ll_nfd    = jperio==3 .OR. jperio==4 .OR. jperio==5 .OR. jperio==6 
    7270      ! 
    7371      IF( PRESENT( pval ) ) THEN   ;   zland = pval      ! set land value 
     
    8987            ! 
    9088            !                                ! East-West boundaries 
    91             IF( ll_Iperio ) THEN                   !* cyclic 
     89            IF( l_Iperio ) THEN                   !* cyclic 
    9290               ARRAY_IN( 1 ,:,:,:,jf) = ARRAY_IN(jpim1,:,:,:,jf) 
    9391               ARRAY_IN(jpi,:,:,:,jf) = ARRAY_IN(  2  ,:,:,:,jf) 
     
    9795            ENDIF 
    9896            !                                ! North-South boundaries 
    99             IF( ll_Jperio ) THEN                   !* cyclic 
     97            IF( l_Jperio ) THEN                   !* cyclic 
    10098               ARRAY_IN(:, 1 ,:,:,jf) = ARRAY_IN(:, jpjm1,:,:,jf) 
    10199               ARRAY_IN(:,jpj,:,:,jf) = ARRAY_IN(:,   2  ,:,:,jf) 
  • NEMO/trunk/src/OCE/LBC/lib_mpp.F90

    r9598 r9667  
    14661466      !                                      ! East-West boundaries 
    14671467      !                                           !* Cyclic east-west 
    1468       IF( nbondi == 2 .AND. (nperio == 1 .OR. nperio == 4 .OR. nperio == 6) ) THEN 
    1469          pt2d(1-kexti:     1    ,:) = pt2d(jpim1-kexti: jpim1 ,:)       ! east 
    1470          pt2d(   jpi  :jpi+kexti,:) = pt2d(     2      :2+kexti,:)       ! west 
     1468      IF( l_Iperio ) THEN 
     1469         pt2d(1-kexti:     1   ,:) = pt2d(jpim1-kexti: jpim1 ,:)       ! east 
     1470         pt2d(  jpi  :jpi+kexti,:) = pt2d(     2     :2+kexti,:)       ! west 
    14711471         ! 
    14721472      ELSE                                        !* closed 
    1473          IF( .NOT. cd_type == 'F' )   pt2d(  1-kexti   :nn_hls    ,:) = 0._wp    ! south except at F-point 
    1474                                       pt2d(jpi-nn_hls+1:jpi+kexti,:) = 0._wp    ! north 
     1473         IF( .NOT. cd_type == 'F' )   pt2d(  1-kexti   :nn_hls   ,:) = 0._wp    ! east except at F-point 
     1474                                      pt2d(jpi-nn_hls+1:jpi+kexti,:) = 0._wp    ! west 
     1475      ENDIF 
     1476      !                                      ! North-South boundaries 
     1477      IF( l_Jperio ) THEN                         !* cyclic (only with no mpp j-split) 
     1478         pt2d(:,1-kextj:     1   ) = pt2d(:,jpjm1-kextj:  jpjm1)       ! north 
     1479         pt2d(:,  jpj  :jpj+kextj) = pt2d(:,     2     :2+kextj)       ! south 
     1480      ELSE                                        !* closed 
     1481         IF( .NOT. cd_type == 'F' )   pt2d(:,  1-kextj   :nn_hls   ) = 0._wp    ! north except at F-point 
     1482                                      pt2d(:,jpj-nn_hls+1:jpj+kextj) = 0._wp    ! south 
    14751483      ENDIF 
    14761484      ! 
  • NEMO/trunk/src/OCE/LBC/mpp_bdy_generic.h90

    r9019 r9667  
    7676         IF( nbondi == 2) THEN                  ! neither subdomain to the east nor to the west 
    7777            !                                      !* Cyclic 
    78             IF( nperio == 1 .OR. nperio == 4 .OR. nperio == 6 ) THEN 
     78            IF( l_Iperio ) THEN 
    7979               ARRAY_IN( 1 ,:,:,:,jf) = ARRAY_IN(jpim1,:,:,:,jf) 
    8080               ARRAY_IN(jpi,:,:,:,jf) = ARRAY_IN(  2  ,:,:,:,jf) 
     
    9191         !                                ! North-South boundaries 
    9292         ! 
    93          IF (nbondj == 2 .OR. nbondj == -1) THEN      !* closed 
    94            IF( .NOT. NAT_IN(jf) == 'F' )   ARRAY_IN(:,1:nn_hls,:,:,jf) = zland            ! south except F-point 
    95          ELSEIF (nbondj == 2 .OR. nbondj == 1) THEN 
    96                                            ARRAY_IN(:,nlcj-nn_hls+1:jpj,:,:,jf) = zland   ! north 
     93         IF( nbondj == 2) THEN                  ! neither subdomain to the north nor to the south 
     94            !                                      !* Cyclic 
     95            IF( l_Jperio ) THEN 
     96               ARRAY_IN(:, 1 ,:,:,jf) = ARRAY_IN(:,jpjm1,:,:,jf) 
     97               ARRAY_IN(:,jpj,:,:,jf) = ARRAY_IN(:,  2  ,:,:,jf) 
     98            ELSE                                   !* Closed 
     99               IF( .NOT. NAT_IN(jf) == 'F' )   ARRAY_IN(:,     1       :nn_hls,:,:,jf) = zland  ! east except F-point 
     100                                               ARRAY_IN(:,nlcj-nn_hls+1:jpj   ,:,:,jf) = zland  ! west 
     101            ENDIF 
     102         ELSEIF(nbondi == -1) THEN              ! subdomain to the east only 
     103            IF( .NOT. NAT_IN(jf) == 'F' )   ARRAY_IN(:,1:nn_hls,:,:,jf) = zland     ! south except F-point 
     104            ! 
     105         ELSEIF(nbondi == 1) THEN               ! subdomain to the west only 
     106            ARRAY_IN(:,nlcj-nn_hls+1:jpj,:,:,jf) = zland    ! north 
    97107         ENDIF 
     108         ! 
    98109      END DO 
    99110 
  • NEMO/trunk/src/OCE/LBC/mpp_lnk_generic.h90

    r9019 r9667  
    6262      INTEGER  ::   ml_req1, ml_req2, ml_err     ! for key_mpi_isend 
    6363      REAL(wp) ::   zland 
    64       LOGICAL  ::   ll_Iperio, ll_Jperio 
    6564      INTEGER , DIMENSION(MPI_STATUS_SIZE)      ::   ml_stat        ! for key_mpi_isend 
    6665      REAL(wp), DIMENSION(:,:,:,:,:,:), ALLOCATABLE ::   zt3ns, zt3sn   ! north-south & south-north  halos 
     
    7574         &      zt3ew(jpj,nn_hls,ipk,ipl,ipf,2), zt3we(jpj,nn_hls,ipk,ipl,ipf,2)  ) 
    7675      ! 
    77       ll_Iperio = nbondi == 2 .AND. (nperio == 1 .OR. nperio == 4 .OR. nperio == 6) 
    78       ll_Jperio = nbondj == 2 .AND.  jperio == 7 
    79       ! 
    8076      IF( PRESENT( pval ) ) THEN   ;   zland = pval      ! set land value 
    8177      ELSE                         ;   zland = 0._wp     ! zero by default 
     
    111107         DO jf = 1, ipf                      ! number of arrays to be treated 
    112108            ! 
    113             !                             ! East-West boundaries 
    114             IF( ll_Iperio ) THEN                   !* cyclic 
     109            !                                ! East-West boundaries 
     110            IF( l_Iperio ) THEN                    !* cyclic 
    115111               ARRAY_IN( 1 ,:,:,:,jf) = ARRAY_IN(jpim1,:,:,:,jf) 
    116112               ARRAY_IN(jpi,:,:,:,jf) = ARRAY_IN(  2  ,:,:,:,jf) 
     
    120116            ENDIF 
    121117            !                                ! North-South boundaries 
    122             IF( ll_Jperio ) THEN                   !* cyclic (only with no mpp j-split) 
     118            IF( l_Jperio ) THEN                    !* cyclic (only with no mpp j-split) 
    123119               ARRAY_IN(:, 1 ,:,:,jf) = ARRAY_IN(:, jpjm1,:,:,jf) 
    124120               ARRAY_IN(:,jpj,:,:,jf) = ARRAY_IN(:,   2  ,:,:,jf) 
  • NEMO/trunk/src/OCE/LBC/mppini.F90

    r9657 r9667  
    7878      nlei   = jpi 
    7979      nlej   = jpj 
    80       nperio = jperio 
    8180      nbondi = 2 
    8281      nbondj = 2 
    8382      nidom  = FLIO_DOM_NONE 
    8483      npolj = jperio 
     84      l_Iperio = jpni == 1 .AND. (jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7) 
     85      l_Jperio = jpnj == 1 .AND. (jperio == 2 .OR. jperio == 7) 
    8586      ! 
    8687      IF(lwp) THEN 
     
    8889         WRITE(numout,*) 'mpp_init : NO massively parallel processing' 
    8990         WRITE(numout,*) '~~~~~~~~ ' 
    90          WRITE(numout,*) '   nperio = ', nperio, '   nimpp  = ', nimpp 
    91          WRITE(numout,*) '   npolj  = ', npolj , '   njmpp  = ', njmpp 
     91         WRITE(numout,*) '   l_Iperio = ', l_Iperio, '    l_Jperio = ', l_Jperio  
     92         WRITE(numout,*) '     npolj  = ',   npolj , '      njmpp  = ', njmpp 
    9293      ENDIF 
    9394      ! 
     
    9596         CALL ctl_stop( 'mpp_init: equality  jpni = jpnj = jpnij = 1 is not satisfied',   & 
    9697            &           'the domain is lay out for distributed memory computing!' ) 
    97          ! 
    98       IF( jperio == 7 ) CALL ctl_stop( 'mpp_init: jperio = 7 needs distributed memory computing ',       & 
    99          &                             'with 1 process. Add key_mpp_mpi in the list of active cpp keys ' ) 
    10098         ! 
    10199   END SUBROUTINE mpp_init 
     
    122120      !!      periodic 
    123121      !!      Type :         jperio global periodic condition 
    124       !!                     nperio local  periodic condition 
    125122      !! 
    126123      !! ** Action : - set domain parameters 
    127124      !!                    nimpp     : longitudinal index  
    128125      !!                    njmpp     : latitudinal  index 
    129       !!                    nperio    : lateral condition type  
    130126      !!                    narea     : number for local area 
    131127      !!                    nlci      : first dimension 
     
    276272      ! 3. Subdomain description in the Regular Case 
    277273      ! -------------------------------------------- 
    278       nperio = 0 
     274      ! specific cases where there is no communication -> must do the periodicity by itself 
     275      ! Warning: because of potential land-area suppression, do not use nbond[ij] == 2   
     276      l_Iperio = jpni == 1 .AND. (jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7) 
     277      l_Jperio = jpnj == 1 .AND. (jperio == 2 .OR. jperio == 7) 
     278       
    279279      icont = -1 
    280280      DO jarea = 1, jpni*jpnj 
     
    284284         ili = ilci(ii,ij) 
    285285         ilj = ilcj(ii,ij) 
    286          ibondj(ii,ij) = -1 
    287          IF( jarea >  jpni          )   ibondj(ii,ij) = 0 
    288          IF( jarea >  (jpnj-1)*jpni )   ibondj(ii,ij) = 1 
    289          IF( jpnj  == 1             )   ibondj(ii,ij) = 2 
    290          ibondi(ii,ij) = 0 
    291          IF( MOD(jarea,jpni) ==  1  )   ibondi(ii,ij) = -1 
    292          IF( MOD(jarea,jpni) ==  0  )   ibondi(ii,ij) =  1 
    293          IF( jpni            ==  1  )   ibondi(ii,ij) =  2 
     286         ibondi(ii,ij) = 0                         ! default: has e-w neighbours 
     287         IF( ii   ==    1 )   ibondi(ii,ij) = -1   ! first column, has only e neighbour 
     288         IF( ii   == jpni )   ibondi(ii,ij) =  1   ! last column,  has only w neighbour 
     289         IF( jpni ==    1 )   ibondi(ii,ij) =  2   ! has no e-w neighbour 
     290         ibondj(ii,ij) = 0                         ! default: has n-s neighbours 
     291         IF( ij   ==    1 )   ibondj(ii,ij) = -1   ! first row, has only n neighbour 
     292         IF( ij   == jpnj )   ibondj(ii,ij) =  1   ! last row,  has only s neighbour 
     293         IF( jpnj ==    1 )   ibondj(ii,ij) =  2   ! has no n-s neighbour 
    294294 
    295295         ! Subdomain neighbors (get their zone number): default definition 
     
    305305         ! East-West periodicity: change ibondi, ioea, iowe 
    306306         IF( jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7 ) THEN 
    307             IF( jpni == 1 )THEN 
    308                ibondi(ii,ij) = 2 
    309                nperio = 1 
    310             ELSE 
    311                ibondi(ii,ij) = 0 
    312             ENDIF 
    313             IF( MOD(jarea,jpni) == 0 ) THEN 
    314                ioea(ii,ij) = iarea0 - (jpni-1) 
    315             ENDIF 
    316             IF( MOD(jarea,jpni) == 1 ) THEN 
    317                iowe(ii,ij) = iarea0 + jpni - 1 
    318             ENDIF 
     307            IF( jpni  /= 1 )   ibondi(ii,ij) = 0                        ! redefine: all have e-w neighbours 
     308            IF( ii ==    1 )   iowe(ii,ij) = iarea0 +        (jpni-1)   ! redefine: first column, address of w neighbour 
     309            IF( ii == jpni )   ioea(ii,ij) = iarea0 -        (jpni-1)   ! redefine: last column,  address of e neighbour 
     310         ENDIF 
     311 
     312         ! Simple North-South periodicity: change ibondj, ioso, iono 
     313         IF( jperio == 2 .OR. jperio == 7 ) THEN 
     314            IF( jpnj  /= 1 )   ibondj(ii,ij) = 0                        ! redefine: all have n-s neighbours 
     315            IF( ij ==    1 )   ioso(ii,ij) = iarea0 + jpni * (jpnj-1)   ! redefine: first row, address of s neighbour 
     316            IF( ij == jpnj )   iono(ii,ij) = iarea0 - jpni * (jpnj-1)   ! redefine: last row,  address of n neighbour 
    319317         ENDIF 
    320318 
     
    393391         ii = 1 + MOD( jarea-1  , jpni ) 
    394392         ij = 1 +     (jarea-1) / jpni 
     393         ! land-only area with an active n neigbour 
    395394         IF ( ipproc(ii,ij) == -1 .AND. 0 <= iono(ii,ij) .AND. iono(ii,ij) <= jpni*jpnj-1 ) THEN 
    396             iino = 1 + MOD( iono(ii,ij) , jpni ) 
    397             ijno = 1 +      iono(ii,ij) / jpni 
    398             ! Need to reverse the logical direction of communication  
    399             ! for northern neighbours of northern row processors (north-fold) 
    400             ! i.e. need to check that the northern neighbour only communicates 
    401             ! to the SOUTH (or not at all) if this area is land-only (#1057) 
    402             idir = 1 
    403             IF( ij == jpnj .AND. ijno == jpnj )   idir = -1     
    404             IF( ibondj(iino,ijno) == idir     )   ibondj(iino,ijno) =   2 
    405             IF( ibondj(iino,ijno) == 0        )   ibondj(iino,ijno) = -idir 
    406          ENDIF 
     395            iino = 1 + MOD( iono(ii,ij) , jpni )                    ! ii index of this n neigbour 
     396            ijno = 1 +      iono(ii,ij) / jpni                      ! ij index of this n neigbour 
     397            ! In case of north fold exchange: I am the n neigbour of my n neigbour!! (#1057) 
     398            ! --> for northern neighbours of northern row processors (in case of north-fold) 
     399            !     need to reverse the LOGICAL direction of communication  
     400            idir = 1                                           ! we are indeed the s neigbour of this n neigbour 
     401            IF( ij == jpnj .AND. ijno == jpnj )   idir = -1    ! both are on the last row, we are in fact the n neigbour 
     402            IF( ibondj(iino,ijno) == idir     )   ibondj(iino,ijno) =   2     ! this n neigbour had only a s/n neigbour -> no more 
     403            IF( ibondj(iino,ijno) == 0        )   ibondj(iino,ijno) = -idir   ! this n neigbour had both, n-s neighbours -> keep 1 
     404         ENDIF 
     405         ! land-only area with an active s neigbour 
    407406         IF( ipproc(ii,ij) == -1 .AND. 0 <= ioso(ii,ij) .AND. ioso(ii,ij) <= jpni*jpnj-1 ) THEN 
    408             iiso = 1 + MOD( ioso(ii,ij) , jpni ) 
    409             ijso = 1 +      ioso(ii,ij) / jpni 
    410             IF( ibondj(iiso,ijso) == -1 )   ibondj(iiso,ijso) = 2 
    411             IF( ibondj(iiso,ijso) ==  0 )   ibondj(iiso,ijso) = 1 
    412          ENDIF 
     407            iiso = 1 + MOD( ioso(ii,ij) , jpni )                    ! ii index of this s neigbour 
     408            ijso = 1 +      ioso(ii,ij) / jpni                      ! ij index of this s neigbour 
     409            IF( ibondj(iiso,ijso) == -1 )   ibondj(iiso,ijso) = 2   ! this s neigbour had only a n neigbour    -> no more neigbour 
     410            IF( ibondj(iiso,ijso) ==  0 )   ibondj(iiso,ijso) = 1   ! this s neigbour had both, n-s neighbours -> keep s neigbour 
     411         ENDIF 
     412         ! land-only area with an active e neigbour 
    413413         IF( ipproc(ii,ij) == -1 .AND. 0 <= ioea(ii,ij) .AND. ioea(ii,ij) <= jpni*jpnj-1 ) THEN 
    414             iiea = 1 + MOD( ioea(ii,ij) , jpni ) 
    415             ijea = 1 +      ioea(ii,ij) / jpni 
    416             IF( ibondi(iiea,ijea) == 1 )   ibondi(iiea,ijea) =  2 
    417             IF( ibondi(iiea,ijea) == 0 )   ibondi(iiea,ijea) = -1 
    418          ENDIF 
     414            iiea = 1 + MOD( ioea(ii,ij) , jpni )                    ! ii index of this e neigbour 
     415            ijea = 1 +      ioea(ii,ij) / jpni                      ! ij index of this e neigbour 
     416            IF( ibondi(iiea,ijea) == 1 )   ibondi(iiea,ijea) =  2   ! this e neigbour had only a w neigbour    -> no more neigbour 
     417            IF( ibondi(iiea,ijea) == 0 )   ibondi(iiea,ijea) = -1   ! this e neigbour had both, e-w neighbours -> keep e neigbour 
     418         ENDIF 
     419         ! land-only area with an active w neigbour 
    419420         IF( ipproc(ii,ij) == -1 .AND. 0 <= iowe(ii,ij) .AND. iowe(ii,ij) <= jpni*jpnj-1) THEN 
    420             iiwe = 1 + MOD( iowe(ii,ij) , jpni ) 
    421             ijwe = 1 +      iowe(ii,ij) / jpni 
    422             IF( ibondi(iiwe,ijwe) == -1 )   ibondi(iiwe,ijwe) = 2 
    423             IF( ibondi(iiwe,ijwe) ==  0 )   ibondi(iiwe,ijwe) = 1 
     421            iiwe = 1 + MOD( iowe(ii,ij) , jpni )                    ! ii index of this w neigbour 
     422            ijwe = 1 +      iowe(ii,ij) / jpni                      ! ij index of this w neigbour 
     423            IF( ibondi(iiwe,ijwe) == -1 )   ibondi(iiwe,ijwe) = 2   ! this w neigbour had only a e neigbour    -> no more neigbour 
     424            IF( ibondi(iiwe,ijwe) ==  0 )   ibondi(iiwe,ijwe) = 1   ! this w neigbour had both, e-w neighbours -> keep w neigbour 
    424425         ENDIF 
    425426      END DO 
     
    562563         WRITE(numout,*) '      nbondj = ', nbondj 
    563564         WRITE(numout,*) '      npolj  = ', npolj 
    564          WRITE(numout,*) '      nperio = ', nperio 
     565         WRITE(numout,*) '    l_Iperio = ', l_Iperio 
     566         WRITE(numout,*) '    l_Jperio = ', l_Jperio 
    565567         WRITE(numout,*) '      nlci   = ', nlci 
    566568         WRITE(numout,*) '      nlcj   = ', nlcj 
     
    571573         WRITE(numout,*) '      nn_hls = ', nn_hls  
    572574      ENDIF 
    573   
    574       IF( nperio == 1 .AND. jpni /= 1 )   CALL ctl_stop( 'mpp_init: error on cyclicity' ) 
    575  
    576       IF( jperio == 7 .AND. ( jpni /= 1 .OR. jpnj /= 1 ) )   & 
    577          &                  CALL ctl_stop( ' mpp_init: error jperio = 7 works only with jpni = jpnj = 1' ) 
    578575 
    579576      !                          ! Prepare mpp north fold 
Note: See TracChangeset for help on using the changeset viewer.