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 3764 for branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90 – NEMO

Ignore:
Timestamp:
2013-01-23T15:33:04+01:00 (11 years ago)
Author:
smasson
Message:

dev_MERGE_2012: report bugfixes done in the trunk from r3555 to r3763 into dev_MERGE_2012

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90

    r3680 r3764  
    1717   !!             -   !  2008  (R. Benshila) add mpp_ini_ice 
    1818   !!            3.2  !  2009  (R. Benshila) SHMEM suppression, north fold in lbc_nfd 
    19    !!            3.2  !  2009  (O. Marti)    add mpp_ini_znl  
     19   !!            3.2  !  2009  (O. Marti)    add mpp_ini_znl 
    2020   !!            4.0  !  2011  (G. Madec)  move ctl_ routines from in_out_manager 
    2121   !!            3.5  !  2012  (S.Mocavero, I. Epicoco) Add 'mpp_lnk_bdy_3d', 'mpp_lnk_obc_3d',  
     
    3030   !!   get_unit    : give the index of an unused logical unit 
    3131   !!---------------------------------------------------------------------- 
    32 #if   defined key_mpp_mpi   
     32#if   defined key_mpp_mpi 
    3333   !!---------------------------------------------------------------------- 
    3434   !!   'key_mpp_mpi'             MPI massively parallel processing library 
     
    5555   !!   mpp_lbc_north_e : variant of mpp_lbc_north for extra outer halo 
    5656   !!---------------------------------------------------------------------- 
    57    USE dom_oce        ! ocean space and time domain  
     57   USE dom_oce        ! ocean space and time domain 
    5858   USE lbcnfd         ! north fold treatment 
    5959   USE in_out_manager ! I/O manager 
     
    6161   IMPLICIT NONE 
    6262   PRIVATE 
    63     
     63 
    6464   PUBLIC   ctl_stop, ctl_warn, get_unit, ctl_opn 
    6565   PUBLIC   mynode, mppstop, mppsync, mpp_comm_free 
     
    7070   PUBLIC   mppobc, mpp_ini_ice, mpp_ini_znl 
    7171   PUBLIC   mppsize 
    72    PUBLIC   mppsend, mpprecv                          ! needed by ICB routines 
     72   PUBLIC   mppsend, mpprecv                          ! needed by TAM and ICB routines 
    7373   PUBLIC   lib_mpp_alloc   ! Called in nemogcm.F90 
    7474   PUBLIC   mpp_lnk_bdy_2d, mpp_lnk_bdy_3d 
     
    9090   END INTERFACE 
    9191   INTERFACE mpp_lbc_north 
    92       MODULE PROCEDURE mpp_lbc_north_3d, mpp_lbc_north_2d  
     92      MODULE PROCEDURE mpp_lbc_north_3d, mpp_lbc_north_2d 
    9393   END INTERFACE 
    9494   INTERFACE mpp_minloc 
     
    9898      MODULE PROCEDURE mpp_maxloc2d ,mpp_maxloc3d 
    9999   END INTERFACE 
    100     
     100 
    101101   !! ========================= !! 
    102102   !!  MPI  variable definition !! 
     
    105105   INCLUDE 'mpif.h' 
    106106!$AGRIF_END_DO_NOT_TREAT 
    107     
     107 
    108108   LOGICAL, PUBLIC, PARAMETER ::   lk_mpp = .TRUE.    !: mpp flag 
    109109 
    110110   INTEGER, PARAMETER         ::   nprocmax = 2**10   ! maximun dimension (required to be a power of 2) 
    111     
     111 
    112112   INTEGER ::   mppsize        ! number of process 
    113113   INTEGER ::   mpprank        ! process number  [ 0 - size-1 ] 
     
    132132   INTEGER ::   ndim_rank_znl   ! number of processors on the same zonal average 
    133133   INTEGER, DIMENSION(:), ALLOCATABLE, SAVE ::   nrank_znl  ! dimension ndim_rank_znl, number of the procs into the same znl domain 
    134     
    135    ! North fold condition in mpp_mpi with jpni > 1 
    136    INTEGER ::   ngrp_world        ! group ID for the world processors 
    137    INTEGER ::   ngrp_opa          ! group ID for the opa processors 
    138    INTEGER ::   ngrp_north        ! group ID for the northern processors (to be fold) 
    139    INTEGER ::   ncomm_north       ! communicator made by the processors belonging to ngrp_north 
    140    INTEGER ::   ndim_rank_north   ! number of 'sea' processor in the northern line (can be /= jpni !) 
    141    INTEGER ::   njmppmax          ! value of njmpp for the processors of the northern line 
    142    INTEGER ::   north_root        ! number (in the comm_opa) of proc 0 in the northern comm 
    143    INTEGER, DIMENSION(:), ALLOCATABLE, SAVE ::   nrank_north   ! dimension ndim_rank_north 
     134 
     135   ! North fold condition in mpp_mpi with jpni > 1 (PUBLIC for TAM) 
     136   INTEGER, PUBLIC ::   ngrp_world        ! group ID for the world processors 
     137   INTEGER, PUBLIC ::   ngrp_opa          ! group ID for the opa processors 
     138   INTEGER, PUBLIC ::   ngrp_north        ! group ID for the northern processors (to be fold) 
     139   INTEGER, PUBLIC ::   ncomm_north       ! communicator made by the processors belonging to ngrp_north 
     140   INTEGER, PUBLIC ::   ndim_rank_north   ! number of 'sea' processor in the northern line (can be /= jpni !) 
     141   INTEGER, PUBLIC ::   njmppmax          ! value of njmpp for the processors of the northern line 
     142   INTEGER, PUBLIC ::   north_root        ! number (in the comm_opa) of proc 0 in the northern comm 
     143   INTEGER, DIMENSION(:), ALLOCATABLE, SAVE, PUBLIC ::   nrank_north   ! dimension ndim_rank_north 
    144144 
    145145   ! Type of send : standard, buffered, immediate 
    146    CHARACTER(len=1)        ::   cn_mpi_send = 'S'    ! type od mpi send/recieve (S=standard, B=bsend, I=isend) 
    147    LOGICAL         , PUBLIC ::   l_isend = .FALSE.   ! isend use indicator (T if cn_mpi_send='I') 
    148    INTEGER                  ::   nn_buffer = 0       ! size of the buffer in case of mpi_bsend  
    149        
     146   CHARACTER(len=1), PUBLIC ::   cn_mpi_send = 'S'    ! type od mpi send/recieve (S=standard, B=bsend, I=isend) 
     147   LOGICAL, PUBLIC          ::   l_isend = .FALSE.   ! isend use indicator (T if cn_mpi_send='I') 
     148   INTEGER, PUBLIC          ::   nn_buffer = 0       ! size of the buffer in case of mpi_bsend 
     149 
    150150   REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tampon  ! buffer in case of bsend 
    151151 
     
    177177   ! North fold arrays used to minimise the use of allgather operations. Set in nemo_northcomms (nemogcm) so need to be public 
    178178   INTEGER, PUBLIC,  PARAMETER :: jpmaxngh = 8                 ! Assumed maximum number of active neighbours 
    179    INTEGER, PUBLIC,  PARAMETER :: jptyps   = 5                 ! Number of different neighbour lists to be used for northfold exchanges  
     179   INTEGER, PUBLIC,  PARAMETER :: jptyps   = 5                 ! Number of different neighbour lists to be used for northfold exchanges 
    180180   INTEGER, PUBLIC,  DIMENSION (jpmaxngh,jptyps)    ::   isendto 
    181181   INTEGER, PUBLIC,  DIMENSION (jptyps)             ::   nsndto 
     
    228228      !!---------------------------------------------------------------------- 
    229229      !!                  ***  routine mynode  *** 
    230       !!                     
     230      !! 
    231231      !! ** Purpose :   Find processor unit 
    232232      !!---------------------------------------------------------------------- 
    233       CHARACTER(len=*),DIMENSION(:), INTENT(  out) ::   ldtxt  
    234       INTEGER                      , INTENT(in   ) ::   kumnam       ! namelist logical unit  
    235       INTEGER                      , INTENT(inout) ::   kstop        ! stop indicator  
     233      CHARACTER(len=*),DIMENSION(:), INTENT(  out) ::   ldtxt 
     234      INTEGER                      , INTENT(in   ) ::   kumnam       ! namelist logical unit 
     235      INTEGER                      , INTENT(inout) ::   kstop        ! stop indicator 
    236236      INTEGER, OPTIONAL            , INTENT(in   ) ::   localComm 
    237237      ! 
     
    257257#if defined key_agrif 
    258258      IF( .NOT. Agrif_Root() ) THEN 
    259          jpni  = Agrif_Parent(jpni )  
     259         jpni  = Agrif_Parent(jpni ) 
    260260         jpnj  = Agrif_Parent(jpnj ) 
    261261         jpnij = Agrif_Parent(jpnij) 
     
    281281      CALL mpi_initialized ( mpi_was_called, code ) 
    282282      IF( code /= MPI_SUCCESS ) THEN 
    283          DO ji = 1, SIZE(ldtxt)  
     283         DO ji = 1, SIZE(ldtxt) 
    284284            IF( TRIM(ldtxt(ji)) /= '' )   WRITE(*,*) ldtxt(ji)      ! control print of mynode 
    285          END DO          
     285         END DO 
    286286         WRITE(*, cform_err) 
    287287         WRITE(*, *) 'lib_mpp: Error in routine mpi_initialized' 
     
    296296         CASE ( 'B' )                ! Buffer mpi send (blocking) 
    297297            WRITE(ldtxt(ii),*) '           Buffer blocking mpi send (bsend)'                      ;   ii = ii + 1 
    298             IF( Agrif_Root() )   CALL mpi_init_opa( ldtxt, ii, ierr )  
     298            IF( Agrif_Root() )   CALL mpi_init_opa( ldtxt, ii, ierr ) 
    299299         CASE ( 'I' )                ! Immediate mpi send (non-blocking send) 
    300300            WRITE(ldtxt(ii),*) '           Immediate non-blocking send (isend)'                   ;   ii = ii + 1 
     
    329329      ENDIF 
    330330 
    331       IF( PRESENT(localComm) ) THEN  
     331      IF( PRESENT(localComm) ) THEN 
    332332         IF( Agrif_Root() ) THEN 
    333333            mpi_comm_opa = localComm 
     
    336336         CALL mpi_comm_dup( mpi_comm_world, mpi_comm_opa, code) 
    337337         IF( code /= MPI_SUCCESS ) THEN 
    338             DO ji = 1, SIZE(ldtxt)  
     338            DO ji = 1, SIZE(ldtxt) 
    339339               IF( TRIM(ldtxt(ji)) /= '' )   WRITE(*,*) ldtxt(ji)      ! control print of mynode 
    340340            END DO 
     
    343343            CALL mpi_abort( mpi_comm_world, code, ierr ) 
    344344         ENDIF 
    345       ENDIF  
     345      ENDIF 
    346346 
    347347      CALL mpi_comm_rank( mpi_comm_opa, mpprank, ierr ) 
    348348      CALL mpi_comm_size( mpi_comm_opa, mppsize, ierr ) 
    349349      mynode = mpprank 
    350       !  
     350      ! 
    351351      CALL MPI_OP_CREATE(DDPDD_MPI, .TRUE., MPI_SUMDD, ierr) 
    352352      ! 
     
    721721      !! ** Purpose :   Message passing manadgement 
    722722      !! 
    723       !! ** Method  :   Use mppsend and mpprecv function for passing mask  
     723      !! ** Method  :   Use mppsend and mpprecv function for passing mask 
    724724      !!      between processors following neighboring subdomains. 
    725725      !!            domain parameters 
     
    728728      !!                    nbondi : mark for "east-west local boundary" 
    729729      !!                    nbondj : mark for "north-south local boundary" 
    730       !!                    noea   : number for local neighboring processors  
     730      !!                    noea   : number for local neighboring processors 
    731731      !!                    nowe   : number for local neighboring processors 
    732732      !!                    noso   : number for local neighboring processors 
     
    741741      REAL(wp)                        , INTENT(in   ) ::   psgn     ! =-1 the sign change across the north fold boundary 
    742742      !                                                             ! =  1. , the sign is kept 
    743       CHARACTER(len=3), OPTIONAL      , INTENT(in   ) ::   cd_mpp   ! fill the overlap area only  
     743      CHARACTER(len=3), OPTIONAL      , INTENT(in   ) ::   cd_mpp   ! fill the overlap area only 
    744744      REAL(wp)        , OPTIONAL      , INTENT(in   ) ::   pval     ! background value (used at closed boundaries) 
    745745      !! 
     
    762762         DO jk = 1, jpk 
    763763            DO jj = nlcj+1, jpj                 ! added line(s)   (inner only) 
    764                ptab(nldi  :nlei  , jj          ,jk) = ptab(nldi:nlei,     nlej,jk)    
     764               ptab(nldi  :nlei  , jj          ,jk) = ptab(nldi:nlei,     nlej,jk) 
    765765               ptab(1     :nldi-1, jj          ,jk) = ptab(nldi     ,     nlej,jk) 
    766766               ptab(nlei+1:nlci  , jj          ,jk) = ptab(     nlei,     nlej,jk) 
     
    773773         END DO 
    774774         ! 
    775       ELSE                              ! standard close or cyclic treatment  
     775      ELSE                              ! standard close or cyclic treatment 
    776776         ! 
    777777         !                                   ! East-West boundaries 
     
    792792      ! 2. East and west directions exchange 
    793793      ! ------------------------------------ 
    794       ! we play with the neigbours AND the row number because of the periodicity  
     794      ! we play with the neigbours AND the row number because of the periodicity 
    795795      ! 
    796796      SELECT CASE ( nbondi )      ! Read Dirichlet lateral conditions 
     
    801801            t3we(:,jl,:,1) = ptab(iihom +jl,:,:) 
    802802         END DO 
    803       END SELECT   
     803      END SELECT 
    804804      ! 
    805805      !                           ! Migrations 
    806806      imigr = jpreci * jpj * jpk 
    807807      ! 
    808       SELECT CASE ( nbondi )  
     808      SELECT CASE ( nbondi ) 
    809809      CASE ( -1 ) 
    810810         CALL mppsend( 2, t3we(1,1,1,1), imigr, noea, ml_req1 ) 
     
    832832            ptab(iihom+jl,:,:) = t3ew(:,jl,:,2) 
    833833         END DO 
    834       CASE ( 0 )  
     834      CASE ( 0 ) 
    835835         DO jl = 1, jpreci 
    836836            ptab(jl      ,:,:) = t3we(:,jl,:,2) 
     
    859859      imigr = jprecj * jpi * jpk 
    860860      ! 
    861       SELECT CASE ( nbondj )      
     861      SELECT CASE ( nbondj ) 
    862862      CASE ( -1 ) 
    863863         CALL mppsend( 4, t3sn(1,1,1,1), imigr, nono, ml_req1 ) 
     
    871871         IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 
    872872         IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err) 
    873       CASE ( 1 )  
     873      CASE ( 1 ) 
    874874         CALL mppsend( 3, t3ns(1,1,1,1), imigr, noso, ml_req1 ) 
    875875         CALL mpprecv( 4, t3sn(1,1,1,2), imigr, noso ) 
     
    885885            ptab(:,ijhom+jl,:) = t3ns(:,jl,:,2) 
    886886         END DO 
    887       CASE ( 0 )  
     887      CASE ( 0 ) 
    888888         DO jl = 1, jprecj 
    889889            ptab(:,jl      ,:) = t3sn(:,jl,:,2) 
     
    915915      !!---------------------------------------------------------------------- 
    916916      !!                  ***  routine mpp_lnk_2d  *** 
    917       !!                   
     917      !! 
    918918      !! ** Purpose :   Message passing manadgement for 2d array 
    919919      !! 
    920       !! ** Method  :   Use mppsend and mpprecv function for passing mask  
     920      !! ** Method  :   Use mppsend and mpprecv function for passing mask 
    921921      !!      between processors following neighboring subdomains. 
    922922      !!            domain parameters 
     
    925925      !!                    nbondi : mark for "east-west local boundary" 
    926926      !!                    nbondj : mark for "north-south local boundary" 
    927       !!                    noea   : number for local neighboring processors  
     927      !!                    noea   : number for local neighboring processors 
    928928      !!                    nowe   : number for local neighboring processors 
    929929      !!                    noso   : number for local neighboring processors 
     
    936936      REAL(wp)                    , INTENT(in   ) ::   psgn     ! =-1 the sign change across the north fold boundary 
    937937      !                                                         ! =  1. , the sign is kept 
    938       CHARACTER(len=3), OPTIONAL  , INTENT(in   ) ::   cd_mpp   ! fill the overlap area only  
     938      CHARACTER(len=3), OPTIONAL  , INTENT(in   ) ::   cd_mpp   ! fill the overlap area only 
    939939      REAL(wp)        , OPTIONAL  , INTENT(in   ) ::   pval     ! background value (used at closed boundaries) 
    940940      !! 
     
    957957         ! WARNING pt2d is defined only between nld and nle 
    958958         DO jj = nlcj+1, jpj                 ! added line(s)   (inner only) 
    959             pt2d(nldi  :nlei  , jj          ) = pt2d(nldi:nlei,     nlej)    
     959            pt2d(nldi  :nlei  , jj          ) = pt2d(nldi:nlei,     nlej) 
    960960            pt2d(1     :nldi-1, jj          ) = pt2d(nldi     ,     nlej) 
    961961            pt2d(nlei+1:nlci  , jj          ) = pt2d(     nlei,     nlej) 
     
    967967         END DO 
    968968         ! 
    969       ELSE                              ! standard close or cyclic treatment  
     969      ELSE                              ! standard close or cyclic treatment 
    970970         ! 
    971971         !                                   ! East-West boundaries 
     
    986986      ! 2. East and west directions exchange 
    987987      ! ------------------------------------ 
    988       ! we play with the neigbours AND the row number because of the periodicity  
     988      ! we play with the neigbours AND the row number because of the periodicity 
    989989      ! 
    990990      SELECT CASE ( nbondi )      ! Read Dirichlet lateral conditions 
     
    10841084            pt2d(:,ijhom+jl) = t2ns(:,jl,2) 
    10851085         END DO 
    1086       CASE ( 1 )  
     1086      CASE ( 1 ) 
    10871087         DO jl = 1, jprecj 
    10881088            pt2d(:,jl      ) = t2sn(:,jl,2) 
     
    11121112      !! ** Purpose :   Message passing manadgement for two 3D arrays 
    11131113      !! 
    1114       !! ** Method  :   Use mppsend and mpprecv function for passing mask  
     1114      !! ** Method  :   Use mppsend and mpprecv function for passing mask 
    11151115      !!      between processors following neighboring subdomains. 
    11161116      !!            domain parameters 
     
    11191119      !!                    nbondi : mark for "east-west local boundary" 
    11201120      !!                    nbondj : mark for "north-south local boundary" 
    1121       !!                    noea   : number for local neighboring processors  
     1121      !!                    noea   : number for local neighboring processors 
    11221122      !!                    nowe   : number for local neighboring processors 
    11231123      !!                    noso   : number for local neighboring processors 
     
    11271127      !! 
    11281128      !!---------------------------------------------------------------------- 
    1129       REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) ::   ptab1     ! first and second 3D array on which  
     1129      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) ::   ptab1     ! first and second 3D array on which 
    11301130      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) ::   ptab2     ! the boundary condition is applied 
    1131       CHARACTER(len=1)                , INTENT(in   ) ::   cd_type1  ! nature of ptab1 and ptab2 arrays  
     1131      CHARACTER(len=1)                , INTENT(in   ) ::   cd_type1  ! nature of ptab1 and ptab2 arrays 
    11321132      CHARACTER(len=1)                , INTENT(in   ) ::   cd_type2  ! i.e. grid-points = T , U , V , F or W points 
    11331133      REAL(wp)                        , INTENT(in   ) ::   psgn      ! =-1 the sign change across the north fold boundary 
     
    11551155      ENDIF 
    11561156 
    1157        
     1157 
    11581158      !                                      ! North-South boundaries 
    11591159      IF( .NOT. cd_type1 == 'F' )   ptab1(:,     1       :jprecj,:) = 0.e0    ! south except at F-point 
     
    11651165      ! 2. East and west directions exchange 
    11661166      ! ------------------------------------ 
    1167       ! we play with the neigbours AND the row number because of the periodicity  
     1167      ! we play with the neigbours AND the row number because of the periodicity 
    11681168      ! 
    11691169      SELECT CASE ( nbondi )      ! Read Dirichlet lateral conditions 
     
    11811181      imigr = jpreci * jpj * jpk *2 
    11821182      ! 
    1183       SELECT CASE ( nbondi )  
     1183      SELECT CASE ( nbondi ) 
    11841184      CASE ( -1 ) 
    11851185         CALL mppsend( 2, t4we(1,1,1,1,1), imigr, noea, ml_req1 ) 
     
    12081208            ptab2(iihom+jl,:,:) = t4ew(:,jl,:,2,2) 
    12091209         END DO 
    1210       CASE ( 0 )  
     1210      CASE ( 0 ) 
    12111211         DO jl = 1, jpreci 
    12121212            ptab1(jl      ,:,:) = t4we(:,jl,:,1,2) 
     
    12401240      imigr = jprecj * jpi * jpk * 2 
    12411241      ! 
    1242       SELECT CASE ( nbondj )      
     1242      SELECT CASE ( nbondj ) 
    12431243      CASE ( -1 ) 
    12441244         CALL mppsend( 4, t4sn(1,1,1,1,1), imigr, nono, ml_req1 ) 
     
    12521252         IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 
    12531253         IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err) 
    1254       CASE ( 1 )  
     1254      CASE ( 1 ) 
    12551255         CALL mppsend( 3, t4ns(1,1,1,1,1), imigr, noso, ml_req1 ) 
    12561256         CALL mpprecv( 4, t4sn(1,1,1,1,2), imigr, noso ) 
     
    12671267            ptab2(:,ijhom+jl,:) = t4ns(:,jl,:,2,2) 
    12681268         END DO 
    1269       CASE ( 0 )  
     1269      CASE ( 0 ) 
    12701270         DO jl = 1, jprecj 
    12711271            ptab1(:,jl      ,:) = t4sn(:,jl,:,1,2) 
     
    12871287         ! 
    12881288         SELECT CASE ( jpni ) 
    1289          CASE ( 1 )                                            
     1289         CASE ( 1 ) 
    12901290            CALL lbc_nfd      ( ptab1, cd_type1, psgn )   ! only for northern procs. 
    12911291            CALL lbc_nfd      ( ptab2, cd_type2, psgn ) 
     
    12931293            CALL mpp_lbc_north( ptab1, cd_type1, psgn )   ! for all northern procs. 
    12941294            CALL mpp_lbc_north (ptab2, cd_type2, psgn) 
    1295          END SELECT  
     1295         END SELECT 
    12961296         ! 
    12971297      ENDIF 
     
    13031303      !!---------------------------------------------------------------------- 
    13041304      !!                  ***  routine mpp_lnk_2d_e  *** 
    1305       !!                   
     1305      !! 
    13061306      !! ** Purpose :   Message passing manadgement for 2d array (with halo) 
    13071307      !! 
    1308       !! ** Method  :   Use mppsend and mpprecv function for passing mask  
     1308      !! ** Method  :   Use mppsend and mpprecv function for passing mask 
    13091309      !!      between processors following neighboring subdomains. 
    13101310      !!            domain parameters 
     
    13151315      !!                    nbondi : mark for "east-west local boundary" 
    13161316      !!                    nbondj : mark for "north-south local boundary" 
    1317       !!                    noea   : number for local neighboring processors  
     1317      !!                    noea   : number for local neighboring processors 
    13181318      !!                    nowe   : number for local neighboring processors 
    13191319      !!                    noso   : number for local neighboring processors 
     
    13511351      IF( .NOT. cd_type == 'F' )   pt2d(:,  1-jprj   :  jprecj  ) = 0.e0    ! south except at F-point 
    13521352                                   pt2d(:,nlcj-jprecj+1:jpj+jprj) = 0.e0    ! north 
    1353                                  
     1353 
    13541354      !                                      ! East-West boundaries 
    13551355      !                                           !* Cyclic east-west 
     
    13711371         CASE ( 1 )     ;   CALL lbc_nfd        ( pt2d(1:jpi,1:jpj+jprj), cd_type, psgn, pr2dj=jprj ) 
    13721372         CASE DEFAULT   ;   CALL mpp_lbc_north_e( pt2d                    , cd_type, psgn               ) 
    1373          END SELECT  
     1373         END SELECT 
    13741374         ! 
    13751375      ENDIF 
     
    13771377      ! 2. East and west directions exchange 
    13781378      ! ------------------------------------ 
    1379       ! we play with the neigbours AND the row number because of the periodicity  
     1379      ! we play with the neigbours AND the row number because of the periodicity 
    13801380      ! 
    13811381      SELECT CASE ( nbondi )      ! Read Dirichlet lateral conditions 
     
    14631463      ! 
    14641464      !                           ! Write Dirichlet lateral conditions 
    1465       ijhom = nlcj - jprecj   
     1465      ijhom = nlcj - jprecj 
    14661466      ! 
    14671467      SELECT CASE ( nbondj ) 
     
    14751475            pt2d(:,ijhom+jl ) = r2dns(:,jl,2) 
    14761476         END DO 
    1477       CASE ( 1 )  
     1477      CASE ( 1 ) 
    14781478         DO jl = 1, iprecj 
    14791479            pt2d(:,jl-jprj) = r2dsn(:,jl,2) 
     
    14871487      !!---------------------------------------------------------------------- 
    14881488      !!                  ***  routine mppsend  *** 
    1489       !!                    
     1489      !! 
    14901490      !! ** Purpose :   Send messag passing array 
    14911491      !! 
     
    15231523      INTEGER , INTENT(in   ) ::   kbytes     ! suze of the array pmess 
    15241524      INTEGER , INTENT(in   ) ::   ktyp       ! Tag of the recevied message 
    1525       INTEGER, OPTIONAL, INTENT(in) :: ksource    ! source process number  
     1525      INTEGER, OPTIONAL, INTENT(in) :: ksource    ! source process number 
    15261526      !! 
    15271527      INTEGER :: istatus(mpi_status_size) 
     
    15311531      ! 
    15321532 
    1533       ! If a specific process number has been passed to the receive call,  
     1533      ! If a specific process number has been passed to the receive call, 
    15341534      ! use that one. Default is to use mpi_any_source 
    15351535      use_source=mpi_any_source 
     
    15461546      !!---------------------------------------------------------------------- 
    15471547      !!                   ***  routine mppgather  *** 
    1548       !!                    
    1549       !! ** Purpose :   Transfert between a local subdomain array and a work  
     1548      !! 
     1549      !! ** Purpose :   Transfert between a local subdomain array and a work 
    15501550      !!     array which is distributed following the vertical level. 
    15511551      !! 
     
    15601560      itaille = jpi * jpj 
    15611561      CALL mpi_gather( ptab, itaille, mpi_double_precision, pio, itaille     ,   & 
    1562          &                            mpi_double_precision, kp , mpi_comm_opa, ierror )  
     1562         &                            mpi_double_precision, kp , mpi_comm_opa, ierror ) 
    15631563      ! 
    15641564   END SUBROUTINE mppgather 
     
    15691569      !!                  ***  routine mppscatter  *** 
    15701570      !! 
    1571       !! ** Purpose :   Transfert between awork array which is distributed  
     1571      !! ** Purpose :   Transfert between awork array which is distributed 
    15721572      !!      following the vertical level and the local subdomain array. 
    15731573      !! 
     
    15911591      !!---------------------------------------------------------------------- 
    15921592      !!                  ***  routine mppmax_a_int  *** 
    1593       !!  
     1593      !! 
    15941594      !! ** Purpose :   Find maximum value in an integer layout array 
    15951595      !! 
     
    15971597      INTEGER , INTENT(in   )                  ::   kdim   ! size of array 
    15981598      INTEGER , INTENT(inout), DIMENSION(kdim) ::   ktab   ! input array 
    1599       INTEGER , INTENT(in   ), OPTIONAL        ::   kcom   !  
     1599      INTEGER , INTENT(in   ), OPTIONAL        ::   kcom   ! 
    16001600      !! 
    16011601      INTEGER :: ierror, localcomm   ! temporary integer 
     
    16221622      INTEGER, INTENT(inout)           ::   ktab      ! ??? 
    16231623      INTEGER, INTENT(in   ), OPTIONAL ::   kcom      ! ??? 
    1624       !!  
     1624      !! 
    16251625      INTEGER ::   ierror, iwork, localcomm   ! temporary integer 
    16261626      !!---------------------------------------------------------------------- 
    16271627      ! 
    1628       localcomm = mpi_comm_opa  
     1628      localcomm = mpi_comm_opa 
    16291629      IF( PRESENT(kcom) )   localcomm = kcom 
    16301630      ! 
     
    16391639      !!---------------------------------------------------------------------- 
    16401640      !!                  ***  routine mppmin_a_int  *** 
    1641       !!  
     1641      !! 
    16421642      !! ** Purpose :   Find minimum value in an integer layout array 
    16431643      !! 
     
    16871687      !!---------------------------------------------------------------------- 
    16881688      !!                  ***  routine mppsum_a_int  *** 
    1689       !!                     
     1689      !! 
    16901690      !! ** Purpose :   Global integer sum, 1D array case 
    16911691      !! 
     
    17081708      !!---------------------------------------------------------------------- 
    17091709      !!                 ***  routine mppsum_int  *** 
    1710       !!                   
     1710      !! 
    17111711      !! ** Purpose :   Global integer sum 
    17121712      !! 
    17131713      !!---------------------------------------------------------------------- 
    17141714      INTEGER, INTENT(inout) ::   ktab 
    1715       !!  
     1715      !! 
    17161716      INTEGER :: ierror, iwork 
    17171717      !!---------------------------------------------------------------------- 
     
    17271727      !!---------------------------------------------------------------------- 
    17281728      !!                 ***  routine mppmax_a_real  *** 
    1729       !!                   
     1729      !! 
    17301730      !! ** Purpose :   Maximum 
    17311731      !! 
     
    17511751      !!---------------------------------------------------------------------- 
    17521752      !!                  ***  routine mppmax_real  *** 
    1753       !!                     
     1753      !! 
    17541754      !! ** Purpose :   Maximum 
    17551755      !! 
     
    17621762      !!---------------------------------------------------------------------- 
    17631763      ! 
    1764       localcomm = mpi_comm_opa  
     1764      localcomm = mpi_comm_opa 
    17651765      IF( PRESENT(kcom) )   localcomm = kcom 
    17661766      ! 
     
    17741774      !!---------------------------------------------------------------------- 
    17751775      !!                 ***  routine mppmin_a_real  *** 
    1776       !!                   
     1776      !! 
    17771777      !! ** Purpose :   Minimum of REAL, array case 
    17781778      !! 
     
    17861786      !!----------------------------------------------------------------------- 
    17871787      ! 
    1788       localcomm = mpi_comm_opa  
     1788      localcomm = mpi_comm_opa 
    17891789      IF( PRESENT(kcom) ) localcomm = kcom 
    17901790      ! 
     
    17981798      !!---------------------------------------------------------------------- 
    17991799      !!                  ***  routine mppmin_real  *** 
    1800       !!  
     1800      !! 
    18011801      !! ** Purpose :   minimum of REAL, scalar case 
    18021802      !! 
    18031803      !!----------------------------------------------------------------------- 
    1804       REAL(wp), INTENT(inout)           ::   ptab        !  
     1804      REAL(wp), INTENT(inout)           ::   ptab        ! 
    18051805      INTEGER , INTENT(in   ), OPTIONAL :: kcom 
    18061806      !! 
     
    18101810      !!----------------------------------------------------------------------- 
    18111811      ! 
    1812       localcomm = mpi_comm_opa  
     1812      localcomm = mpi_comm_opa 
    18131813      IF( PRESENT(kcom) )   localcomm = kcom 
    18141814      ! 
     
    18221822      !!---------------------------------------------------------------------- 
    18231823      !!                  ***  routine mppsum_a_real  *** 
    1824       !!  
     1824      !! 
    18251825      !! ** Purpose :   global sum, REAL ARRAY argument case 
    18261826      !! 
     
    18311831      !! 
    18321832      INTEGER                   ::   ierror    ! temporary integer 
    1833       INTEGER                   ::   localcomm  
    1834       REAL(wp), DIMENSION(kdim) ::   zwork     ! temporary workspace  
     1833      INTEGER                   ::   localcomm 
     1834      REAL(wp), DIMENSION(kdim) ::   zwork     ! temporary workspace 
    18351835      !!----------------------------------------------------------------------- 
    18361836      ! 
    1837       localcomm = mpi_comm_opa  
     1837      localcomm = mpi_comm_opa 
    18381838      IF( PRESENT(kcom) )   localcomm = kcom 
    18391839      ! 
     
    18471847      !!---------------------------------------------------------------------- 
    18481848      !!                  ***  routine mppsum_real  *** 
    1849       !!               
     1849      !! 
    18501850      !! ** Purpose :   global sum, SCALAR argument case 
    18511851      !! 
     
    18541854      INTEGER , INTENT(in   ), OPTIONAL ::   kcom 
    18551855      !! 
    1856       INTEGER  ::   ierror, localcomm  
     1856      INTEGER  ::   ierror, localcomm 
    18571857      REAL(wp) ::   zwork 
    18581858      !!----------------------------------------------------------------------- 
    18591859      ! 
    1860       localcomm = mpi_comm_opa  
     1860      localcomm = mpi_comm_opa 
    18611861      IF( PRESENT(kcom) ) localcomm = kcom 
    18621862      ! 
     
    18911891 
    18921892   END SUBROUTINE mppsum_realdd 
    1893    
    1894    
     1893 
     1894 
    18951895   SUBROUTINE mppsum_a_realdd( ytab, kdim, kcom ) 
    18961896      !!---------------------------------------------------------------------- 
     
    19181918 
    19191919   END SUBROUTINE mppsum_a_realdd 
    1920     
     1920 
    19211921   SUBROUTINE mpp_minloc2d( ptab, pmask, pmin, ki,kj ) 
    19221922      !!------------------------------------------------------------------------ 
     
    20132013      REAL(wp)                     , INTENT(  out) ::   pmax     ! Global maximum of ptab 
    20142014      INTEGER                      , INTENT(  out) ::   ki, kj   ! index of maximum in global frame 
    2015       !!   
     2015      !! 
    20162016      INTEGER  :: ierror 
    20172017      INTEGER, DIMENSION (2)   ::   ilocs 
     
    20522052      REAL(wp)                         , INTENT(  out) ::   pmax         ! Global maximum of ptab 
    20532053      INTEGER                          , INTENT(  out) ::   ki, kj, kk   ! index of maximum in global frame 
    2054       !!    
     2054      !! 
    20552055      REAL(wp) :: zmax   ! local maximum 
    20562056      REAL(wp), DIMENSION(2,1) ::   zain, zaout 
     
    20822082      !!---------------------------------------------------------------------- 
    20832083      !!                  ***  routine mppsync  *** 
    2084       !!                    
     2084      !! 
    20852085      !! ** Purpose :   Massively parallel processors, synchroneous 
    20862086      !! 
     
    20972097      !!---------------------------------------------------------------------- 
    20982098      !!                  ***  routine mppstop  *** 
    2099       !!                    
     2099      !! 
    21002100      !! ** purpose :   Stop massively parallel processors method 
    21012101      !! 
     
    21132113      !!---------------------------------------------------------------------- 
    21142114      !!                  ***  routine mppobc  *** 
    2115       !!  
     2115      !! 
    21162116      !! ** Purpose :   Message passing manadgement for open boundary 
    21172117      !!     conditions array 
     
    21242124      !!                    nbondi : mark for "east-west local boundary" 
    21252125      !!                    nbondj : mark for "north-south local boundary" 
    2126       !!                    noea   : number for local neighboring processors  
     2126      !!                    noea   : number for local neighboring processors 
    21272127      !!                    nowe   : number for local neighboring processors 
    21282128      !!                    noso   : number for local neighboring processors 
     
    23072307      ! 
    23082308   END SUBROUTINE mppobc 
    2309     
     2309 
    23102310 
    23112311   SUBROUTINE mpp_comm_free( kcom ) 
     
    23662366      kice = 0 
    23672367      DO jjproc = 1, jpnij 
    2368          IF( jjproc == narea .AND. pindic .GT. 0 )   kice(jjproc) = 1     
     2368         IF( jjproc == narea .AND. pindic .GT. 0 )   kice(jjproc) = 1 
    23692369      END DO 
    23702370      ! 
    23712371      zwork = 0 
    23722372      CALL MPI_ALLREDUCE( kice, zwork, jpnij, mpi_integer, mpi_sum, mpi_comm_opa, ierr ) 
    2373       ndim_rank_ice = SUM( zwork )           
     2373      ndim_rank_ice = SUM( zwork ) 
    23742374 
    23752375      ! Allocate the right size to nrank_north 
     
    23772377      ALLOCATE( nrank_ice(ndim_rank_ice) ) 
    23782378      ! 
    2379       ii = 0      
     2379      ii = 0 
    23802380      nrank_ice = 0 
    23812381      DO jjproc = 1, jpnij 
    23822382         IF( zwork(jjproc) == 1) THEN 
    23832383            ii = ii + 1 
    2384             nrank_ice(ii) = jjproc -1  
     2384            nrank_ice(ii) = jjproc -1 
    23852385         ENDIF 
    23862386      END DO 
     
    24642464         IF (ALLOCATED (nrank_znl)) DEALLOCATE(nrank_znl) 
    24652465         ALLOCATE(nrank_znl(ndim_rank_znl)) 
    2466          ii = 0      
     2466         ii = 0 
    24672467         nrank_znl (:) = 0 
    24682468         DO jproc=1,jpnij 
    24692469            IF ( kwork(jproc) == njmpp) THEN 
    24702470               ii = ii + 1 
    2471                nrank_znl(ii) = jproc -1  
     2471               nrank_znl(ii) = jproc -1 
    24722472            ENDIF 
    24732473         END DO 
     
    24932493 
    24942494      ! Determines if processor if the first (starting from i=1) on the row 
    2495       IF ( jpni == 1 ) THEN  
     2495      IF ( jpni == 1 ) THEN 
    24962496         l_znl_root = .TRUE. 
    24972497      ELSE 
     
    25112511      !!               ***  routine mpp_ini_north  *** 
    25122512      !! 
    2513       !! ** Purpose :   Initialize special communicator for north folding  
     2513      !! ** Purpose :   Initialize special communicator for north folding 
    25142514      !!      condition together with global variables needed in the mpp folding 
    25152515      !! 
     
    25722572      !!                   ***  routine mpp_lbc_north_3d  *** 
    25732573      !! 
    2574       !! ** Purpose :   Ensure proper north fold horizontal bondary condition  
     2574      !! ** Purpose :   Ensure proper north fold horizontal bondary condition 
    25752575      !!              in mpp configuration in case of jpn1 > 1 
    25762576      !! 
    25772577      !! ** Method  :   North fold condition and mpp with more than one proc 
    2578       !!              in i-direction require a specific treatment. We gather  
     2578      !!              in i-direction require a specific treatment. We gather 
    25792579      !!              the 4 northern lines of the global domain on 1 processor 
    25802580      !!              and apply lbc north-fold on this sub array. Then we 
     
    25852585      CHARACTER(len=1)                , INTENT(in   ) ::   cd_type   ! nature of pt3d grid-points 
    25862586      !                                                              !   = T ,  U , V , F or W  gridpoints 
    2587       REAL(wp)                        , INTENT(in   ) ::   psgn      ! = -1. the sign change across the north fold  
     2587      REAL(wp)                        , INTENT(in   ) ::   psgn      ! = -1. the sign change across the north fold 
    25882588      !!                                                             ! =  1. , the sign is kept 
    25892589      INTEGER ::   ji, jj, jr 
     
    25942594      INTEGER, DIMENSION(MPI_STATUS_SIZE)    ::   ml_stat            ! for mpi_isend when avoiding mpi_allgather 
    25952595      !!---------------------------------------------------------------------- 
    2596       !    
     2596      ! 
    25972597      ijpj   = 4 
    25982598      ityp = -1 
     
    26092609      IF ( l_north_nogather ) THEN 
    26102610         ! 
    2611          ! Avoid the use of mpi_allgather by exchanging only with the processes already identified  
     2611         ! Avoid the use of mpi_allgather by exchanging only with the processes already identified 
    26122612         ! (in nemo_northcomms) as being  involved in this process' northern boundary exchange 
    26132613         ! 
     
    26342634               ityp = 5 
    26352635            CASE DEFAULT 
    2636                ityp = -1                    ! Set a default value for unsupported types which  
     2636               ityp = -1                    ! Set a default value for unsupported types which 
    26372637                                            ! will cause a fallback to the mpi_allgather method 
    26382638         END SELECT 
     
    26832683      ! The ztab array has been either: 
    26842684      !  a. Fully populated by the mpi_allgather operation or 
    2685       !  b. Had the active points for this domain and northern neighbours populated  
     2685      !  b. Had the active points for this domain and northern neighbours populated 
    26862686      !     by peer to peer exchanges 
    2687       ! Either way the array may be folded by lbc_nfd and the result for the span of  
     2687      ! Either way the array may be folded by lbc_nfd and the result for the span of 
    26882688      ! this domain will be identical. 
    26892689      ! 
     
    27042704      !!                   ***  routine mpp_lbc_north_2d  *** 
    27052705      !! 
    2706       !! ** Purpose :   Ensure proper north fold horizontal bondary condition  
     2706      !! ** Purpose :   Ensure proper north fold horizontal bondary condition 
    27072707      !!              in mpp configuration in case of jpn1 > 1 (for 2d array ) 
    27082708      !! 
    27092709      !! ** Method  :   North fold condition and mpp with more than one proc 
    2710       !!              in i-direction require a specific treatment. We gather  
     2710      !!              in i-direction require a specific treatment. We gather 
    27112711      !!              the 4 northern lines of the global domain on 1 processor 
    27122712      !!              and apply lbc north-fold on this sub array. Then we 
     
    27172717      CHARACTER(len=1)            , INTENT(in   ) ::   cd_type   ! nature of pt3d grid-points 
    27182718      !                                                          !   = T ,  U , V , F or W  gridpoints 
    2719       REAL(wp)                    , INTENT(in   ) ::   psgn      ! = -1. the sign change across the north fold  
     2719      REAL(wp)                    , INTENT(in   ) ::   psgn      ! = -1. the sign change across the north fold 
    27202720      !!                                                             ! =  1. , the sign is kept 
    27212721      INTEGER ::   ji, jj, jr 
     
    27412741      IF ( l_north_nogather ) THEN 
    27422742         ! 
    2743          ! Avoid the use of mpi_allgather by exchanging only with the processes already identified  
     2743         ! Avoid the use of mpi_allgather by exchanging only with the processes already identified 
    27442744         ! (in nemo_northcomms) as being  involved in this process' northern boundary exchange 
    27452745         ! 
     
    27662766               ityp = 5 
    27672767            CASE DEFAULT 
    2768                ityp = -1                    ! Set a default value for unsupported types which  
     2768               ityp = -1                    ! Set a default value for unsupported types which 
    27692769                                            ! will cause a fallback to the mpi_allgather method 
    27702770         END SELECT 
     
    28162816      ! The ztab array has been either: 
    28172817      !  a. Fully populated by the mpi_allgather operation or 
    2818       !  b. Had the active points for this domain and northern neighbours populated  
     2818      !  b. Had the active points for this domain and northern neighbours populated 
    28192819      !     by peer to peer exchanges 
    2820       ! Either way the array may be folded by lbc_nfd and the result for the span of  
     2820      ! Either way the array may be folded by lbc_nfd and the result for the span of 
    28212821      ! this domain will be identical. 
    28222822      ! 
     
    28382838      !!                   ***  routine mpp_lbc_north_2d  *** 
    28392839      !! 
    2840       !! ** Purpose :   Ensure proper north fold horizontal bondary condition  
    2841       !!              in mpp configuration in case of jpn1 > 1 and for 2d  
     2840      !! ** Purpose :   Ensure proper north fold horizontal bondary condition 
     2841      !!              in mpp configuration in case of jpn1 > 1 and for 2d 
    28422842      !!              array with outer extra halo 
    28432843      !! 
    28442844      !! ** Method  :   North fold condition and mpp with more than one proc 
    2845       !!              in i-direction require a specific treatment. We gather  
    2846       !!              the 4+2*jpr2dj northern lines of the global domain on 1  
    2847       !!              processor and apply lbc north-fold on this sub array.  
     2845      !!              in i-direction require a specific treatment. We gather 
     2846      !!              the 4+2*jpr2dj northern lines of the global domain on 1 
     2847      !!              processor and apply lbc north-fold on this sub array. 
    28482848      !!              Then we scatter the north fold array back to the processors. 
    28492849      !! 
     
    28522852      CHARACTER(len=1)                                            , INTENT(in   ) ::   cd_type  ! nature of pt3d grid-points 
    28532853      !                                                                                         !   = T ,  U , V , F or W -points 
    2854       REAL(wp)                                                    , INTENT(in   ) ::   psgn     ! = -1. the sign change across the   
     2854      REAL(wp)                                                    , INTENT(in   ) ::   psgn     ! = -1. the sign change across the 
    28552855      !!                                                                                        ! north fold, =  1. otherwise 
    28562856      INTEGER ::   ji, jj, jr 
     
    28952895      !! Scatter back to pt2d 
    28962896      DO jj = nlcj - ijpj + 1 , nlcj +jpr2dj 
    2897       ij  = ij +1  
     2897      ij  = ij +1 
    28982898         DO ji= 1, nlci 
    28992899            pt2d(ji,jj) = ztab_e(ji+nimpp-1,ij) 
     
    33393339      !! ** Method  :: define buffer size in namelist, if 0 no buffer attachment 
    33403340      !!            but classical mpi_init 
    3341       !!  
    3342       !! History :: 01/11 :: IDRIS initial version for IBM only   
     3341      !! 
     3342      !! History :: 01/11 :: IDRIS initial version for IBM only 
    33433343      !!            08/04 :: R. Benshila, generalisation 
    33443344      !!--------------------------------------------------------------------- 
    3345       CHARACTER(len=*),DIMENSION(:), INTENT(  out) ::   ldtxt  
     3345      CHARACTER(len=*),DIMENSION(:), INTENT(  out) ::   ldtxt 
    33463346      INTEGER                      , INTENT(inout) ::   ksft 
    33473347      INTEGER                      , INTENT(  out) ::   code 
     
    33523352      CALL mpi_initialized( mpi_was_called, code )      ! MPI initialization 
    33533353      IF ( code /= MPI_SUCCESS ) THEN 
    3354          DO ji = 1, SIZE(ldtxt)  
     3354         DO ji = 1, SIZE(ldtxt) 
    33553355            IF( TRIM(ldtxt(ji)) /= '' )   WRITE(*,*) ldtxt(ji)      ! control print of mynode 
    3356          END DO          
     3356         END DO 
    33573357         WRITE(*, cform_err) 
    33583358         WRITE(*, *) ' lib_mpp: Error in routine mpi_initialized' 
     
    33643364         CALL mpi_comm_dup( mpi_comm_world, mpi_comm_opa, code ) 
    33653365         IF ( code /= MPI_SUCCESS ) THEN 
    3366             DO ji = 1, SIZE(ldtxt)  
     3366            DO ji = 1, SIZE(ldtxt) 
    33673367               IF( TRIM(ldtxt(ji)) /= '' )   WRITE(*,*) ldtxt(ji)      ! control print of mynode 
    33683368            END DO 
     
    33773377         ! Buffer allocation and attachment 
    33783378         ALLOCATE( tampon(nn_buffer), stat = ierr ) 
    3379          IF( ierr /= 0 ) THEN  
    3380             DO ji = 1, SIZE(ldtxt)  
     3379         IF( ierr /= 0 ) THEN 
     3380            DO ji = 1, SIZE(ldtxt) 
    33813381               IF( TRIM(ldtxt(ji)) /= '' )   WRITE(*,*) ldtxt(ji)      ! control print of mynode 
    33823382            END DO 
     
    34573457   FUNCTION mynode( ldtxt, kumnam, kstop, localComm ) RESULT (function_value) 
    34583458      INTEGER, OPTIONAL            , INTENT(in   ) ::   localComm 
    3459       CHARACTER(len=*),DIMENSION(:) ::   ldtxt  
     3459      CHARACTER(len=*),DIMENSION(:) ::   ldtxt 
    34603460      INTEGER ::   kumnam, kstop 
    34613461      IF( PRESENT( localComm ) .OR. .NOT.PRESENT( localComm ) )   function_value = 0 
     
    34693469      REAL   , DIMENSION(:) :: parr 
    34703470      INTEGER               :: kdim 
    3471       INTEGER, OPTIONAL     :: kcom  
     3471      INTEGER, OPTIONAL     :: kcom 
    34723472      WRITE(*,*) 'mpp_sum_as: You should not have seen this print! error?', kdim, parr(1), kcom 
    34733473   END SUBROUTINE mpp_sum_as 
     
    34763476      REAL   , DIMENSION(:,:) :: parr 
    34773477      INTEGER               :: kdim 
    3478       INTEGER, OPTIONAL     :: kcom  
     3478      INTEGER, OPTIONAL     :: kcom 
    34793479      WRITE(*,*) 'mpp_sum_a2s: You should not have seen this print! error?', kdim, parr(1,1), kcom 
    34803480   END SUBROUTINE mpp_sum_a2s 
     
    34833483      INTEGER, DIMENSION(:) :: karr 
    34843484      INTEGER               :: kdim 
    3485       INTEGER, OPTIONAL     :: kcom  
     3485      INTEGER, OPTIONAL     :: kcom 
    34863486      WRITE(*,*) 'mpp_sum_ai: You should not have seen this print! error?', kdim, karr(1), kcom 
    34873487   END SUBROUTINE mpp_sum_ai 
     
    34893489   SUBROUTINE mpp_sum_s( psca, kcom )            ! Dummy routine 
    34903490      REAL                  :: psca 
    3491       INTEGER, OPTIONAL     :: kcom  
     3491      INTEGER, OPTIONAL     :: kcom 
    34923492      WRITE(*,*) 'mpp_sum_s: You should not have seen this print! error?', psca, kcom 
    34933493   END SUBROUTINE mpp_sum_s 
     
    34953495   SUBROUTINE mpp_sum_i( kint, kcom )            ! Dummy routine 
    34963496      integer               :: kint 
    3497       INTEGER, OPTIONAL     :: kcom  
     3497      INTEGER, OPTIONAL     :: kcom 
    34983498      WRITE(*,*) 'mpp_sum_i: You should not have seen this print! error?', kint, kcom 
    34993499   END SUBROUTINE mpp_sum_i 
     
    35043504      WRITE(*,*) 'mppsum_realdd: You should not have seen this print! error?', ytab 
    35053505   END SUBROUTINE mppsum_realdd 
    3506   
     3506 
    35073507   SUBROUTINE mppsum_a_realdd( ytab, kdim, kcom ) 
    35083508      INTEGER , INTENT( in )                        ::   kdim      ! size of ytab 
     
    35153515      REAL   , DIMENSION(:) :: parr 
    35163516      INTEGER               :: kdim 
    3517       INTEGER, OPTIONAL     :: kcom  
     3517      INTEGER, OPTIONAL     :: kcom 
    35183518      WRITE(*,*) 'mppmax_a_real: You should not have seen this print! error?', kdim, parr(1), kcom 
    35193519   END SUBROUTINE mppmax_a_real 
     
    35213521   SUBROUTINE mppmax_real( psca, kcom ) 
    35223522      REAL                  :: psca 
    3523       INTEGER, OPTIONAL     :: kcom  
     3523      INTEGER, OPTIONAL     :: kcom 
    35243524      WRITE(*,*) 'mppmax_real: You should not have seen this print! error?', psca, kcom 
    35253525   END SUBROUTINE mppmax_real 
     
    35283528      REAL   , DIMENSION(:) :: parr 
    35293529      INTEGER               :: kdim 
    3530       INTEGER, OPTIONAL     :: kcom  
     3530      INTEGER, OPTIONAL     :: kcom 
    35313531      WRITE(*,*) 'mppmin_a_real: You should not have seen this print! error?', kdim, parr(1), kcom 
    35323532   END SUBROUTINE mppmin_a_real 
     
    35343534   SUBROUTINE mppmin_real( psca, kcom ) 
    35353535      REAL                  :: psca 
    3536       INTEGER, OPTIONAL     :: kcom  
     3536      INTEGER, OPTIONAL     :: kcom 
    35373537      WRITE(*,*) 'mppmin_real: You should not have seen this print! error?', psca, kcom 
    35383538   END SUBROUTINE mppmin_real 
     
    35413541      INTEGER, DIMENSION(:) :: karr 
    35423542      INTEGER               :: kdim 
    3543       INTEGER, OPTIONAL     :: kcom  
     3543      INTEGER, OPTIONAL     :: kcom 
    35443544      WRITE(*,*) 'mppmax_a_int: You should not have seen this print! error?', kdim, karr(1), kcom 
    35453545   END SUBROUTINE mppmax_a_int 
     
    35473547   SUBROUTINE mppmax_int( kint, kcom) 
    35483548      INTEGER               :: kint 
    3549       INTEGER, OPTIONAL     :: kcom  
     3549      INTEGER, OPTIONAL     :: kcom 
    35503550      WRITE(*,*) 'mppmax_int: You should not have seen this print! error?', kint, kcom 
    35513551   END SUBROUTINE mppmax_int 
     
    35543554      INTEGER, DIMENSION(:) :: karr 
    35553555      INTEGER               :: kdim 
    3556       INTEGER, OPTIONAL     :: kcom  
     3556      INTEGER, OPTIONAL     :: kcom 
    35573557      WRITE(*,*) 'mppmin_a_int: You should not have seen this print! error?', kdim, karr(1), kcom 
    35583558   END SUBROUTINE mppmin_a_int 
     
    35603560   SUBROUTINE mppmin_int( kint, kcom ) 
    35613561      INTEGER               :: kint 
    3562       INTEGER, OPTIONAL     :: kcom  
     3562      INTEGER, OPTIONAL     :: kcom 
    35633563      WRITE(*,*) 'mppmin_int: You should not have seen this print! error?', kint, kcom 
    35643564   END SUBROUTINE mppmin_int 
     
    36473647      !!                  ***  ROUTINE  stop_opa  *** 
    36483648      !! 
    3649       !! ** Purpose :   print in ocean.outpput file a error message and  
     3649      !! ** Purpose :   print in ocean.outpput file a error message and 
    36503650      !!                increment the error number (nstop) by one. 
    36513651      !!---------------------------------------------------------------------- 
     
    36543654      !!---------------------------------------------------------------------- 
    36553655      ! 
    3656       nstop = nstop + 1  
     3656      nstop = nstop + 1 
    36573657      IF(lwp) THEN 
    36583658         WRITE(numout,cform_err) 
     
    36863686      !!                  ***  ROUTINE  stop_warn  *** 
    36873687      !! 
    3688       !! ** Purpose :   print in ocean.outpput file a error message and  
     3688      !! ** Purpose :   print in ocean.outpput file a error message and 
    36893689      !!                increment the warning number (nwarn) by one. 
    36903690      !!---------------------------------------------------------------------- 
     
    36923692      CHARACTER(len=*), INTENT(in), OPTIONAL ::  cd6, cd7, cd8, cd9, cd10 
    36933693      !!---------------------------------------------------------------------- 
    3694       !  
    3695       nwarn = nwarn + 1  
     3694      ! 
     3695      nwarn = nwarn + 1 
    36963696      IF(lwp) THEN 
    36973697         WRITE(numout,cform_war) 
     
    37793779         STOP 'ctl_opn bad opening' 
    37803780      ENDIF 
    3781        
     3781 
    37823782   END SUBROUTINE ctl_opn 
    37833783 
     
    37893789      !! ** Purpose :   return the index of an unused logical unit 
    37903790      !!---------------------------------------------------------------------- 
    3791       LOGICAL :: llopn  
     3791      LOGICAL :: llopn 
    37923792      !!---------------------------------------------------------------------- 
    37933793      ! 
Note: See TracChangeset for help on using the changeset viewer.