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 13998 for NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/LBC/mppini.F90 – NEMO

Ignore:
Timestamp:
2020-12-02T14:55:21+01:00 (3 years ago)
Author:
techene
Message:

branch updated with trunk 13787

Location:
NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3

    • Property svn:externals
      •  

        old new  
        88 
        99# SETTE 
        10 ^/utils/CI/sette@13292        sette 
         10^/utils/CI/sette@13559        sette 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/OCE/LBC/mppini.F90

    r13915 r13998  
    6262      !!---------------------------------------------------------------------- 
    6363      ! 
    64       jpiglo = Ni0glo 
    65       jpjglo = Nj0glo 
     64      nn_hls = 1 
     65      jpiglo = Ni0glo + 2 * nn_hls 
     66      jpjglo = Nj0glo + 2 * nn_hls 
    6667      jpimax = jpiglo 
    6768      jpjmax = jpjglo 
     
    7273      jpjm1  = jpj-1                         !   "           " 
    7374      jpkm1  = MAX( 1, jpk-1 )               !   "           " 
    74       ! 
    75       CALL init_doloop                       ! set start/end indices or do-loop depending on the halo width value (nn_hls)  
    76       ! 
    7775      jpij   = jpi*jpj 
    7876      jpni   = 1 
    7977      jpnj   = 1 
    8078      jpnij  = jpni*jpnj 
    81       nn_hls = 1 
    8279      nimpp  = 1 
    8380      njmpp  = 1 
     
    9188      l_Jperio = jpnj == 1 .AND. (jperio == 2 .OR. jperio == 7) 
    9289      ! 
     90      CALL init_doloop                       ! set start/end indices or do-loop depending on the halo width value (nn_hls)  
     91      ! 
    9392      IF(lwp) THEN 
    9493         WRITE(numout,*) 
     
    9998      ENDIF 
    10099      ! 
    101       IF(  jpni /= 1 .OR. jpnj /= 1 .OR. jpnij /= 1 )                                     & 
    102          CALL ctl_stop( 'mpp_init: equality  jpni = jpnj = jpnij = 1 is not satisfied',   & 
    103             &           'the domain is lay out for distributed memory computing!' ) 
    104          ! 
    105100#if defined key_agrif 
    106101    IF (.NOT.agrif_root()) THEN 
     
    676671    END SUBROUTINE mpp_init 
    677672 
     673#endif 
    678674 
    679675    SUBROUTINE mpp_basesplit( kiglo, kjglo, khls, knbi, knbj, kimax, kjmax, kimppt, kjmppt, klci, klcj) 
     
    790786      !! ** Method  : 
    791787      !!---------------------------------------------------------------------- 
    792       INTEGER,           INTENT(in   ) ::   knbij         ! total number if subdomains              (knbi*knbj) 
     788      INTEGER,           INTENT(in   ) ::   knbij         ! total number of subdomains (knbi*knbj) 
    793789      INTEGER, OPTIONAL, INTENT(  out) ::   knbi, knbj    ! number if subdomains along i and j (knbi and knbj) 
    794790      INTEGER, OPTIONAL, INTENT(  out) ::   knbcnt        ! number of land subdomains 
     
    798794      INTEGER :: iszitst, iszjtst 
    799795      INTEGER :: isziref, iszjref 
     796      INTEGER :: iszimin, iszjmin 
    800797      INTEGER :: inbij, iszij 
    801798      INTEGER :: inbimax, inbjmax, inbijmax, inbijold 
     
    826823      inbimax = 0 
    827824      inbjmax = 0 
    828       isziref = Ni0glo*Nj0glo+1 
    829       iszjref = Ni0glo*Nj0glo+1 
     825      isziref = jpiglo*jpjglo+1   ! define a value that is larger than the largest possible 
     826      iszjref = jpiglo*jpjglo+1 
     827      ! 
     828      iszimin = 4*nn_hls          ! minimum size of the MPI subdomain so halos are always adressing neighbor inner domain 
     829      iszjmin = 4*nn_hls 
     830      IF( jperio == 3 .OR. jperio == 4 )   iszjmin = MAX(iszjmin, 2+3*nn_hls)   ! V and F folding must be outside of southern halos 
     831      IF( jperio == 5 .OR. jperio == 6 )   iszjmin = MAX(iszjmin, 1+3*nn_hls)   ! V and F folding must be outside of southern halos 
    830832      ! 
    831833      ! get the list of knbi that gives a smaller jpimax than knbi-1 
     
    835837         iszitst = ( nx_global+2-2*nn_hls + (ji-1) ) / ji + 2*nn_hls    ! first  dim. 
    836838#else 
    837          iszitst = ( Ni0glo + (ji-1) ) / ji 
     839         iszitst = ( Ni0glo + (ji-1) ) / ji + 2*nn_hls   ! max subdomain i-size 
    838840#endif 
    839          IF( iszitst < isziref ) THEN 
     841         IF( iszitst < isziref .AND. iszitst >= iszimin ) THEN 
    840842            isziref = iszitst 
    841843            inbimax = inbimax + 1 
     
    846848         iszjtst = ( ny_global+2-2*nn_hls + (ji-1) ) / ji + 2*nn_hls    ! first  dim. 
    847849#else 
    848          iszjtst = ( Nj0glo + (ji-1) ) / ji 
     850         iszjtst = ( Nj0glo + (ji-1) ) / ji + 2*nn_hls   ! max subdomain j-size 
    849851#endif 
    850          IF( iszjtst < iszjref ) THEN 
     852         IF( iszjtst < iszjref .AND. iszjtst >= iszjmin ) THEN 
    851853            iszjref = iszjtst 
    852854            inbjmax = inbjmax + 1 
     
    901903      isz0 = 0                                                  ! number of best partitions      
    902904      inbij = 1                                                 ! start with the min value of inbij1 => 1 
    903       iszij = Ni0glo*Nj0glo+1                                   ! default: larger than global domain 
     905      iszij = jpiglo*jpjglo+1                                   ! default: larger than global domain 
    904906      DO WHILE( inbij <= inbijmax )                             ! if we did not reach the max of inbij1 
    905907         ii = MINLOC(iszij1, mask = inbij1 == inbij, dim = 1)   ! warning: send back the first occurence if multiple results 
    906908         IF ( iszij1(ii) < iszij ) THEN 
     909            ii = MINLOC( iszi1+iszj1, mask = iszij1 == iszij1(ii) .AND. inbij1 == inbij, dim = 1)  ! select the smaller perimeter if multiple min 
    907910            isz0 = isz0 + 1 
    908911            indexok(isz0) = ii 
     
    13221325   END SUBROUTINE init_nfdcom 
    13231326 
    1324 #endif 
    13251327 
    13261328   SUBROUTINE init_doloop 
Note: See TracChangeset for help on using the changeset viewer.