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 3818 – NEMO

Changeset 3818


Ignore:
Timestamp:
2013-02-21T11:30:14+01:00 (11 years ago)
Author:
acc
Message:

Branch dev_MERGE_2012. #1057. Correct mppini_2.h90 logic concerning the northern neighbour across the north-fold

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/LBC/mppini_2.h90

    r2442 r3818  
    4444      INTEGER :: ji, jj, jn, jproc, jarea     ! dummy loop indices 
    4545      INTEGER ::  inum                        ! temporary logical unit 
     46      INTEGER ::  idir                        ! temporary integers 
    4647      INTEGER ::   & 
    4748         ii, ij, ifreq, il1, il2,          &  ! temporary integers 
     
    267268            IF( jarea > ijm1 ) ipolj(ii,ij) = 3 
    268269            IF( MOD(jpni,2) == 1 .AND. jarea == imil ) ipolj(ii,ij) = 4 
    269             IF( ipolj(ii,ij) == 3 ) iono(ii,ij) = jpni*jpnj-jarea+ijm1 
     270            IF( ipolj(ii,ij) == 3 ) iono(ii,ij) = jpni*jpnj-jarea+ijm1 - 1   ! MPI rank of northern neighbour 
    270271         ENDIF 
    271272         IF( jperio == 5 .OR. jperio == 6 ) THEN 
     
    274275            IF( jarea > ijm1) ipolj(ii,ij) = 5 
    275276            IF( MOD(jpni,2) == 1 .AND. jarea == imil ) ipolj(ii,ij) = 6 
    276             IF( ipolj(ii,ij) == 5) iono(ii,ij) = jpni*jpnj-jarea+ijm1 
     277            IF( ipolj(ii,ij) == 5) iono(ii,ij) = jpni*jpnj-jarea+ijm1 - 1    ! MPI rank of northern neighbour 
    277278         ENDIF 
    278279 
     
    338339            iino = 1 + MOD(iono(ii,ij),jpni) 
    339340            ijno = 1 +    (iono(ii,ij))/jpni 
    340             IF( ibondj(iino,ijno) == 1 ) ibondj(iino,ijno)=2 
    341             IF( ibondj(iino,ijno) == 0 ) ibondj(iino,ijno) = -1 
     341              ! Need to reverse the logical direction of communication  
     342              ! for northern neighbours of northern row processors (north-fold) 
     343              ! i.e. need to check that the northern neighbour only communicates 
     344              ! to the SOUTH (or not at all) if this area is land-only (#1057) 
     345            idir = 1 
     346            IF( ij .eq. jpnj .AND. ijno .eq. jpnj ) idir = -1     
     347            IF( ibondj(iino,ijno) == idir ) ibondj(iino,ijno)=2 
     348            IF( ibondj(iino,ijno) == 0 ) ibondj(iino,ijno) = -idir 
    342349         ENDIF 
    343350         IF( ipproc(ii,ij) == -1 .AND. ioso(ii,ij) >= 0   & 
Note: See TracChangeset for help on using the changeset viewer.