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 12760 for NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/mppini.F90 – NEMO

Ignore:
Timestamp:
2020-04-17T08:53:28+02:00 (4 years ago)
Author:
smasson
Message:

Extra_Halo: update do_loop_substitute for nn_hls=2, see #2366

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/mppini.F90

    r12586 r12760  
    88   !!            8.0  !  1998-05  (M. Imbard, J. Escobar, L. Colombet )  SHMEM and MPI versions 
    99   !!  NEMO      1.0  !  2004-01  (G. Madec, J.M Molines)  F90 : free form , north fold jpni > 1 
    10    !!            3.4  ! 2011-10  (A. C. Coward, NOCS & J. Donners, PRACE) add mpp_init_nfdcom 
    11    !!            3.   ! 2013-06  (I. Epicoco, S. Mocavero, CMCC) mpp_init_nfdcom: setup avoiding MPI communication  
     10   !!            3.4  ! 2011-10  (A. C. Coward, NOCS & J. Donners, PRACE)  add init_nfdcom 
     11   !!            3.   ! 2013-06  (I. Epicoco, S. Mocavero, CMCC)  init_nfdcom: setup avoiding MPI communication  
    1212   !!            4.0  !  2016-06  (G. Madec)  use domain configuration file instead of bathymetry file 
    1313   !!            4.0  !  2017-06  (J.M. Molines, T. Lovato) merge of mppini and mppini_2 
     
    1515 
    1616   !!---------------------------------------------------------------------- 
    17    !!  mpp_init          : Lay out the global domain over processors with/without land processor elimination 
    18    !!  mpp_init_mask     : Read global bathymetric information to facilitate land suppression 
    19    !!  mpp_init_ioipsl   : IOIPSL initialization in mpp  
    20    !!  mpp_init_partition: Calculate MPP domain decomposition 
    21    !!  factorise         : Calculate the factors of the no. of MPI processes 
    22    !!  mpp_init_nfdcom   : Setup for north fold exchanges with explicit point-to-point messaging 
     17   !!  mpp_init       : Lay out the global domain over processors with/without land processor elimination 
     18   !!      init_ioipsl: IOIPSL initialization in mpp  
     19   !!      init_nfdcom: Setup for north fold exchanges with explicit point-to-point messaging 
     20   !!      init_doloop: set the starting/ending indices of DO-loop used in do_loop_substitute  
    2321   !!---------------------------------------------------------------------- 
    2422   USE dom_oce        ! ocean space and time domain 
     
    3432   PRIVATE 
    3533 
    36    PUBLIC mpp_init       ! called by opa.F90 
    37  
    38    INTEGER :: numbot = -1  ! 'bottom_level' local logical unit 
    39    INTEGER :: numbdy = -1  ! 'bdy_msk'      local logical unit 
     34   PUBLIC   mpp_init   ! called by opa.F90 
     35 
     36   INTEGER ::   numbot = -1   ! 'bottom_level' local logical unit 
     37   INTEGER ::   numbdy = -1   ! 'bdy_msk'      local logical unit 
    4038    
    4139   !!---------------------------------------------------------------------- 
     
    6664      jpj    = jpjglo 
    6765      jpk    = jpkglo 
    68       jpim1  = jpi-1                                            ! inner domain indices 
    69       jpjm1  = jpj-1                                            !   "           " 
    70       jpkm1  = MAX( 1, jpk-1 )                                  !   "           " 
     66      jpim1  = jpi-1                         ! inner domain indices 
     67      jpjm1  = jpj-1                         !   "           " 
     68      jpkm1  = MAX( 1, jpk-1 )               !   "           " 
     69      ! 
     70      CALL init_doloop                       ! set start/end indices or do-loop depending on the halo width value (nn_hls)  
     71      ! 
    7172      jpij   = jpi*jpj 
    7273      jpni   = 1 
     
    591592      jpi = nlci 
    592593      jpj = nlcj 
    593       jpk = jpkglo                                             ! third dim 
     594      jpk = jpkglo                              ! third dim 
    594595#if defined key_agrif 
    595596      ! simple trick to use same vertical grid as parent but different number of levels:  
     
    598599!!$      IF(.NOT.Agrif_Root())   jpkglo = Agrif_Parent( jpkglo ) 
    599600#endif 
    600       jpim1 = jpi-1                                            ! inner domain indices 
    601       jpjm1 = jpj-1                                            !   "           " 
    602       jpkm1 = MAX( 1, jpk-1 )                                  !   "           " 
    603       jpij  = jpi*jpj                                          !  jpi x j 
     601      ! 
     602      CALL init_doloop                          ! set start/end indices of do-loop, depending on the halo width value (nn_hls)  
     603      ! 
     604      jpim1 = jpi-1                             ! inner domain indices 
     605      jpjm1 = jpj-1                             !   "           " 
     606      jpkm1 = MAX( 1, jpk-1 )                   !   "           " 
     607      jpij  = jpi*jpj                           !  jpi x j 
    604608      DO jproc = 1, jpnij 
    605609         ii = iin(jproc) 
     
    691695      ENDIF 
    692696      ! 
    693       CALL mpp_init_ioipsl       ! Prepare NetCDF output file (if necessary) 
     697      CALL init_ioipsl       ! Prepare NetCDF output file (if necessary) 
    694698      !       
    695699      IF (( jperio >= 3 .AND. jperio <= 6 .AND. jpni > 1 ).AND.( ln_nnogather )) THEN 
    696          CALL mpp_init_nfdcom     ! northfold neighbour lists 
     700         CALL init_nfdcom     ! northfold neighbour lists 
    697701         IF (llwrtlay) THEN 
    698702            WRITE(inum,*) 
     
    11651169 
    11661170 
    1167    SUBROUTINE mpp_init_ioipsl 
    1168       !!---------------------------------------------------------------------- 
    1169       !!                  ***  ROUTINE mpp_init_ioipsl  *** 
     1171   SUBROUTINE init_ioipsl 
     1172      !!---------------------------------------------------------------------- 
     1173      !!                  ***  ROUTINE init_ioipsl  *** 
    11701174      !! 
    11711175      !! ** Purpose :    
     
    12001204      IF(lwp) THEN 
    12011205          WRITE(numout,*) 
    1202           WRITE(numout,*) 'mpp_init_ioipsl :   iloc  = ', iloc (1), iloc (2) 
     1206          WRITE(numout,*) 'mpp init_ioipsl :   iloc  = ', iloc (1), iloc (2) 
    12031207          WRITE(numout,*) '~~~~~~~~~~~~~~~     iabsf = ', iabsf(1), iabsf(2) 
    12041208          WRITE(numout,*) '                    ihals = ', ihals(1), ihals(2) 
     
    12081212      CALL flio_dom_set ( jpnij, nproc, idid, iglo, iloc, iabsf, iabsl, ihals, ihale, 'BOX', nidom) 
    12091213      ! 
    1210    END SUBROUTINE mpp_init_ioipsl   
    1211  
    1212  
    1213    SUBROUTINE mpp_init_nfdcom 
    1214       !!---------------------------------------------------------------------- 
    1215       !!                     ***  ROUTINE  mpp_init_nfdcom  *** 
     1214   END SUBROUTINE init_ioipsl   
     1215 
     1216 
     1217   SUBROUTINE init_nfdcom 
     1218      !!---------------------------------------------------------------------- 
     1219      !!                     ***  ROUTINE  init_nfdcom  *** 
    12161220      !! ** Purpose :   Setup for north fold exchanges with explicit  
    12171221      !!                point-to-point messaging 
     
    12631267      l_north_nogather = .TRUE. 
    12641268      ! 
    1265    END SUBROUTINE mpp_init_nfdcom 
    1266  
     1269   END SUBROUTINE init_nfdcom 
    12671270 
    12681271#endif 
    12691272 
     1273   SUBROUTINE init_doloop 
     1274      !!---------------------------------------------------------------------- 
     1275      !!                  ***  ROUTINE init_doloop  *** 
     1276      !! 
     1277      !! ** Purpose :   set the starting/ending indices of DO-loop 
     1278      !!              These indices are used in do_loop_substitute.h90 
     1279      !!---------------------------------------------------------------------- 
     1280      ! 
     1281      IF(     nn_hls == 1 ) THEN          !* halo size of 1 
     1282         ! 
     1283         nIs_0 =   2     ;   nIs_1 =   1     ;   nIs_1nxt2 = nIs_0   ;   nIs_2 = nIs_1 
     1284         nJs_0 =   2     ;   nJs_1 =   1     ;   nJs_1nxt2 = nJs_0   ;   nJs_2 = nJs_1 
     1285         !                                    
     1286         nIe_0 = jpi-1   ;   nIe_1 = jpi     ;   nIe_1nxt2 = nIe_0   ;   nIe_2 = nIe_1 
     1287         nJe_0 = jpj-1   ;   nJe_1 = jpj     ;   nJe_1nxt2 = nJe_0   ;   nJe_2 = nJe_1 
     1288         ! 
     1289      ELSEIF( nn_hls == 2 ) THEN          !* halo size of 2 
     1290         ! 
     1291         nIs_0 =   3     ;   nIs_1 =   2     ;   nIs_1nxt2 = nIs_1   ;   nIs_2 =   1 
     1292         nJs_0 =   3     ;   nJs_1 =   2     ;   nJs_1nxt2 = nJs_1   ;   nJs_2 =   1 
     1293         !                                                               
     1294         nIe_0 = jpi-2   ;   nIe_1 = jpi-1   ;   nIe_1nxt2 = nIe_1   ;   nIe_2 = jpi 
     1295         nJe_0 = jpj-2   ;   nJe_1 = jpj-1   ;   nJe_1nxt2 = nJe_1   ;   nJe_2 = jpj 
     1296         ! 
     1297      ELSE                                !* unexpected halo size 
     1298         CALL ctl_stop( 'STOP', 'ini_mpp:  wrong value of halo size : nn_hls= 1 or 2 only !') 
     1299      ENDIF 
     1300      ! 
     1301   END SUBROUTINE init_doloop 
     1302    
    12701303   !!====================================================================== 
    12711304END MODULE mppini 
Note: See TracChangeset for help on using the changeset viewer.