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 11317 for NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE – NEMO

Ignore:
Timestamp:
2019-07-22T10:32:59+02:00 (5 years ago)
Author:
smasson
Message:

dev_r10984_HPC-13 : improve error handling, see #2307 and #2285

Location:
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE
Files:
72 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ASM/asminc.F90

    r10425 r11317  
    147147      REWIND( numnam_ref )              ! Namelist nam_asminc in reference namelist : Assimilation increment 
    148148      READ  ( numnam_ref, nam_asminc, IOSTAT = ios, ERR = 901) 
    149 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_asminc in reference namelist', lwp ) 
     149901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_asminc in reference namelist' ) 
    150150      REWIND( numnam_cfg )              ! Namelist nam_asminc in configuration namelist : Assimilation increment 
    151151      READ  ( numnam_cfg, nam_asminc, IOSTAT = ios, ERR = 902 ) 
    152 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_asminc in configuration namelist', lwp ) 
     152902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_asminc in configuration namelist' ) 
    153153      IF(lwm) WRITE ( numond, nam_asminc ) 
    154154 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdydta.F90

    r11268 r11317  
    376376         REWIND(numnam_ref) 
    377377         READ  ( numnam_ref, nambdy_dta, IOSTAT = ios, ERR = 901) 
    378 901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy_dta in reference namelist', lwp ) 
     378901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy_dta in reference namelist' ) 
    379379 
    380380         !   by-pass nambdy_dta reading if no input data used in this bdy    
     
    385385            ! WARNING: we don't do a rewind here, each bdy reads its own nambdy_dta block one after another 
    386386            READ  ( numnam_cfg, nambdy_dta, IOSTAT = ios, ERR = 902 ) 
    387 902         IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy_dta in configuration namelist', lwp ) 
     387902         IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy_dta in configuration namelist' ) 
    388388            IF(lwm) WRITE( numond, nambdy_dta )            
    389389         ENDIF 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdyini.F90

    r11258 r11317  
    7878      REWIND( numnam_ref )              ! Namelist nambdy in reference namelist :Unstructured open boundaries 
    7979      READ  ( numnam_ref, nambdy, IOSTAT = ios, ERR = 901) 
    80 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy in reference namelist', lwp ) 
     80901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy in reference namelist' ) 
    8181      ! make sur that all elements of the namelist variables have a default definition from namelist_ref 
    8282      ln_coords_file (2:jp_bdy) = ln_coords_file (1) 
     
    9999      REWIND( numnam_cfg )              ! Namelist nambdy in configuration namelist :Unstructured open boundaries 
    100100      READ  ( numnam_cfg, nambdy, IOSTAT = ios, ERR = 902 ) 
    101 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy in configuration namelist', lwp ) 
     101902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy in configuration namelist' ) 
    102102      IF(lwm) WRITE ( numond, nambdy ) 
    103103 
     
    10941094      ! keep full control of the configuration namelist 
    10951095      READ  ( numnam_cfg, nambdy_index, IOSTAT = ios, ERR = 904 ) 
    1096 904   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy_index in configuration namelist', lwp ) 
     1096904   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy_index in configuration namelist' ) 
    10971097      IF(lwm) WRITE ( numond, nambdy_index ) 
    10981098       
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdytides.F90

    r11223 r11317  
    9696            REWIND( numnam_ref ) 
    9797            READ  ( numnam_ref, nambdy_tide, IOSTAT = ios, ERR = 901) 
    98 901         IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy_tide in reference namelist', lwp ) 
     98901         IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy_tide in reference namelist' ) 
    9999            ! Don't REWIND here - may need to read more than one of these namelists.  
    100100            READ  ( numnam_cfg, nambdy_tide, IOSTAT = ios, ERR = 902 ) 
    101 902         IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy_tide in configuration namelist', lwp ) 
     101902         IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy_tide in configuration namelist' ) 
    102102            IF(lwm) WRITE ( numond, nambdy_tide ) 
    103103            !                                               ! Parameter control and print 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/C1D/c1d.F90

    r10068 r11317  
    5252      REWIND( numnam_ref )              ! Namelist namc1d in reference namelist : Tracer advection scheme 
    5353      READ  ( numnam_ref, namc1d, IOSTAT = ios, ERR = 901) 
    54 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc1d in reference namelist', lwp ) 
     54901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc1d in reference namelist' ) 
    5555      ! 
    5656      REWIND( numnam_cfg )              ! Namelist namtra_adv in configuration namelist : Tracer advection scheme 
    5757      READ  ( numnam_cfg, namc1d, IOSTAT = ios, ERR = 902 ) 
    58 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc1d in configuration namelist', lwp ) 
     58902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc1d in configuration namelist' ) 
    5959      IF(lwm) WRITE ( numond, namc1d ) 
    6060      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/C1D/dtauvd.F90

    r10068 r11317  
    6262      REWIND( numnam_ref )              ! Namelist namc1d_uvd in reference namelist :  
    6363      READ  ( numnam_ref, namc1d_uvd, IOSTAT = ios, ERR = 901) 
    64 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc1d_uvd in reference namelist', lwp ) 
     64901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc1d_uvd in reference namelist' ) 
    6565      ! 
    6666      REWIND( numnam_cfg )              ! Namelist namc1d_uvd in configuration namelist : Parameters of the run 
    6767      READ  ( numnam_cfg, namc1d_uvd, IOSTAT = ios, ERR = 902 ) 
    68 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc1d_uvd in configuration namelist', lwp ) 
     68902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc1d_uvd in configuration namelist' ) 
    6969      IF(lwm) WRITE ( numond, namc1d_uvd ) 
    7070 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/C1D/dyndmp.F90

    r10425 r11317  
    8181      REWIND( numnam_ref )              ! Namelist namc1d_dyndmp in reference namelist :  
    8282      READ  ( numnam_ref, namc1d_dyndmp, IOSTAT = ios, ERR = 901) 
    83 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc1d_dyndmp in reference namelist', lwp ) 
     83901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc1d_dyndmp in reference namelist' ) 
    8484      REWIND( numnam_cfg )              ! Namelist namc1d_dyndmp in configuration namelist : Parameters of the run 
    8585      READ  ( numnam_cfg, namc1d_dyndmp, IOSTAT = ios, ERR = 902 ) 
    86 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc1d_dyndmp in configuration namelist', lwp ) 
     86902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc1d_dyndmp in configuration namelist' ) 
    8787      IF(lwm) WRITE ( numond, namc1d_dyndmp ) 
    8888      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/CRS/crsdom.F90

    r11192 r11317  
    579579                  ENDDO   
    580580               CASE DEFAULT 
    581                     STOP 
     581                  CALL ctl_stop( 'STOP', 'error from crs_dom_ope_3d, you should not be there...' ) 
    582582               END SELECT 
    583583 
     
    19471947                 
    19481948              CASE DEFAULT 
    1949                  STOP 
     1949                 CALL ctl_stop( 'STOP', 'error from crs_dom_def, you should not be there (1) ...' ) 
    19501950           END SELECT 
    19511951           IF( nlcjt_crs(jn) > jpj_crs )     jpj_crs = jpj_crs + 1 
     
    19961996 
    19971997              CASE DEFAULT 
    1998                  STOP 
     1998                 CALL ctl_stop( 'STOP', 'error from crs_dom_def, you should not be there (2) ...' ) 
    19991999           END SELECT 
    20002000 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/CRS/crsini.F90

    r10068 r11317  
    8282      REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
    8383      READ  ( numnam_ref, namcrs, IOSTAT = ios, ERR = 901) 
    84 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcrs in reference namelist', lwp ) 
     84901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcrs in reference namelist' ) 
    8585      REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
    8686      READ  ( numnam_cfg, namcrs, IOSTAT = ios, ERR = 902 ) 
    87 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcrs in configuration namelist', lwp ) 
     87902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcrs in configuration namelist' ) 
    8888      IF(lwm) WRITE ( numond, namcrs ) 
    8989 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIA/dia25h.F90

    r10641 r11317  
    5555      REWIND ( numnam_ref )              ! Read Namelist nam_dia25h in reference namelist : 25hour mean diagnostics 
    5656      READ   ( numnam_ref, nam_dia25h, IOSTAT=ios, ERR= 901 ) 
    57 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_dia25h in reference namelist', lwp ) 
     57901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_dia25h in reference namelist' ) 
    5858      REWIND( numnam_cfg )              ! Namelist nam_dia25h in configuration namelist  25hour diagnostics 
    5959      READ  ( numnam_cfg, nam_dia25h, IOSTAT = ios, ERR = 902 ) 
    60 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_dia25h in configuration namelist', lwp ) 
     60902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_dia25h in configuration namelist' ) 
    6161      IF(lwm) WRITE ( numond, nam_dia25h ) 
    6262 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIA/diadct.F90

    r10425 r11317  
    135135     REWIND( numnam_ref )              ! Namelist namdct in reference namelist : Diagnostic: transport through sections 
    136136     READ  ( numnam_ref, namdct, IOSTAT = ios, ERR = 901) 
    137 901  IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdct in reference namelist', lwp ) 
     137901  IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdct in reference namelist' ) 
    138138 
    139139     REWIND( numnam_cfg )              ! Namelist namdct in configuration namelist : Diagnostic: transport through sections 
    140140     READ  ( numnam_cfg, namdct, IOSTAT = ios, ERR = 902 ) 
    141 902  IF( ios >  0 ) CALL ctl_nam ( ios , 'namdct in configuration namelist', lwp ) 
     141902  IF( ios >  0 ) CALL ctl_nam ( ios , 'namdct in configuration namelist' ) 
    142142     IF(lwm) WRITE ( numond, namdct ) 
    143143 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIA/diaharm.F90

    r10835 r11317  
    8989      REWIND( numnam_ref )              ! Namelist nam_diaharm in reference namelist : Tidal harmonic analysis 
    9090      READ  ( numnam_ref, nam_diaharm, IOSTAT = ios, ERR = 901) 
    91 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_diaharm in reference namelist', lwp ) 
     91901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_diaharm in reference namelist' ) 
    9292      REWIND( numnam_cfg )              ! Namelist nam_diaharm in configuration namelist : Tidal harmonic analysis 
    9393      READ  ( numnam_cfg, nam_diaharm, IOSTAT = ios, ERR = 902 ) 
    94 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_diaharm in configuration namelist', lwp ) 
     94902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_diaharm in configuration namelist' ) 
    9595      IF(lwm) WRITE ( numond, nam_diaharm ) 
    9696      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIA/diahsb.F90

    r10425 r11317  
    362362      REWIND( numnam_ref )              ! Namelist namhsb in reference namelist 
    363363      READ  ( numnam_ref, namhsb, IOSTAT = ios, ERR = 901) 
    364 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namhsb in reference namelist', lwp ) 
     364901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namhsb in reference namelist' ) 
    365365      REWIND( numnam_cfg )              ! Namelist namhsb in configuration namelist 
    366366      READ  ( numnam_cfg, namhsb, IOSTAT = ios, ERR = 902 ) 
    367 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namhsb in configuration namelist', lwp ) 
     367902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namhsb in configuration namelist' ) 
    368368      IF(lwm) WRITE( numond, namhsb ) 
    369369 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIA/diaptr.F90

    r10425 r11317  
    393393      REWIND( numnam_ref )              ! Namelist namptr in reference namelist : Poleward transport 
    394394      READ  ( numnam_ref, namptr, IOSTAT = ios, ERR = 901) 
    395 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in reference namelist', lwp ) 
     395901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in reference namelist' ) 
    396396 
    397397      REWIND( numnam_cfg )              ! Namelist namptr in configuration namelist : Poleward transport 
    398398      READ  ( numnam_cfg, namptr, IOSTAT = ios, ERR = 902 ) 
    399 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namptr in configuration namelist', lwp ) 
     399902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namptr in configuration namelist' ) 
    400400      IF(lwm) WRITE ( numond, namptr ) 
    401401 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIA/diatmb.F90

    r10499 r11317  
    4343      REWIND( numnam_ref )              ! Read Namelist nam_diatmb in reference namelist : TMB diagnostics 
    4444      READ  ( numnam_ref, nam_diatmb, IOSTAT=ios, ERR= 901 ) 
    45 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diatmb in reference namelist', lwp ) 
     45901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diatmb in reference namelist' ) 
    4646  
    4747      REWIND( numnam_cfg )              ! Namelist nam_diatmb in configuration namelist  TMB diagnostics 
    4848      READ  ( numnam_cfg, nam_diatmb, IOSTAT = ios, ERR = 902 ) 
    49 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_diatmb in configuration namelist', lwp ) 
     49902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_diatmb in configuration namelist' ) 
    5050      IF(lwm) WRITE ( numond, nam_diatmb ) 
    5151 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIU/diurnal_bulk.F90

    r10069 r11317  
    5454      REWIND( numnam_ref ) 
    5555      READ  ( numnam_ref, namdiu, IOSTAT = ios, ERR = 901 ) 
    56 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdiu in reference namelist', lwp ) 
     56901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdiu in reference namelist' ) 
    5757      REWIND( numnam_cfg ) 
    5858      READ  ( numnam_cfg, namdiu, IOSTAT = ios, ERR = 902 ) 
    59 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdiu in configuration namelist', lwp )       
     59902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdiu in configuration namelist' )       
    6060      ! 
    6161      IF( ln_diurnal_only .AND. ( .NOT. ln_diurnal ) ) THEN 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DOM/domain.F90

    r11258 r11317  
    308308      REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
    309309      READ  ( numnam_ref, namrun, IOSTAT = ios, ERR = 901) 
    310 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist', lwp ) 
     310901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist' ) 
    311311      REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
    312312      READ  ( numnam_cfg, namrun, IOSTAT = ios, ERR = 902 ) 
    313 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist', lwp ) 
     313902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist' ) 
    314314      IF(lwm) WRITE ( numond, namrun ) 
    315315      ! 
     
    401401      REWIND( numnam_ref )              ! Namelist namdom in reference namelist : space & time domain (bathymetry, mesh, timestep) 
    402402      READ  ( numnam_ref, namdom, IOSTAT = ios, ERR = 903) 
    403 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist', lwp ) 
     403903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist' ) 
    404404      REWIND( numnam_cfg )              ! Namelist namdom in configuration namelist : space & time domain (bathymetry, mesh, timestep) 
    405405      READ  ( numnam_cfg, namdom, IOSTAT = ios, ERR = 904 ) 
    406 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp ) 
     406904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist' ) 
    407407      IF(lwm) WRITE( numond, namdom ) 
    408408      ! 
     
    433433      REWIND( numnam_ref )              ! Namelist namnc4 in reference namelist : NETCDF 
    434434      READ  ( numnam_ref, namnc4, IOSTAT = ios, ERR = 907) 
    435 907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist', lwp ) 
     435907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist' ) 
    436436      REWIND( numnam_cfg )              ! Namelist namnc4 in configuration namelist : NETCDF 
    437437      READ  ( numnam_cfg, namnc4, IOSTAT = ios, ERR = 908 ) 
    438 908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist', lwp ) 
     438908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist' ) 
    439439      IF(lwm) WRITE( numond, namnc4 ) 
    440440 
     
    511511 
    512512 
    513    SUBROUTINE domain_cfg( ldtxt, cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     513   SUBROUTINE domain_cfg( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
    514514      !!---------------------------------------------------------------------- 
    515515      !!                     ***  ROUTINE dom_nam  *** 
     
    519519      !! ** Method  :   read the cn_domcfg NetCDF file 
    520520      !!---------------------------------------------------------------------- 
    521       CHARACTER(len=*), DIMENSION(:), INTENT(out) ::   ldtxt           ! stored print information 
    522521      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    523522      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
     
    525524      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
    526525      ! 
    527       INTEGER ::   inum, ii   ! local integer 
     526      INTEGER ::   inum   ! local integer 
    528527      REAL(wp) ::   zorca_res                     ! local scalars 
    529528      REAL(wp) ::   zperio                        !   -      - 
     
    531530      !!---------------------------------------------------------------------- 
    532531      ! 
    533       ii = 1 
    534       WRITE(ldtxt(ii),*) '           '                                                    ;   ii = ii+1 
    535       WRITE(ldtxt(ii),*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file'  ;   ii = ii+1 
    536       WRITE(ldtxt(ii),*) '~~~~~~~~~~ '                                                    ;   ii = ii+1 
     532      WRITE(numout,*) '           ' 
     533      WRITE(numout,*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file' 
     534      WRITE(numout,*) '~~~~~~~~~~ ' 
    537535      ! 
    538536      CALL iom_open( cn_domcfg, inum ) 
     
    545543         CALL iom_get( inum, 'ORCA_index', zorca_res )   ;   kk_cfg = NINT( zorca_res ) 
    546544         ! 
    547          WRITE(ldtxt(ii),*) '   .'                                                     ;   ii = ii+1 
    548          WRITE(ldtxt(ii),*) '   ==>>>   ORCA configuration '                           ;   ii = ii+1 
    549          WRITE(ldtxt(ii),*) '   .'                                                     ;   ii = ii+1 
     545         WRITE(numout,*) '   .' 
     546         WRITE(numout,*) '   ==>>>   ORCA configuration ' 
     547         WRITE(numout,*) '   .' 
    550548         ! 
    551549      ELSE                                !- cd_cfg & k_cfg are not used 
     
    568566      CALL iom_close( inum ) 
    569567      ! 
    570       WRITE(ldtxt(ii),*) '      cn_cfg = ', TRIM(cd_cfg), '   nn_cfg = ', kk_cfg             ;   ii = ii+1 
    571       WRITE(ldtxt(ii),*) '      jpiglo = ', kpi                                              ;   ii = ii+1 
    572       WRITE(ldtxt(ii),*) '      jpjglo = ', kpj                                              ;   ii = ii+1 
    573       WRITE(ldtxt(ii),*) '      jpkglo = ', kpk                                              ;   ii = ii+1 
    574       WRITE(ldtxt(ii),*) '      type of global domain lateral boundary   jperio = ', kperio  ;   ii = ii+1 
     568      WRITE(numout,*) '      cn_cfg = ', TRIM(cd_cfg), '   nn_cfg = ', kk_cfg 
     569      WRITE(numout,*) '      jpiglo = ', kpi 
     570      WRITE(numout,*) '      jpjglo = ', kpj 
     571      WRITE(numout,*) '      jpkglo = ', kpk 
     572      WRITE(numout,*) '      type of global domain lateral boundary   jperio = ', kperio 
    575573      !         
    576574   END SUBROUTINE domain_cfg 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DOM/dommsk.F90

    r11263 r11317  
    106106      REWIND( numnam_ref )              ! Namelist namlbc in reference namelist : Lateral momentum boundary condition 
    107107      READ  ( numnam_ref, namlbc, IOSTAT = ios, ERR = 901 ) 
    108 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlbc in reference namelist', lwp ) 
     108901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlbc in reference namelist' ) 
    109109      REWIND( numnam_cfg )              ! Namelist namlbc in configuration namelist : Lateral momentum boundary condition 
    110110      READ  ( numnam_cfg, namlbc, IOSTAT = ios, ERR = 902 ) 
    111 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlbc in configuration namelist', lwp ) 
     111902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlbc in configuration namelist' ) 
    112112      IF(lwm) WRITE ( numond, namlbc ) 
    113113       
     
    151151      REWIND( numnam_ref )              ! Namelist nambdy in reference namelist :Unstructured open boundaries 
    152152      READ  ( numnam_ref, nambdy, IOSTAT = ios, ERR = 903) 
    153 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy in reference namelist', lwp ) 
     153903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy in reference namelist' ) 
    154154      REWIND( numnam_cfg )              ! Namelist nambdy in configuration namelist :Unstructured open boundaries 
    155155      READ  ( numnam_cfg, nambdy, IOSTAT = ios, ERR = 904 ) 
    156 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy in configuration namelist', lwp ) 
     156904   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy in configuration namelist' ) 
    157157      ! ------------------------ 
    158158      IF ( ln_bdy .AND. ln_mask_file ) THEN 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DOM/domvvl.F90

    r10425 r11317  
    993993      REWIND( numnam_ref )              ! Namelist nam_vvl in reference namelist :  
    994994      READ  ( numnam_ref, nam_vvl, IOSTAT = ios, ERR = 901) 
    995 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_vvl in reference namelist', lwp ) 
     995901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_vvl in reference namelist' ) 
    996996      REWIND( numnam_cfg )              ! Namelist nam_vvl in configuration namelist : Parameters of the run 
    997997      READ  ( numnam_cfg, nam_vvl, IOSTAT = ios, ERR = 902 ) 
    998 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist', lwp ) 
     998902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist' ) 
    999999      IF(lwm) WRITE ( numond, nam_vvl ) 
    10001000      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DOM/dtatsd.F90

    r10213 r11317  
    6767      REWIND( numnam_ref )              ! Namelist namtsd in reference namelist :  
    6868      READ  ( numnam_ref, namtsd, IOSTAT = ios, ERR = 901) 
    69 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtsd in reference namelist', lwp ) 
     69901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtsd in reference namelist' ) 
    7070      REWIND( numnam_cfg )              ! Namelist namtsd in configuration namelist : Parameters of the run 
    7171      READ  ( numnam_cfg, namtsd, IOSTAT = ios, ERR = 902 ) 
    72 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtsd in configuration namelist', lwp ) 
     72902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtsd in configuration namelist' ) 
    7373      IF(lwm) WRITE ( numond, namtsd ) 
    7474 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DOM/iscplhsb.F90

    r10425 r11317  
    186186!      CALL lbc_sum(pts_flx (:,:,:,jp_sal),'T',1.) 
    187187!      CALL lbc_sum(pts_flx (:,:,:,jp_tem),'T',1.) 
    188       STOP ' iscpl_cons:   please modify this module !' 
     188      CALL ctl_stop( 'STOP', ' iscpl_cons:   please modify this MODULE !' ) 
    189189!!gm end 
    190190      ! if no neighbour wet cell in case of 2close a cell", need to find the nearest wet point  
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DOM/iscplini.F90

    r10425 r11317  
    6464      REWIND( numnam_ref )              ! Namelist namsbc_iscpl in reference namelist : Ice sheet coupling 
    6565      READ  ( numnam_ref, namsbc_iscpl, IOSTAT = ios, ERR = 901) 
    66 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_iscpl in reference namelist', lwp ) 
     66901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_iscpl in reference namelist' ) 
    6767      REWIND( numnam_cfg )              ! Namelist namsbc_iscpl in configuration namelist : Ice Sheet coupling 
    6868      READ  ( numnam_cfg, namsbc_iscpl, IOSTAT = ios, ERR = 902 ) 
    69 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_iscpl in configuration namelist', lwp ) 
     69902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_iscpl in configuration namelist' ) 
    7070      IF(lwm) WRITE ( numond, namsbc_iscpl ) 
    7171      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/dynadv.F90

    r10068 r11317  
    106106      REWIND( numnam_ref )              ! Namelist namdyn_adv in reference namelist : Momentum advection scheme 
    107107      READ  ( numnam_ref, namdyn_adv, IOSTAT = ios, ERR = 901) 
    108 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_adv in reference namelist', lwp ) 
     108901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_adv in reference namelist' ) 
    109109      REWIND( numnam_cfg )              ! Namelist namdyn_adv in configuration namelist : Momentum advection scheme 
    110110      READ  ( numnam_cfg, namdyn_adv, IOSTAT = ios, ERR = 902 ) 
    111 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_adv in configuration namelist', lwp ) 
     111902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_adv in configuration namelist' ) 
    112112      IF(lwm) WRITE ( numond, namdyn_adv ) 
    113113 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/dynhpg.F90

    r10491 r11317  
    152152      REWIND( numnam_ref )              ! Namelist namdyn_hpg in reference namelist : Hydrostatic pressure gradient 
    153153      READ  ( numnam_ref, namdyn_hpg, IOSTAT = ios, ERR = 901) 
    154 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_hpg in reference namelist', lwp ) 
     154901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_hpg in reference namelist' ) 
    155155      ! 
    156156      REWIND( numnam_cfg )              ! Namelist namdyn_hpg in configuration namelist : Hydrostatic pressure gradient 
    157157      READ  ( numnam_cfg, namdyn_hpg, IOSTAT = ios, ERR = 902 ) 
    158 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_hpg in configuration namelist', lwp ) 
     158902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_hpg in configuration namelist' ) 
    159159      IF(lwm) WRITE ( numond, namdyn_hpg ) 
    160160      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/dynspg.F90

    r10068 r11317  
    202202      REWIND( numnam_ref )              ! Namelist namdyn_spg in reference namelist : Free surface 
    203203      READ  ( numnam_ref, namdyn_spg, IOSTAT = ios, ERR = 901) 
    204 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_spg in reference namelist', lwp ) 
     204901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_spg in reference namelist' ) 
    205205      ! 
    206206      REWIND( numnam_cfg )              ! Namelist namdyn_spg in configuration namelist : Free surface 
    207207      READ  ( numnam_cfg, namdyn_spg, IOSTAT = ios, ERR = 902 ) 
    208 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_spg in configuration namelist', lwp ) 
     208902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_spg in configuration namelist' ) 
    209209      IF(lwm) WRITE ( numond, namdyn_spg ) 
    210210      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/dynvor.F90

    r10425 r11317  
    851851      REWIND( numnam_ref )              ! Namelist namdyn_vor in reference namelist : Vorticity scheme options 
    852852      READ  ( numnam_ref, namdyn_vor, IOSTAT = ios, ERR = 901) 
    853 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_vor in reference namelist', lwp ) 
     853901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_vor in reference namelist' ) 
    854854      REWIND( numnam_cfg )              ! Namelist namdyn_vor in configuration namelist : Vorticity scheme options 
    855855      READ  ( numnam_cfg, namdyn_vor, IOSTAT = ios, ERR = 902 ) 
    856 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_vor in configuration namelist', lwp ) 
     856902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_vor in configuration namelist' ) 
    857857      IF(lwm) WRITE ( numond, namdyn_vor ) 
    858858      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/wet_dry.F90

    r10499 r11317  
    8181      REWIND( numnam_ref )              ! Namelist namwad in reference namelist : Parameters for Wetting/Drying 
    8282      READ  ( numnam_ref, namwad, IOSTAT = ios, ERR = 905) 
    83 905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namwad in reference namelist', .TRUE.)  
     83905   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namwad in reference namelist' )  
    8484      REWIND( numnam_cfg )              ! Namelist namwad in configuration namelist : Parameters for Wetting/Drying 
    8585      READ  ( numnam_cfg, namwad, IOSTAT = ios, ERR = 906) 
    86 906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namwad in configuration namelist', .TRUE. ) 
     86906   IF( ios >  0 )   CALL ctl_nam ( ios , 'namwad in configuration namelist' ) 
    8787      IF(lwm) WRITE ( numond, namwad ) 
    8888      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/FLO/floats.F90

    r10068 r11317  
    9090      REWIND( numnam_ref )              ! Namelist namflo in reference namelist : Floats 
    9191      READ  ( numnam_ref, namflo, IOSTAT = ios, ERR = 901) 
    92 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namflo in reference namelist', lwp ) 
     92901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namflo in reference namelist' ) 
    9393 
    9494      REWIND( numnam_cfg )              ! Namelist namflo in configuration namelist : Floats 
    9595      READ  ( numnam_cfg, namflo, IOSTAT = ios, ERR = 902 ) 
    96 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namflo in configuration namelist', lwp ) 
     96902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namflo in configuration namelist' ) 
    9797      IF(lwm) WRITE ( numond, namflo ) 
    9898      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ICB/icbini.F90

    r10702 r11317  
    406406      REWIND( numnam_ref )              ! Namelist namberg in reference namelist : Iceberg parameters 
    407407      READ  ( numnam_ref, namberg, IOSTAT = ios, ERR = 901) 
    408 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namberg in reference namelist', lwp ) 
     408901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namberg in reference namelist' ) 
    409409      REWIND( numnam_cfg )              ! Namelist namberg in configuration namelist : Iceberg parameters 
    410410      READ  ( numnam_cfg, namberg, IOSTAT = ios, ERR = 902 ) 
    411 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namberg in configuration namelist', lwp ) 
     411902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namberg in configuration namelist' ) 
    412412      IF(lwm) WRITE ( numond, namberg ) 
    413413      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ICB/icblbc.F90

    r10570 r11317  
    278278         CALL mppsend( 12, zwebergs(1), 1, ipe_E, iml_req1) 
    279279         CALL mpprecv( 11, zewbergs(2), 1, ipe_E ) 
    280          IF( l_isend ) CALL mpi_wait( iml_req1, iml_stat, iml_err ) 
     280         CALL mpi_wait( iml_req1, iml_stat, iml_err ) 
    281281         ibergs_rcvd_from_e = INT( zewbergs(2) ) 
    282282      CASE(  0 ) 
     
    287287         CALL mpprecv( 11, zewbergs(2), 1, ipe_E ) 
    288288         CALL mpprecv( 12, zwebergs(2), 1, ipe_W ) 
    289          IF( l_isend ) CALL mpi_wait( iml_req2, iml_stat, iml_err ) 
    290          IF( l_isend ) CALL mpi_wait( iml_req3, iml_stat, iml_err ) 
     289         CALL mpi_wait( iml_req2, iml_stat, iml_err ) 
     290         CALL mpi_wait( iml_req3, iml_stat, iml_err ) 
    291291         ibergs_rcvd_from_e = INT( zewbergs(2) ) 
    292292         ibergs_rcvd_from_w = INT( zwebergs(2) ) 
     
    295295         CALL mppsend( 11, zewbergs(1), 1, ipe_W, iml_req4) 
    296296         CALL mpprecv( 12, zwebergs(2), 1, ipe_W ) 
    297          IF( l_isend ) CALL mpi_wait( iml_req4, iml_stat, iml_err ) 
     297         CALL mpi_wait( iml_req4, iml_stat, iml_err ) 
    298298         ibergs_rcvd_from_w = INT( zwebergs(2) ) 
    299299      END SELECT 
     
    310310            CALL mpprecv( 13, ibuffer_e%data, ibergs_rcvd_from_e*jp_buffer_width ) 
    311311         ENDIF 
    312          IF( ibergs_to_send_e > 0 .AND. l_isend ) CALL mpi_wait( iml_req1, iml_stat, iml_err ) 
     312         IF( ibergs_to_send_e > 0 ) CALL mpi_wait( iml_req1, iml_stat, iml_err ) 
    313313         DO i = 1, ibergs_rcvd_from_e 
    314314            IF( nn_verbose_level >= 4 ) THEN 
     
    329329            CALL mpprecv( 14, ibuffer_w%data, ibergs_rcvd_from_w*jp_buffer_width ) 
    330330         ENDIF 
    331          IF( ibergs_to_send_w > 0 .AND. l_isend ) CALL mpi_wait( iml_req2, iml_stat, iml_err ) 
    332          IF( ibergs_to_send_e > 0 .AND. l_isend ) CALL mpi_wait( iml_req3, iml_stat, iml_err ) 
     331         IF( ibergs_to_send_w > 0 ) CALL mpi_wait( iml_req2, iml_stat, iml_err ) 
     332         IF( ibergs_to_send_e > 0 ) CALL mpi_wait( iml_req3, iml_stat, iml_err ) 
    333333         DO i = 1, ibergs_rcvd_from_e 
    334334            IF( nn_verbose_level >= 4 ) THEN 
     
    351351            CALL mpprecv( 14, ibuffer_w%data, ibergs_rcvd_from_w*jp_buffer_width ) 
    352352         ENDIF 
    353          IF( ibergs_to_send_w > 0 .AND. l_isend ) CALL mpi_wait( iml_req4, iml_stat, iml_err ) 
     353         IF( ibergs_to_send_w > 0 ) CALL mpi_wait( iml_req4, iml_stat, iml_err ) 
    354354         DO i = 1, ibergs_rcvd_from_w 
    355355            IF( nn_verbose_level >= 4 ) THEN 
     
    409409         CALL mppsend( 16, zsnbergs(1), 1, ipe_N, iml_req1) 
    410410         CALL mpprecv( 15, znsbergs(2), 1, ipe_N ) 
    411          IF( l_isend ) CALL mpi_wait( iml_req1, iml_stat, iml_err ) 
     411         CALL mpi_wait( iml_req1, iml_stat, iml_err ) 
    412412         ibergs_rcvd_from_n = INT( znsbergs(2) ) 
    413413      CASE(  0 ) 
     
    418418         CALL mpprecv( 15, znsbergs(2), 1, ipe_N ) 
    419419         CALL mpprecv( 16, zsnbergs(2), 1, ipe_S ) 
    420          IF( l_isend ) CALL mpi_wait( iml_req2, iml_stat, iml_err ) 
    421          IF( l_isend ) CALL mpi_wait( iml_req3, iml_stat, iml_err ) 
     420         CALL mpi_wait( iml_req2, iml_stat, iml_err ) 
     421         CALL mpi_wait( iml_req3, iml_stat, iml_err ) 
    422422         ibergs_rcvd_from_n = INT( znsbergs(2) ) 
    423423         ibergs_rcvd_from_s = INT( zsnbergs(2) ) 
     
    426426         CALL mppsend( 15, znsbergs(1), 1, ipe_S, iml_req4) 
    427427         CALL mpprecv( 16, zsnbergs(2), 1, ipe_S ) 
    428          IF( l_isend ) CALL mpi_wait( iml_req4, iml_stat, iml_err ) 
     428         CALL mpi_wait( iml_req4, iml_stat, iml_err ) 
    429429         ibergs_rcvd_from_s = INT( zsnbergs(2) ) 
    430430      END SELECT 
     
    441441            CALL mpprecv( 17, ibuffer_n%data, ibergs_rcvd_from_n*jp_buffer_width ) 
    442442         ENDIF 
    443          IF( ibergs_to_send_n > 0 .AND. l_isend ) CALL mpi_wait( iml_req1, iml_stat, iml_err ) 
     443         IF( ibergs_to_send_n > 0 ) CALL mpi_wait( iml_req1, iml_stat, iml_err ) 
    444444         DO i = 1, ibergs_rcvd_from_n 
    445445            IF( nn_verbose_level >= 4 ) THEN 
     
    460460            CALL mpprecv( 18, ibuffer_s%data, ibergs_rcvd_from_s*jp_buffer_width ) 
    461461         ENDIF 
    462          IF( ibergs_to_send_s > 0 .AND. l_isend ) CALL mpi_wait( iml_req2, iml_stat, iml_err ) 
    463          IF( ibergs_to_send_n > 0 .AND. l_isend ) CALL mpi_wait( iml_req3, iml_stat, iml_err ) 
     462         IF( ibergs_to_send_s > 0 ) CALL mpi_wait( iml_req2, iml_stat, iml_err ) 
     463         IF( ibergs_to_send_n > 0 ) CALL mpi_wait( iml_req3, iml_stat, iml_err ) 
    464464         DO i = 1, ibergs_rcvd_from_n 
    465465            IF( nn_verbose_level >= 4 ) THEN 
     
    482482            CALL mpprecv( 18, ibuffer_s%data, ibergs_rcvd_from_s*jp_buffer_width ) 
    483483         ENDIF 
    484          IF( ibergs_to_send_s > 0 .AND. l_isend ) CALL mpi_wait( iml_req4, iml_stat, iml_err ) 
     484         IF( ibergs_to_send_s > 0 ) CALL mpi_wait( iml_req4, iml_stat, iml_err ) 
    485485         DO i = 1, ibergs_rcvd_from_s 
    486486            IF( nn_verbose_level >= 4 ) THEN 
     
    669669            ifldproc = nicbfldproc(jn) 
    670670            IF( ifldproc == narea ) CYCLE 
    671  
    672             IF( l_isend ) CALL mpi_wait( nicbfldreq(jn), iml_stat, iml_err ) 
     671            CALL mpi_wait( nicbfldreq(jn), iml_stat, iml_err ) 
    673672         ENDIF 
    674673         ! 
     
    770769            ifldproc = nicbfldproc(jn) 
    771770            IF( ifldproc == narea ) CYCLE 
    772  
    773             IF( l_isend ) CALL mpi_wait( nicbfldreq(jn), iml_stat, iml_err ) 
     771            CALL mpi_wait( nicbfldreq(jn), iml_stat, iml_err ) 
    774772         ENDIF 
    775773         ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/IOM/in_out_manager.F90

    r10817 r11317  
    167167   CHARACTER(lc) ::   ctmp7, ctmp8, ctmp9   !: temporary characters 7 to 9 
    168168   CHARACTER(lc) ::   ctmp10                !: temporary character 10 
    169    CHARACTER(lc) ::   cform_err = "(/,' ===>>> : E R R O R',     /,'         ===========',/)"       !: 
    170    CHARACTER(lc) ::   cform_war = "(/,' ===>>> : W A R N I N G', /,'         ===============',/)"   !: 
    171169   LOGICAL       ::   lwm      = .FALSE.    !: boolean : true on the 1st processor only (always) 
    172170   LOGICAL       ::   lwp      = .FALSE.    !: boolean : true on the 1st processor only .OR. ln_ctl 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/lbc_nfd_nogather_generic.h90

    r10425 r11317  
    7474      ! 
    7575      ! Security check for further developments 
    76       IF ( ipf > 1 ) THEN 
    77         write(6,*) 'lbc_nfd_nogather: multiple fields not allowed. Revise implementation'  
    78         write(6,*) 'You should not be there...'  
    79         STOP 
    80       ENDIF 
     76      IF ( ipf > 1 ) CALL ctl_stop( 'STOP', 'lbc_nfd_nogather: multiple fields not allowed. Revise implementation...' ) 
    8177      ! 
    8278      ijpj   = 1    ! index of first modified line  
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/lbclnk.F90

    r11195 r11317  
    410410         CALL mppsend( 2, r2dwe(1-kextj,1,1), imigr, noea, ml_req1 ) 
    411411         CALL mpprecv( 1, r2dew(1-kextj,1,2), imigr, noea ) 
    412          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 
     412         CALL mpi_wait(ml_req1,ml_stat,ml_err) 
    413413      CASE ( 0 ) 
    414414         CALL mppsend( 1, r2dew(1-kextj,1,1), imigr, nowe, ml_req1 ) 
     
    416416         CALL mpprecv( 1, r2dew(1-kextj,1,2), imigr, noea ) 
    417417         CALL mpprecv( 2, r2dwe(1-kextj,1,2), imigr, nowe ) 
    418          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 
    419          IF(l_isend) CALL mpi_wait(ml_req2,ml_stat,ml_err) 
     418         CALL mpi_wait(ml_req1,ml_stat,ml_err) 
     419         CALL mpi_wait(ml_req2,ml_stat,ml_err) 
    420420      CASE ( 1 ) 
    421421         CALL mppsend( 1, r2dew(1-kextj,1,1), imigr, nowe, ml_req1 ) 
    422422         CALL mpprecv( 2, r2dwe(1-kextj,1,2), imigr, nowe ) 
    423          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 
     423         CALL mpi_wait(ml_req1,ml_stat,ml_err) 
    424424      END SELECT 
    425425      ! 
     
    467467         CALL mppsend( 4, r2dsn(1-kexti,1,1), imigr, nono, ml_req1 ) 
    468468         CALL mpprecv( 3, r2dns(1-kexti,1,2), imigr, nono ) 
    469          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 
     469         CALL mpi_wait(ml_req1,ml_stat,ml_err) 
    470470      CASE ( 0 ) 
    471471         CALL mppsend( 3, r2dns(1-kexti,1,1), imigr, noso, ml_req1 ) 
     
    473473         CALL mpprecv( 3, r2dns(1-kexti,1,2), imigr, nono ) 
    474474         CALL mpprecv( 4, r2dsn(1-kexti,1,2), imigr, noso ) 
    475          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 
    476          IF(l_isend) CALL mpi_wait(ml_req2,ml_stat,ml_err) 
     475         CALL mpi_wait(ml_req1,ml_stat,ml_err) 
     476         CALL mpi_wait(ml_req2,ml_stat,ml_err) 
    477477      CASE ( 1 ) 
    478478         CALL mppsend( 3, r2dns(1-kexti,1,1), imigr, noso, ml_req1 ) 
    479479         CALL mpprecv( 4, r2dsn(1-kexti,1,2), imigr, noso ) 
    480          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err) 
     480         CALL mpi_wait(ml_req1,ml_stat,ml_err) 
    481481      END SELECT 
    482482      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/lbcnfd.F90

    r10425 r11317  
    2020   USE dom_oce        ! ocean space and time domain  
    2121   USE in_out_manager ! I/O manager 
     22   USE lib_mpp        ! MPP library 
    2223 
    2324   IMPLICIT NONE 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/lib_mpp.F90

    r11194 r11317  
    3232   !!   ctl_opn       : Open file and check if required file is available. 
    3333   !!   ctl_nam       : Prints informations when an error occurs while reading a namelist 
    34    !!   get_unit      : give the index of an unused logical unit 
    35    !!---------------------------------------------------------------------- 
    36    !!---------------------------------------------------------------------- 
    37    !!   mynode        : indentify the processor unit 
     34   !!---------------------------------------------------------------------- 
     35   !!---------------------------------------------------------------------- 
     36   !!   mpp_start     : get local communicator its size and rank 
    3837   !!   mpp_lnk       : interface (defined in lbclnk) for message passing of 2d or 3d arrays (mpp_lnk_2d, mpp_lnk_3d) 
    3938   !!   mpp_lnk_icb   : interface for message passing of 2d arrays with extra halo for icebergs (mpp_lnk_2d_icb) 
     
    5857   PRIVATE 
    5958   ! 
    60    PUBLIC   ctl_stop, ctl_warn, get_unit, ctl_opn, ctl_nam 
    61    PUBLIC   mynode, mppstop, mppsync, mpp_comm_free 
     59   PUBLIC   ctl_stop, ctl_warn, ctl_opn, ctl_nam 
     60   PUBLIC   mpp_start, mppstop, mppsync, mpp_comm_free 
    6261   PUBLIC   mpp_ini_north 
    6362   PUBLIC   mpp_min, mpp_max, mpp_sum, mpp_minloc, mpp_maxloc 
     
    131130   INTEGER, PUBLIC, DIMENSION(:), ALLOCATABLE, SAVE ::   nrank_north   !: dimension ndim_rank_north 
    132131 
    133    ! Type of send : standard, buffered, immediate 
    134    CHARACTER(len=1), PUBLIC ::   cn_mpi_send        !: type od mpi send/recieve (S=standard, B=bsend, I=isend) 
    135    LOGICAL         , PUBLIC ::   l_isend = .FALSE.  !: isend use indicator (T if cn_mpi_send='I') 
    136    INTEGER         , PUBLIC ::   nn_buffer          !: size of the buffer in case of mpi_bsend 
    137  
    138132   ! Communications summary report 
    139133   CHARACTER(len=128), DIMENSION(:), ALLOCATABLE ::   crname_lbc                   !: names of lbc_lnk calling routines 
     
    180174CONTAINS 
    181175 
    182    FUNCTION mynode( ldtxt, ldname, kumnam_ref, kumnam_cfg, kumond, kstop, localComm ) 
    183       !!---------------------------------------------------------------------- 
    184       !!                  ***  routine mynode  *** 
    185       !! 
    186       !! ** Purpose :   Find processor unit 
    187       !!---------------------------------------------------------------------- 
    188       CHARACTER(len=*),DIMENSION(:), INTENT(  out) ::   ldtxt        ! 
    189       CHARACTER(len=*)             , INTENT(in   ) ::   ldname       ! 
    190       INTEGER                      , INTENT(in   ) ::   kumnam_ref   ! logical unit for reference namelist 
    191       INTEGER                      , INTENT(in   ) ::   kumnam_cfg   ! logical unit for configuration namelist 
    192       INTEGER                      , INTENT(inout) ::   kumond       ! logical unit for namelist output 
    193       INTEGER                      , INTENT(inout) ::   kstop        ! stop indicator 
     176   SUBROUTINE mpp_start( localComm ) 
     177      !!---------------------------------------------------------------------- 
     178      !!                  ***  routine mpp_start  *** 
     179      !! 
     180      !! ** Purpose :   get mpi_comm_oce, mpprank and mppsize 
     181      !!---------------------------------------------------------------------- 
    194182      INTEGER         , OPTIONAL   , INTENT(in   ) ::   localComm    ! 
    195183      ! 
    196       INTEGER ::   mynode, ierr, code, ji, ii, ios 
    197       LOGICAL ::   mpi_was_called 
    198       ! 
    199       NAMELIST/nammpp/ cn_mpi_send, nn_buffer, jpni, jpnj, ln_nnogather 
    200       !!---------------------------------------------------------------------- 
    201 #if defined key_mpp_mpi 
    202       ! 
    203       ii = 1 
    204       WRITE(ldtxt(ii),*)                                                                  ;   ii = ii + 1 
    205       WRITE(ldtxt(ii),*) 'mynode : mpi initialisation'                                    ;   ii = ii + 1 
    206       WRITE(ldtxt(ii),*) '~~~~~~ '                                                        ;   ii = ii + 1 
    207       ! 
    208       REWIND( kumnam_ref )              ! Namelist nammpp in reference namelist: mpi variables 
    209       READ  ( kumnam_ref, nammpp, IOSTAT = ios, ERR = 901) 
    210 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nammpp in reference namelist', lwp ) 
    211       ! 
    212       REWIND( kumnam_cfg )              ! Namelist nammpp in configuration namelist: mpi variables 
    213       READ  ( kumnam_cfg, nammpp, IOSTAT = ios, ERR = 902 ) 
    214 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nammpp in configuration namelist', lwp ) 
    215       ! 
    216       !                              ! control print 
    217       WRITE(ldtxt(ii),*) '   Namelist nammpp'                                             ;   ii = ii + 1 
    218       WRITE(ldtxt(ii),*) '      mpi send type          cn_mpi_send = ', cn_mpi_send       ;   ii = ii + 1 
    219       WRITE(ldtxt(ii),*) '      size exported buffer   nn_buffer   = ', nn_buffer,' bytes';   ii = ii + 1 
    220       ! 
    221       IF( jpni < 1 .OR. jpnj < 1  ) THEN 
    222          WRITE(ldtxt(ii),*) '      jpni and jpnj will be calculated automatically' ;   ii = ii + 1 
    223       ELSE 
    224          WRITE(ldtxt(ii),*) '      processor grid extent in i         jpni = ',jpni       ;   ii = ii + 1 
    225          WRITE(ldtxt(ii),*) '      processor grid extent in j         jpnj = ',jpnj       ;   ii = ii + 1 
    226       ENDIF 
    227  
    228       WRITE(ldtxt(ii),*) '      avoid use of mpi_allgather at the north fold  ln_nnogather = ', ln_nnogather  ; ii = ii + 1 
    229  
    230       CALL mpi_initialized ( mpi_was_called, code ) 
    231       IF( code /= MPI_SUCCESS ) THEN 
    232          DO ji = 1, SIZE(ldtxt) 
    233             IF( TRIM(ldtxt(ji)) /= '' )   WRITE(*,*) ldtxt(ji)      ! control print of mynode 
    234          END DO 
    235          WRITE(*, cform_err) 
    236          WRITE(*, *) 'lib_mpp: Error in routine mpi_initialized' 
    237          CALL mpi_abort( mpi_comm_world, code, ierr ) 
    238       ENDIF 
    239  
    240       IF( mpi_was_called ) THEN 
    241          ! 
    242          SELECT CASE ( cn_mpi_send ) 
    243          CASE ( 'S' )                ! Standard mpi send (blocking) 
    244             WRITE(ldtxt(ii),*) '           Standard blocking mpi send (send)'             ;   ii = ii + 1 
    245          CASE ( 'B' )                ! Buffer mpi send (blocking) 
    246             WRITE(ldtxt(ii),*) '           Buffer blocking mpi send (bsend)'              ;   ii = ii + 1 
    247             IF( Agrif_Root() )   CALL mpi_init_oce( ldtxt, ii, ierr ) 
    248          CASE ( 'I' )                ! Immediate mpi send (non-blocking send) 
    249             WRITE(ldtxt(ii),*) '           Immediate non-blocking send (isend)'           ;   ii = ii + 1 
    250             l_isend = .TRUE. 
    251          CASE DEFAULT 
    252             WRITE(ldtxt(ii),cform_err)                                                    ;   ii = ii + 1 
    253             WRITE(ldtxt(ii),*) '           bad value for cn_mpi_send = ', cn_mpi_send     ;   ii = ii + 1 
    254             kstop = kstop + 1 
    255          END SELECT 
    256          ! 
    257       ELSEIF ( PRESENT(localComm) .AND. .NOT. mpi_was_called ) THEN 
    258          WRITE(ldtxt(ii),cform_err)                                                    ;   ii = ii + 1 
    259          WRITE(ldtxt(ii),*) ' lib_mpp: You cannot provide a local communicator '          ;   ii = ii + 1 
    260          WRITE(ldtxt(ii),*) '          without calling MPI_Init before ! '                ;   ii = ii + 1 
    261          kstop = kstop + 1 
    262       ELSE 
    263          SELECT CASE ( cn_mpi_send ) 
    264          CASE ( 'S' )                ! Standard mpi send (blocking) 
    265             WRITE(ldtxt(ii),*) '           Standard blocking mpi send (send)'             ;   ii = ii + 1 
    266             CALL mpi_init( ierr ) 
    267          CASE ( 'B' )                ! Buffer mpi send (blocking) 
    268             WRITE(ldtxt(ii),*) '           Buffer blocking mpi send (bsend)'              ;   ii = ii + 1 
    269             IF( Agrif_Root() )   CALL mpi_init_oce( ldtxt, ii, ierr ) 
    270          CASE ( 'I' )                ! Immediate mpi send (non-blocking send) 
    271             WRITE(ldtxt(ii),*) '           Immediate non-blocking send (isend)'           ;   ii = ii + 1 
    272             l_isend = .TRUE. 
    273             CALL mpi_init( ierr ) 
    274          CASE DEFAULT 
    275             WRITE(ldtxt(ii),cform_err)                                                    ;   ii = ii + 1 
    276             WRITE(ldtxt(ii),*) '           bad value for cn_mpi_send = ', cn_mpi_send     ;   ii = ii + 1 
    277             kstop = kstop + 1 
    278          END SELECT 
    279          ! 
    280       ENDIF 
    281  
     184      INTEGER ::   ierr 
     185      LOGICAL ::   llmpi_init 
     186      !!---------------------------------------------------------------------- 
     187#if defined key_mpp_mpi 
     188      ! 
     189      CALL mpi_initialized ( llmpi_init, ierr ) 
     190      IF( ierr /= MPI_SUCCESS ) CALL ctl_stop( 'STOP', ' lib_mpp: Error in routine mpi_initialized' ) 
     191 
     192      IF( .NOT. llmpi_init ) THEN 
     193         IF( PRESENT(localComm) ) THEN 
     194            WRITE(ctmp1,*) ' lib_mpp: You cannot provide a local communicator ' 
     195            WRITE(ctmp2,*) '          without calling MPI_Init before ! ' 
     196            CALL ctl_stop( 'STOP', ctmp1, ctmp2 ) 
     197         ENDIF 
     198         CALL mpi_init( ierr ) 
     199         IF( ierr /= MPI_SUCCESS ) CALL ctl_stop( 'STOP', ' lib_mpp: Error in routine mpi_init' ) 
     200      ENDIF 
     201        
    282202      IF( PRESENT(localComm) ) THEN 
    283203         IF( Agrif_Root() ) THEN 
     
    285205         ENDIF 
    286206      ELSE 
    287          CALL mpi_comm_dup( mpi_comm_world, mpi_comm_oce, code) 
    288          IF( code /= MPI_SUCCESS ) THEN 
    289             DO ji = 1, SIZE(ldtxt) 
    290                IF( TRIM(ldtxt(ji)) /= '' )   WRITE(*,*) ldtxt(ji)      ! control print of mynode 
    291             END DO 
    292             WRITE(*, cform_err) 
    293             WRITE(*, *) ' lib_mpp: Error in routine mpi_comm_dup' 
    294             CALL mpi_abort( mpi_comm_world, code, ierr ) 
    295          ENDIF 
     207         CALL mpi_comm_dup( mpi_comm_world, mpi_comm_oce, ierr) 
     208         IF( ierr /= MPI_SUCCESS ) CALL ctl_stop( 'STOP', ' lib_mpp: Error in routine mpi_comm_dup' ) 
    296209      ENDIF 
    297210 
     
    306219      CALL mpi_comm_rank( mpi_comm_oce, mpprank, ierr ) 
    307220      CALL mpi_comm_size( mpi_comm_oce, mppsize, ierr ) 
    308       mynode = mpprank 
    309  
    310       IF( mynode == 0 ) THEN 
    311          CALL ctl_opn( kumond, TRIM(ldname), 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 ) 
    312          WRITE(kumond, nammpp)       
    313       ENDIF 
    314221      ! 
    315222      CALL MPI_OP_CREATE(DDPDD_MPI, .TRUE., MPI_SUMDD, ierr) 
     
    317224#else 
    318225      IF( PRESENT( localComm ) ) mpi_comm_oce = localComm 
    319       mynode = 0 
    320       CALL ctl_opn( kumond, TRIM(ldname), 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 ) 
    321 #endif 
    322    END FUNCTION mynode 
     226      mppsize = 1 
     227      mpprank = 0 
     228#endif 
     229   END SUBROUTINE mpp_start 
    323230 
    324231 
     
    340247      ! 
    341248#if defined key_mpp_mpi 
    342       SELECT CASE ( cn_mpi_send ) 
    343       CASE ( 'S' )                ! Standard mpi send (blocking) 
    344          CALL mpi_send ( pmess, kbytes, mpi_double_precision, kdest , ktyp, mpi_comm_oce        , iflag ) 
    345       CASE ( 'B' )                ! Buffer mpi send (blocking) 
    346          CALL mpi_bsend( pmess, kbytes, mpi_double_precision, kdest , ktyp, mpi_comm_oce        , iflag ) 
    347       CASE ( 'I' )                ! Immediate mpi send (non-blocking send) 
    348          ! be carefull, one more argument here : the mpi request identifier.. 
    349          CALL mpi_isend( pmess, kbytes, mpi_double_precision, kdest , ktyp, mpi_comm_oce, md_req, iflag ) 
    350       END SELECT 
     249      CALL mpi_isend( pmess, kbytes, mpi_double_precision, kdest , ktyp, mpi_comm_oce, md_req, iflag ) 
    351250#endif 
    352251      ! 
     
    836735      ! 
    837736      ALLOCATE( kwork(jpnij), STAT=ierr ) 
    838       IF( ierr /= 0 ) THEN 
    839          WRITE(kumout, cform_err) 
    840          WRITE(kumout,*) 'mpp_ini_znl : failed to allocate 1D array of length jpnij' 
    841          CALL mppstop 
    842       ENDIF 
     737      IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'mpp_ini_znl : failed to allocate 1D array of length jpnij') 
    843738 
    844739      IF( jpnj == 1 ) THEN 
     
    968863#endif 
    969864   END SUBROUTINE mpp_ini_north 
    970  
    971  
    972    SUBROUTINE mpi_init_oce( ldtxt, ksft, code ) 
    973       !!--------------------------------------------------------------------- 
    974       !!                   ***  routine mpp_init.opa  *** 
    975       !! 
    976       !! ** Purpose :: export and attach a MPI buffer for bsend 
    977       !! 
    978       !! ** Method  :: define buffer size in namelist, if 0 no buffer attachment 
    979       !!            but classical mpi_init 
    980       !! 
    981       !! History :: 01/11 :: IDRIS initial version for IBM only 
    982       !!            08/04 :: R. Benshila, generalisation 
    983       !!--------------------------------------------------------------------- 
    984       CHARACTER(len=*),DIMENSION(:), INTENT(  out) ::   ldtxt 
    985       INTEGER                      , INTENT(inout) ::   ksft 
    986       INTEGER                      , INTENT(  out) ::   code 
    987       INTEGER                                      ::   ierr, ji 
    988       LOGICAL                                      ::   mpi_was_called 
    989       !!--------------------------------------------------------------------- 
    990 #if defined key_mpp_mpi 
    991       ! 
    992       CALL mpi_initialized( mpi_was_called, code )      ! MPI initialization 
    993       IF ( code /= MPI_SUCCESS ) THEN 
    994          DO ji = 1, SIZE(ldtxt) 
    995             IF( TRIM(ldtxt(ji)) /= '' )   WRITE(*,*) ldtxt(ji)      ! control print of mynode 
    996          END DO 
    997          WRITE(*, cform_err) 
    998          WRITE(*, *) ' lib_mpp: Error in routine mpi_initialized' 
    999          CALL mpi_abort( mpi_comm_world, code, ierr ) 
    1000       ENDIF 
    1001       ! 
    1002       IF( .NOT. mpi_was_called ) THEN 
    1003          CALL mpi_init( code ) 
    1004          CALL mpi_comm_dup( mpi_comm_world, mpi_comm_oce, code ) 
    1005          IF ( code /= MPI_SUCCESS ) THEN 
    1006             DO ji = 1, SIZE(ldtxt) 
    1007                IF( TRIM(ldtxt(ji)) /= '' )   WRITE(*,*) ldtxt(ji)      ! control print of mynode 
    1008             END DO 
    1009             WRITE(*, cform_err) 
    1010             WRITE(*, *) ' lib_mpp: Error in routine mpi_comm_dup' 
    1011             CALL mpi_abort( mpi_comm_world, code, ierr ) 
    1012          ENDIF 
    1013       ENDIF 
    1014       ! 
    1015       IF( nn_buffer > 0 ) THEN 
    1016          WRITE(ldtxt(ksft),*) 'mpi_bsend, buffer allocation of  : ', nn_buffer   ;   ksft = ksft + 1 
    1017          ! Buffer allocation and attachment 
    1018          ALLOCATE( tampon(nn_buffer), stat = ierr ) 
    1019          IF( ierr /= 0 ) THEN 
    1020             DO ji = 1, SIZE(ldtxt) 
    1021                IF( TRIM(ldtxt(ji)) /= '' )   WRITE(*,*) ldtxt(ji)      ! control print of mynode 
    1022             END DO 
    1023             WRITE(*, cform_err) 
    1024             WRITE(*, *) ' lib_mpp: Error in ALLOCATE', ierr 
    1025             CALL mpi_abort( mpi_comm_world, code, ierr ) 
    1026          END IF 
    1027          CALL mpi_buffer_attach( tampon, nn_buffer, code ) 
    1028       ENDIF 
    1029       ! 
    1030 #endif 
    1031    END SUBROUTINE mpi_init_oce 
    1032865 
    1033866 
     
    12401073      !!                increment the error number (nstop) by one. 
    12411074      !!---------------------------------------------------------------------- 
    1242       CHARACTER(len=*), INTENT(in), OPTIONAL ::  cd1, cd2, cd3, cd4, cd5 
    1243       CHARACTER(len=*), INTENT(in), OPTIONAL ::  cd6, cd7, cd8, cd9, cd10 
     1075      CHARACTER(len=*), INTENT(in   )           ::   cd1 
     1076      CHARACTER(len=*), INTENT(in   ), OPTIONAL ::        cd2, cd3, cd4, cd5 
     1077      CHARACTER(len=*), INTENT(in   ), OPTIONAL ::   cd6, cd7, cd8, cd9, cd10 
    12441078      !!---------------------------------------------------------------------- 
    12451079      ! 
    12461080      nstop = nstop + 1 
    1247  
    1248       ! force to open ocean.output file 
     1081      ! 
     1082      ! force to open ocean.output file if not already opened 
    12491083      IF( numout == 6 ) CALL ctl_opn( numout, 'ocean.output', 'APPEND', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    1250         
    1251       WRITE(numout,cform_err) 
    1252       IF( PRESENT(cd1 ) )   WRITE(numout,*) TRIM(cd1) 
     1084      ! 
     1085                            WRITE(numout,*) 
     1086                            WRITE(numout,*) ' ===>>> : E R R O R' 
     1087                            WRITE(numout,*) 
     1088                            WRITE(numout,*) '         ===========' 
     1089                            WRITE(numout,*) 
     1090                            WRITE(numout,*) TRIM(cd1) 
    12531091      IF( PRESENT(cd2 ) )   WRITE(numout,*) TRIM(cd2) 
    12541092      IF( PRESENT(cd3 ) )   WRITE(numout,*) TRIM(cd3) 
     
    12601098      IF( PRESENT(cd9 ) )   WRITE(numout,*) TRIM(cd9) 
    12611099      IF( PRESENT(cd10) )   WRITE(numout,*) TRIM(cd10) 
    1262  
     1100                            WRITE(numout,*) 
     1101      ! 
    12631102                               CALL FLUSH(numout    ) 
    12641103      IF( numstp     /= -1 )   CALL FLUSH(numstp    ) 
     
    12671106      ! 
    12681107      IF( cd1 == 'STOP' ) THEN 
     1108         WRITE(numout,*)   
    12691109         WRITE(numout,*)  'huge E-R-R-O-R : immediate stop' 
    1270          CALL mppstop(ld_force_abort = .true.) 
     1110         WRITE(numout,*)   
     1111         CALL mppstop( ld_force_abort = .true. ) 
    12711112      ENDIF 
    12721113      ! 
     
    12871128      ! 
    12881129      nwarn = nwarn + 1 
     1130      ! 
    12891131      IF(lwp) THEN 
    1290          WRITE(numout,cform_war) 
    1291          IF( PRESENT(cd1 ) ) WRITE(numout,*) TRIM(cd1) 
    1292          IF( PRESENT(cd2 ) ) WRITE(numout,*) TRIM(cd2) 
    1293          IF( PRESENT(cd3 ) ) WRITE(numout,*) TRIM(cd3) 
    1294          IF( PRESENT(cd4 ) ) WRITE(numout,*) TRIM(cd4) 
    1295          IF( PRESENT(cd5 ) ) WRITE(numout,*) TRIM(cd5) 
    1296          IF( PRESENT(cd6 ) ) WRITE(numout,*) TRIM(cd6) 
    1297          IF( PRESENT(cd7 ) ) WRITE(numout,*) TRIM(cd7) 
    1298          IF( PRESENT(cd8 ) ) WRITE(numout,*) TRIM(cd8) 
    1299          IF( PRESENT(cd9 ) ) WRITE(numout,*) TRIM(cd9) 
    1300          IF( PRESENT(cd10) ) WRITE(numout,*) TRIM(cd10) 
     1132                               WRITE(numout,*) 
     1133                               WRITE(numout,*) ' ===>>> : W A R N I N G' 
     1134                               WRITE(numout,*) 
     1135                               WRITE(numout,*) '         ===============' 
     1136                               WRITE(numout,*) 
     1137         IF( PRESENT(cd1 ) )   WRITE(numout,*) TRIM(cd1) 
     1138         IF( PRESENT(cd2 ) )   WRITE(numout,*) TRIM(cd2) 
     1139         IF( PRESENT(cd3 ) )   WRITE(numout,*) TRIM(cd3) 
     1140         IF( PRESENT(cd4 ) )   WRITE(numout,*) TRIM(cd4) 
     1141         IF( PRESENT(cd5 ) )   WRITE(numout,*) TRIM(cd5) 
     1142         IF( PRESENT(cd6 ) )   WRITE(numout,*) TRIM(cd6) 
     1143         IF( PRESENT(cd7 ) )   WRITE(numout,*) TRIM(cd7) 
     1144         IF( PRESENT(cd8 ) )   WRITE(numout,*) TRIM(cd8) 
     1145         IF( PRESENT(cd9 ) )   WRITE(numout,*) TRIM(cd9) 
     1146         IF( PRESENT(cd10) )   WRITE(numout,*) TRIM(cd10) 
     1147                               WRITE(numout,*) 
    13011148      ENDIF 
    13021149      CALL FLUSH(numout) 
     
    13411188      IF( TRIM(cdfile) == '/dev/null' )   clfile = TRIM(cdfile)   ! force the use of /dev/null 
    13421189      ! 
    1343       iost=0 
    1344       IF( cdacce(1:6) == 'DIRECT' )  THEN         ! cdacce has always more than 6 characters 
     1190      IF(       cdacce(1:6) == 'DIRECT' )  THEN   ! cdacce has always more than 6 characters 
    13451191         OPEN( UNIT=knum, FILE=clfile, FORM=cdform, ACCESS=cdacce, STATUS=cdstat, RECL=klengh         , ERR=100, IOSTAT=iost ) 
    13461192      ELSE IF( TRIM(cdstat) == 'APPEND' )  THEN   ! cdstat can have less than 6 characters 
     
    13631209100   CONTINUE 
    13641210      IF( iost /= 0 ) THEN 
    1365          IF(ldwp) THEN 
    1366             WRITE(kout,*) 
    1367             WRITE(kout,*) ' ===>>>> : bad opening file: ', TRIM(clfile) 
    1368             WRITE(kout,*) ' =======   ===  ' 
    1369             WRITE(kout,*) '           unit   = ', knum 
    1370             WRITE(kout,*) '           status = ', cdstat 
    1371             WRITE(kout,*) '           form   = ', cdform 
    1372             WRITE(kout,*) '           access = ', cdacce 
    1373             WRITE(kout,*) '           iostat = ', iost 
    1374             WRITE(kout,*) '           we stop. verify the file ' 
    1375             WRITE(kout,*) 
    1376          ELSE  !!! Force writing to make sure we get the information - at least once - in this violent STOP!! 
    1377             WRITE(*,*) 
    1378             WRITE(*,*) ' ===>>>> : bad opening file: ', TRIM(clfile) 
    1379             WRITE(*,*) ' =======   ===  ' 
    1380             WRITE(*,*) '           unit   = ', knum 
    1381             WRITE(*,*) '           status = ', cdstat 
    1382             WRITE(*,*) '           form   = ', cdform 
    1383             WRITE(*,*) '           access = ', cdacce 
    1384             WRITE(*,*) '           iostat = ', iost 
    1385             WRITE(*,*) '           we stop. verify the file ' 
    1386             WRITE(*,*) 
    1387          ENDIF 
    1388          CALL FLUSH( kout )  
    1389          STOP 'ctl_opn bad opening' 
     1211         WRITE(ctmp1,*) ' ===>>>> : bad opening file: ', TRIM(clfile) 
     1212         WRITE(ctmp2,*) ' =======   ===  ' 
     1213         WRITE(ctmp3,*) '           unit   = ', knum 
     1214         WRITE(ctmp4,*) '           status = ', cdstat 
     1215         WRITE(ctmp5,*) '           form   = ', cdform 
     1216         WRITE(ctmp6,*) '           access = ', cdacce 
     1217         WRITE(ctmp7,*) '           iostat = ', iost 
     1218         WRITE(ctmp8,*) '           we stop. verify the file ' 
     1219         CALL ctl_stop( 'STOP', ctmp1, ctmp2, ctmp3, ctmp4, ctmp5, ctmp6, ctmp7, ctmp8 ) 
    13901220      ENDIF 
    13911221      ! 
     
    13931223 
    13941224 
    1395    SUBROUTINE ctl_nam ( kios, cdnam, ldwp ) 
     1225   SUBROUTINE ctl_nam ( kios, cdnam ) 
    13961226      !!---------------------------------------------------------------------- 
    13971227      !!                  ***  ROUTINE ctl_nam  *** 
     
    14011231      !! ** Method  :   Fortan open 
    14021232      !!---------------------------------------------------------------------- 
    1403       INTEGER         , INTENT(inout) ::   kios    ! IO status after reading the namelist 
    1404       CHARACTER(len=*), INTENT(in   ) ::   cdnam   ! group name of namelist for which error occurs 
    1405       CHARACTER(len=5)                ::   clios   ! string to convert iostat in character for print 
    1406       LOGICAL         , INTENT(in   ) ::   ldwp    ! boolean term for print 
     1233      INTEGER                                , INTENT(inout) ::   kios    ! IO status after reading the namelist 
     1234      CHARACTER(len=*)                       , INTENT(in   ) ::   cdnam   ! group name of namelist for which error occurs 
     1235      ! 
     1236      CHARACTER(len=5) ::   clios   ! string to convert iostat in character for print 
    14071237      !!---------------------------------------------------------------------- 
    14081238      ! 
     
    14181248      ENDIF 
    14191249      kios = 0 
    1420       RETURN 
    14211250      ! 
    14221251   END SUBROUTINE ctl_nam 
     
    14391268      END DO 
    14401269      IF( (get_unit == 999) .AND. llopn ) THEN 
    1441          CALL ctl_stop( 'get_unit: All logical units until 999 are used...' ) 
    1442          get_unit = -1 
     1270         CALL ctl_stop( 'STOP', 'get_unit: All logical units until 999 are used...' ) 
    14431271      ENDIF 
    14441272      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/mpp_nfd_generic.h90

    r10440 r11317  
    7676      ipf = F_SIZE(ptab)   ! 5th    -      use in "multi" case (array of pointers) 
    7777      ! 
    78       IF( l_north_nogather ) THEN      !==  ????  ==! 
     78      IF( l_north_nogather ) THEN      !==  no allgather exchanges  ==! 
    7979 
    8080         ALLOCATE(ipj_s(ipf)) 
     
    200200            ENDIF 
    201201         END DO 
    202          IF( l_isend ) THEN 
    203             DO jr = 1,nsndto 
    204                IF( nfipproc(isendto(jr),jpnj) /= narea-1 .AND. nfipproc(isendto(jr),jpnj) /= -1 ) THEN 
    205                   CALL mpi_wait( ml_req_nf(jr), ml_stat, ml_err ) 
    206                ENDIF 
    207             END DO 
    208          ENDIF 
     202         DO jr = 1,nsndto 
     203            IF( nfipproc(isendto(jr),jpnj) /= narea-1 .AND. nfipproc(isendto(jr),jpnj) /= -1 ) THEN 
     204               CALL mpi_wait( ml_req_nf(jr), ml_stat, ml_err ) 
     205            ENDIF 
     206         END DO 
    209207         ! 
    210208         IF( ln_timing ) CALL tic_tac(.FALSE.) 
     
    213211         ! 
    214212         DO jf = 1, ipf 
    215             CALL lbc_nfd_nogather(ARRAY_IN(:,:,:,:,jf), ztabr(:,1:ipj_s(jf),:,:,jf), cd_nat LBC_ARG, psgn LBC_ARG ) 
    216          END DO 
    217          ! 
    218          DEALLOCATE( zfoldwk ) 
    219          DEALLOCATE( ztabr )  
    220          DEALLOCATE( jj_s )  
    221          DEALLOCATE( ipj_s )  
    222       ELSE                             !==  ????  ==! 
     213            CALL lbc_nfd_nogather( ARRAY_IN(:,:,:,:,jf), ztabr(:,1:ipj_s(jf),:,:,jf), cd_nat LBC_ARG, psgn LBC_ARG ) 
     214         END DO 
     215         ! 
     216         DEALLOCATE( zfoldwk, ztabr, jj_s, ipj_s ) 
     217         ! 
     218      ELSE                             !==  allgather exchanges  ==! 
    223219         ! 
    224220         ipj   = 4            ! 2nd dimension of message transfers (last j-lines) 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/mppini.F90

    r11263 r11317  
    168168           &             rn_ice_tem, rn_ice_sal, rn_ice_age,                     & 
    169169           &             ln_vol, nn_volctl, nn_rimwidth 
    170       !!---------------------------------------------------------------------- 
    171  
     170      NAMELIST/nammpp/ jpni, jpnj, ln_nnogather 
     171      !!---------------------------------------------------------------------- 
     172      ! 
    172173      llwrtlay = lwp .OR. ln_ctl .OR. sn_cfctl%l_layout 
     174      ! 
     175      !  0. read namelists parameters 
     176      ! ----------------------------------- 
     177      ! 
     178      REWIND( numnam_ref )              ! Namelist nammpp in reference namelist 
     179      READ  ( numnam_ref, nammpp, IOSTAT = ios, ERR = 901 ) 
     180901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nammpp in reference namelist' ) 
     181      REWIND( numnam_cfg )              ! Namelist nammpp in confguration namelist 
     182      READ  ( numnam_cfg, nammpp, IOSTAT = ios, ERR = 902 ) 
     183902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nammpp in configuration namelist' )    
     184      ! 
     185      IF(lwp) THEN 
     186            WRITE(numout,*) '   Namelist nammpp' 
     187         IF( jpni < 1 .OR. jpnj < 1  ) THEN 
     188            WRITE(numout,*) '      jpni and jpnj will be calculated automatically' 
     189         ELSE 
     190            WRITE(numout,*) '      processor grid extent in i                            jpni = ', jpni 
     191            WRITE(numout,*) '      processor grid extent in j                            jpnj = ', jpnj 
     192         ENDIF 
     193            WRITE(numout,*) '      avoid use of mpi_allgather at the north fold  ln_nnogather = ', ln_nnogather 
     194      ENDIF 
     195      ! 
     196      IF(lwm)   WRITE( numond, nammpp ) 
     197 
    173198      ! do we need to take into account bdy_msk? 
    174199      REWIND( numnam_ref )              ! Namelist nambdy in reference namelist : BDY 
    175200      READ  ( numnam_ref, nambdy, IOSTAT = ios, ERR = 903) 
    176 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy in reference namelist (mppini)', lwp ) 
     201903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy in reference namelist (mppini)' ) 
    177202      REWIND( numnam_cfg )              ! Namelist nambdy in configuration namelist : BDY 
    178203      READ  ( numnam_cfg, nambdy, IOSTAT = ios, ERR = 904 ) 
    179 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy in configuration namelist (mppini)', lwp ) 
     204904   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy in configuration namelist (mppini)' ) 
    180205      ! 
    181206      IF(               ln_read_cfg ) CALL iom_open( cn_domcfg,    numbot ) 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LDF/ldfdyn.F90

    r10784 r11317  
    117117      REWIND( numnam_ref )              ! Namelist namdyn_ldf in reference namelist : Lateral physics 
    118118      READ  ( numnam_ref, namdyn_ldf, IOSTAT = ios, ERR = 901) 
    119 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_ldf in reference namelist', lwp ) 
     119901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_ldf in reference namelist' ) 
    120120 
    121121      REWIND( numnam_cfg )              ! Namelist namdyn_ldf in configuration namelist : Lateral physics 
    122122      READ  ( numnam_cfg, namdyn_ldf, IOSTAT = ios, ERR = 902 ) 
    123 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_ldf in configuration namelist', lwp ) 
     123902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_ldf in configuration namelist' ) 
    124124      IF(lwm) WRITE ( numond, namdyn_ldf ) 
    125125 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LDF/ldftra.F90

    r10425 r11317  
    154154      REWIND( numnam_ref )              ! Namelist namtra_ldf in reference namelist : Lateral physics on tracers 
    155155      READ  ( numnam_ref, namtra_ldf, IOSTAT = ios, ERR = 901) 
    156 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_ldf in reference namelist', lwp ) 
     156901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_ldf in reference namelist' ) 
    157157      REWIND( numnam_cfg )              ! Namelist namtra_ldf in configuration namelist : Lateral physics on tracers 
    158158      READ  ( numnam_cfg, namtra_ldf, IOSTAT = ios, ERR = 902 ) 
    159 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_ldf in configuration namelist', lwp ) 
     159902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_ldf in configuration namelist' ) 
    160160      IF(lwm) WRITE( numond, namtra_ldf ) 
    161161      ! 
     
    512512      REWIND( numnam_ref )              ! Namelist namtra_eiv in reference namelist : eddy induced velocity param. 
    513513      READ  ( numnam_ref, namtra_eiv, IOSTAT = ios, ERR = 901) 
    514 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_eiv in reference namelist', lwp ) 
     514901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_eiv in reference namelist' ) 
    515515      ! 
    516516      REWIND( numnam_cfg )              ! Namelist namtra_eiv in configuration namelist : eddy induced velocity param. 
    517517      READ  ( numnam_cfg, namtra_eiv, IOSTAT = ios, ERR = 902 ) 
    518 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_eiv in configuration namelist', lwp ) 
     518902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_eiv in configuration namelist' ) 
    519519      IF(lwm)  WRITE ( numond, namtra_eiv ) 
    520520 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/OBS/diaobs.F90

    r10068 r11317  
    203203      REWIND( numnam_ref )   ! Namelist namobs in reference namelist 
    204204      READ  ( numnam_ref, namobs, IOSTAT = ios, ERR = 901) 
    205 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namobs in reference namelist', lwp ) 
     205901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namobs in reference namelist' ) 
    206206      REWIND( numnam_cfg )   ! Namelist namobs in configuration namelist 
    207207      READ  ( numnam_cfg, namobs, IOSTAT = ios, ERR = 902 ) 
    208 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namobs in configuration namelist', lwp ) 
     208902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namobs in configuration namelist' ) 
    209209      IF(lwm) WRITE ( numond, namobs ) 
    210210 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcapr.F90

    r11263 r11317  
    7171      REWIND( numnam_ref )              ! Namelist namsbc_apr in reference namelist : File for atmospheric pressure forcing 
    7272      READ  ( numnam_ref, namsbc_apr, IOSTAT = ios, ERR = 901) 
    73 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_apr in reference namelist', lwp ) 
     73901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_apr in reference namelist' ) 
    7474 
    7575      REWIND( numnam_cfg )              ! Namelist namsbc_apr in configuration namelist : File for atmospheric pressure forcing 
    7676      READ  ( numnam_cfg, namsbc_apr, IOSTAT = ios, ERR = 902 ) 
    77 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_apr in configuration namelist', lwp ) 
     77902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_apr in configuration namelist' ) 
    7878      IF(lwm) WRITE ( numond, namsbc_apr ) 
    7979      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcblk.F90

    r11267 r11317  
    182182      REWIND( numnam_ref )                !* Namelist namsbc_blk in reference namelist : bulk parameters 
    183183      READ  ( numnam_ref, namsbc_blk, IOSTAT = ios, ERR = 901) 
    184 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_blk in reference namelist', lwp ) 
     184901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_blk in reference namelist' ) 
    185185      ! 
    186186      REWIND( numnam_cfg )                !* Namelist namsbc_blk in configuration namelist : bulk parameters 
    187187      READ  ( numnam_cfg, namsbc_blk, IOSTAT = ios, ERR = 902 ) 
    188 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_blk in configuration namelist', lwp ) 
     188902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_blk in configuration namelist' ) 
    189189      ! 
    190190      IF(lwm) WRITE( numond, namsbc_blk ) 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbccpl.F90

    r10617 r11317  
    266266      REWIND( numnam_ref )              ! Namelist namsbc_cpl in reference namelist : Variables for OASIS coupling 
    267267      READ  ( numnam_ref, namsbc_cpl, IOSTAT = ios, ERR = 901) 
    268 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_cpl in reference namelist', lwp ) 
     268901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_cpl in reference namelist' ) 
    269269      ! 
    270270      REWIND( numnam_cfg )              ! Namelist namsbc_cpl in configuration namelist : Variables for OASIS coupling 
    271271      READ  ( numnam_cfg, namsbc_cpl, IOSTAT = ios, ERR = 902 ) 
    272 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_cpl in configuration namelist', lwp ) 
     272902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_cpl in configuration namelist' ) 
    273273      IF(lwm) WRITE ( numond, namsbc_cpl ) 
    274274      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcflx.F90

    r11267 r11317  
    9393         REWIND( numnam_ref )              ! Namelist namsbc_flx in reference namelist : Files for fluxes 
    9494         READ  ( numnam_ref, namsbc_flx, IOSTAT = ios, ERR = 901) 
    95 901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_flx in reference namelist', lwp ) 
     95901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_flx in reference namelist' ) 
    9696 
    9797         REWIND( numnam_cfg )              ! Namelist namsbc_flx in configuration namelist : Files for fluxes 
    9898         READ  ( numnam_cfg, namsbc_flx, IOSTAT = ios, ERR = 902 ) 
    99 902      IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_flx in configuration namelist', lwp ) 
     99902      IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_flx in configuration namelist' ) 
    100100         IF(lwm) WRITE ( numond, namsbc_flx )  
    101101         ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcice_cice.F90

    r10425 r11317  
    764764         REWIND( numnam_ref )              ! Namelist namsbc_cice in reference namelist :  
    765765         READ  ( numnam_ref, namsbc_cice, IOSTAT = ios, ERR = 901) 
    766 901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_cice in reference namelist', lwp ) 
     766901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_cice in reference namelist' ) 
    767767 
    768768         REWIND( numnam_cfg )              ! Namelist namsbc_cice in configuration namelist : Parameters of the run 
    769769         READ  ( numnam_cfg, namsbc_cice, IOSTAT = ios, ERR = 902 ) 
    770 902      IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_cice in configuration namelist', lwp ) 
     770902      IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_cice in configuration namelist' ) 
    771771         IF(lwm) WRITE ( numond, namsbc_cice ) 
    772772 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcice_if.F90

    r10068 r11317  
    7676         REWIND( numnam_ref )              ! Namelist namsbc_iif in reference namelist : Ice if file 
    7777         READ  ( numnam_ref, namsbc_iif, IOSTAT = ios, ERR = 901) 
    78 901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_iif in reference namelist', lwp ) 
     78901      IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_iif in reference namelist' ) 
    7979 
    8080         REWIND( numnam_cfg )              ! Namelist Namelist namsbc_iif in configuration namelist : Ice if file 
    8181         READ  ( numnam_cfg, namsbc_iif, IOSTAT = ios, ERR = 902 ) 
    82 902      IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_iif in configuration namelist', lwp ) 
     82902      IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_iif in configuration namelist' ) 
    8383         IF(lwm) WRITE ( numond, namsbc_iif ) 
    8484 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcisf.F90

    r10536 r11317  
    278278      REWIND( numnam_ref )              ! Namelist namsbc_rnf in reference namelist : Runoffs  
    279279      READ  ( numnam_ref, namsbc_isf, IOSTAT = ios, ERR = 901) 
    280 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_isf in reference namelist', lwp ) 
     280901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_isf in reference namelist' ) 
    281281 
    282282      REWIND( numnam_cfg )              ! Namelist namsbc_rnf in configuration namelist : Runoffs 
    283283      READ  ( numnam_cfg, namsbc_isf, IOSTAT = ios, ERR = 902 ) 
    284 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_isf in configuration namelist', lwp ) 
     284902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_isf in configuration namelist' ) 
    285285      IF(lwm) WRITE ( numond, namsbc_isf ) 
    286286 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcmod.F90

    r10499 r11317  
    110110      REWIND( numnam_ref )          !* Namelist namsbc in reference namelist : Surface boundary 
    111111      READ  ( numnam_ref, namsbc, IOSTAT = ios, ERR = 901) 
    112 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc in reference namelist', lwp ) 
     112901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc in reference namelist' ) 
    113113      REWIND( numnam_cfg )          !* Namelist namsbc in configuration namelist : Parameters of the run 
    114114      READ  ( numnam_cfg, namsbc, IOSTAT = ios, ERR = 902 ) 
    115 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc in configuration namelist', lwp ) 
     115902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc in configuration namelist' ) 
    116116      IF(lwm) WRITE( numond, namsbc ) 
    117117      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcrnf.F90

    r10523 r11317  
    267267      REWIND( numnam_ref )              ! Namelist namsbc_rnf in reference namelist : Runoffs  
    268268      READ  ( numnam_ref, namsbc_rnf, IOSTAT = ios, ERR = 901) 
    269 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_rnf in reference namelist', lwp ) 
     269901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_rnf in reference namelist' ) 
    270270 
    271271      REWIND( numnam_cfg )              ! Namelist namsbc_rnf in configuration namelist : Runoffs 
    272272      READ  ( numnam_cfg, namsbc_rnf, IOSTAT = ios, ERR = 902 ) 
    273 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_rnf in configuration namelist', lwp ) 
     273902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_rnf in configuration namelist' ) 
    274274      IF(lwm) WRITE ( numond, namsbc_rnf ) 
    275275      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcssr.F90

    r10068 r11317  
    166166      REWIND( numnam_ref )              ! Namelist namsbc_ssr in reference namelist :  
    167167      READ  ( numnam_ref, namsbc_ssr, IOSTAT = ios, ERR = 901) 
    168 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_ssr in reference namelist', lwp ) 
     168901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_ssr in reference namelist' ) 
    169169 
    170170      REWIND( numnam_cfg )              ! Namelist namsbc_ssr in configuration namelist : 
    171171      READ  ( numnam_cfg, namsbc_ssr, IOSTAT = ios, ERR = 902 ) 
    172 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_ssr in configuration namelist', lwp ) 
     172902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_ssr in configuration namelist' ) 
    173173      IF(lwm) WRITE ( numond, namsbc_ssr ) 
    174174 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcwave.F90

    r10425 r11317  
    397397      REWIND( numnam_ref )              ! Namelist namsbc_wave in reference namelist : File for drag coeff. from wave model 
    398398      READ  ( numnam_ref, namsbc_wave, IOSTAT = ios, ERR = 901) 
    399 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_wave in reference namelist', lwp ) 
     399901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_wave in reference namelist' ) 
    400400          
    401401      REWIND( numnam_cfg )              ! Namelist namsbc_wave in configuration namelist : File for drag coeff. from wave model 
    402402      READ  ( numnam_cfg, namsbc_wave, IOSTAT = ios, ERR = 902 ) 
    403 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_wave in configuration namelist', lwp ) 
     403902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_wave in configuration namelist' ) 
    404404      IF(lwm) WRITE ( numond, namsbc_wave ) 
    405405      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/tideini.F90

    r10068 r11317  
    6060      REWIND( numnam_ref )              ! Namelist nam_tide in reference namelist : Tides 
    6161      READ  ( numnam_ref, nam_tide, IOSTAT = ios, ERR = 901) 
    62 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_tide in reference namelist', lwp ) 
     62901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_tide in reference namelist' ) 
    6363      ! 
    6464      REWIND( numnam_cfg )              ! Namelist nam_tide in configuration namelist : Tides 
    6565      READ  ( numnam_cfg, nam_tide, IOSTAT = ios, ERR = 902 ) 
    66 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_tide in configuration namelist', lwp ) 
     66902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nam_tide in configuration namelist' ) 
    6767      IF(lwm) WRITE ( numond, nam_tide ) 
    6868      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/STO/stopar.F90

    r10425 r11317  
    263263      REWIND( numnam_ref )              ! Namelist namdyn_adv in reference namelist : Momentum advection scheme 
    264264      READ  ( numnam_ref, namsto, IOSTAT = ios, ERR = 901) 
    265 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsto in reference namelist', lwp ) 
     265901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsto in reference namelist' ) 
    266266 
    267267      REWIND( numnam_cfg )              ! Namelist namdyn_adv in configuration namelist : Momentum advection scheme 
    268268      READ  ( numnam_cfg, namsto, IOSTAT = ios, ERR = 902 ) 
    269 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namsto in configuration namelist', lwp ) 
     269902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namsto in configuration namelist' ) 
    270270      IF(lwm) WRITE ( numond, namsto ) 
    271271 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRA/eosbn2.F90

    r10425 r11317  
    12351235      REWIND( numnam_ref )              ! Namelist nameos in reference namelist : equation of state 
    12361236      READ  ( numnam_ref, nameos, IOSTAT = ios, ERR = 901 ) 
    1237 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nameos in reference namelist', lwp ) 
     1237901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nameos in reference namelist' ) 
    12381238      ! 
    12391239      REWIND( numnam_cfg )              ! Namelist nameos in configuration namelist : equation of state 
    12401240      READ  ( numnam_cfg, nameos, IOSTAT = ios, ERR = 902 ) 
    1241 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nameos in configuration namelist', lwp ) 
     1241902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nameos in configuration namelist' ) 
    12421242      IF(lwm) WRITE( numond, nameos ) 
    12431243      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRA/traadv.F90

    r10068 r11317  
    196196      REWIND( numnam_ref )                   ! Namelist namtra_adv in reference namelist : Tracer advection scheme 
    197197      READ  ( numnam_ref, namtra_adv, IOSTAT = ios, ERR = 901) 
    198 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_adv in reference namelist', lwp ) 
     198901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_adv in reference namelist' ) 
    199199      ! 
    200200      REWIND( numnam_cfg )                   ! Namelist namtra_adv in configuration namelist : Tracer advection scheme 
    201201      READ  ( numnam_cfg, namtra_adv, IOSTAT = ios, ERR = 902 ) 
    202 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_adv in configuration namelist', lwp ) 
     202902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_adv in configuration namelist' ) 
    203203      IF(lwm) WRITE( numond, namtra_adv ) 
    204204      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRA/trabbc.F90

    r10425 r11317  
    135135      REWIND( numnam_ref )              ! Namelist nambbc in reference namelist : Bottom momentum boundary condition 
    136136      READ  ( numnam_ref, nambbc, IOSTAT = ios, ERR = 901) 
    137 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambbc in reference namelist', lwp ) 
     137901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambbc in reference namelist' ) 
    138138      ! 
    139139      REWIND( numnam_cfg )              ! Namelist nambbc in configuration namelist : Bottom momentum boundary condition 
    140140      READ  ( numnam_cfg, nambbc, IOSTAT = ios, ERR = 902 ) 
    141 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambbc in configuration namelist', lwp ) 
     141902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambbc in configuration namelist' ) 
    142142      IF(lwm) WRITE ( numond, nambbc ) 
    143143      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRA/trabbl.F90

    r10425 r11317  
    485485      REWIND( numnam_ref )              ! Namelist nambbl in reference namelist : Bottom boundary layer scheme 
    486486      READ  ( numnam_ref, nambbl, IOSTAT = ios, ERR = 901) 
    487 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambbl in reference namelist', lwp ) 
     487901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambbl in reference namelist' ) 
    488488      ! 
    489489      REWIND( numnam_cfg )              ! Namelist nambbl in configuration namelist : Bottom boundary layer scheme 
    490490      READ  ( numnam_cfg, nambbl, IOSTAT = ios, ERR = 902 ) 
    491 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambbl in configuration namelist', lwp ) 
     491902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambbl in configuration namelist' ) 
    492492      IF(lwm) WRITE ( numond, nambbl ) 
    493493      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRA/tradmp.F90

    r10425 r11317  
    179179      REWIND( numnam_ref )   ! Namelist namtra_dmp in reference namelist : T & S relaxation 
    180180      READ  ( numnam_ref, namtra_dmp, IOSTAT = ios, ERR = 901) 
    181 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_dmp in reference namelist', lwp ) 
     181901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_dmp in reference namelist' ) 
    182182      ! 
    183183      REWIND( numnam_cfg )   ! Namelist namtra_dmp in configuration namelist : T & S relaxation 
    184184      READ  ( numnam_cfg, namtra_dmp, IOSTAT = ios, ERR = 902 ) 
    185 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_dmp in configuration namelist', lwp ) 
     185902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_dmp in configuration namelist' ) 
    186186      IF(lwm) WRITE ( numond, namtra_dmp ) 
    187187      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRA/tramle.F90

    r10425 r11317  
    268268      REWIND( numnam_ref )              ! Namelist namtra_mle in reference namelist : Tracer advection scheme 
    269269      READ  ( numnam_ref, namtra_mle, IOSTAT = ios, ERR = 901) 
    270 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_mle in reference namelist', lwp ) 
     270901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_mle in reference namelist' ) 
    271271 
    272272      REWIND( numnam_cfg )              ! Namelist namtra_mle in configuration namelist : Tracer advection scheme 
    273273      READ  ( numnam_cfg, namtra_mle, IOSTAT = ios, ERR = 902 ) 
    274 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_mle in configuration namelist', lwp ) 
     274902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_mle in configuration namelist' ) 
    275275      IF(lwm) WRITE ( numond, namtra_mle ) 
    276276 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRA/traqsr.F90

    r10425 r11317  
    338338      REWIND( numnam_ref )              ! Namelist namtra_qsr in reference     namelist 
    339339      READ  ( numnam_ref, namtra_qsr, IOSTAT = ios, ERR = 901) 
    340 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_qsr in reference namelist', lwp ) 
     340901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_qsr in reference namelist' ) 
    341341      ! 
    342342      REWIND( numnam_cfg )              ! Namelist namtra_qsr in configuration namelist 
    343343      READ  ( numnam_cfg, namtra_qsr, IOSTAT = ios, ERR = 902 ) 
    344 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_qsr in configuration namelist', lwp ) 
     344902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtra_qsr in configuration namelist' ) 
    345345      IF(lwm) WRITE ( numond, namtra_qsr ) 
    346346      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRD/trdini.F90

    r10068 r11317  
    4848      REWIND( numnam_ref )              ! Namelist namtrd in reference namelist : trends diagnostic 
    4949      READ  ( numnam_ref, namtrd, IOSTAT = ios, ERR = 901 ) 
    50 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrd in reference namelist', lwp ) 
     50901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrd in reference namelist' ) 
    5151      ! 
    5252      REWIND( numnam_cfg )              ! Namelist namtrd in configuration namelist : trends diagnostic 
    5353      READ  ( numnam_cfg, namtrd, IOSTAT = ios, ERR = 902 ) 
    54 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrd in configuration namelist', lwp ) 
     54902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrd in configuration namelist' ) 
    5555      IF(lwm) WRITE( numond, namtrd ) 
    5656      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRD/trdmxl.F90

    r10425 r11317  
    734734      REWIND( numnam_ref )              ! Namelist namtrd_mxl in reference namelist : mixed layer trends diagnostic 
    735735      READ  ( numnam_ref, namtrd_mxl, IOSTAT = ios, ERR = 901 ) 
    736 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrd_mxl in reference namelist', lwp ) 
     736901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrd_mxl in reference namelist' ) 
    737737 
    738738      REWIND( numnam_cfg )              ! Namelist namtrd_mxl in configuration namelist : mixed layer trends diagnostic 
    739739      READ  ( numnam_cfg, namtrd_mxl, IOSTAT = ios, ERR = 902 ) 
    740 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrd_mxl in configuration namelist', lwp ) 
     740902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrd_mxl in configuration namelist' ) 
    741741      IF(lwm) WRITE( numond, namtrd_mxl ) 
    742742      ! 
     
    764764 
    765765      IF( MOD( nitend, nn_trd ) /= 0 ) THEN 
    766          WRITE(numout,cform_err) 
    767          WRITE(numout,*) '                Your nitend parameter, nitend = ', nitend 
    768          WRITE(numout,*) '                is no multiple of the trends diagnostics frequency        ' 
    769          WRITE(numout,*) '                          you defined, nn_trd   = ', nn_trd 
    770          WRITE(numout,*) '                This will not allow you to restart from this simulation.  ' 
    771          WRITE(numout,*) '                You should reconsider this choice.                        '  
    772          WRITE(numout,*)  
    773          WRITE(numout,*) '                N.B. the nitend parameter is also constrained to be a     ' 
    774          WRITE(numout,*) '                     multiple of the nn_fsbc parameter ' 
    775          CALL ctl_stop( 'trd_mxl_init: see comment just above' ) 
     766         WRITE(ctmp1,*) '                Your nitend parameter, nitend = ', nitend 
     767         WRITE(ctmp2,*) '                is no multiple of the trends diagnostics frequency        ' 
     768         WRITE(ctmp3,*) '                          you defined, nn_trd   = ', nn_trd 
     769         WRITE(ctmp4,*) '                This will not allow you to restart from this simulation.  ' 
     770         WRITE(ctmp5,*) '                You should reconsider this choice.                        '  
     771         WRITE(ctmp6,*)  
     772         WRITE(ctmp7,*) '                N.B. the nitend parameter is also constrained to be a     ' 
     773         WRITE(ctmp8,*) '                     multiple of the nn_fsbc parameter ' 
     774         CALL ctl_stop( ctmp1, ctmp2, ctmp3, ctmp4, ctmp5, ctmp6, ctmp7, ctmp8 ) 
    776775      END IF 
    777776 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/USR/usrdef_nam.F90

    r10069 r11317  
    3737CONTAINS 
    3838 
    39    SUBROUTINE usr_def_nam( ldtxt, ldnam, cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     39   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
    4040      !!---------------------------------------------------------------------- 
    4141      !!                     ***  ROUTINE dom_nam  *** 
     
    4949      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5050      !!---------------------------------------------------------------------- 
    51       CHARACTER(len=*), DIMENSION(:), INTENT(out) ::   ldtxt, ldnam    ! stored print information 
    52       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    53       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    54       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    55       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     51      CHARACTER(len=*), INTENT(out) ::   cd_cfg          ! configuration name 
     52      INTEGER         , INTENT(out) ::   kk_cfg          ! configuration resolution 
     53      INTEGER         , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
     54      INTEGER         , INTENT(out) ::   kperio          ! lateral global domain b.c.  
    5655      ! 
    57       INTEGER ::   ios, ii   ! Local integer 
     56      INTEGER ::   ios   ! Local integer 
    5857      !! 
    5958      NAMELIST/namusr_def/ nn_GYRE, ln_bench, jpkglo 
    6059      !!---------------------------------------------------------------------- 
    6160      ! 
    62       ii = 1 
    63       ! 
    6461      REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    6562      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    66 902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist', .TRUE. ) 
     63902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
    6764      ! 
    68       WRITE( ldnam(:), namusr_def ) 
     65      WRITE( numond, namusr_def ) 
    6966      ! 
    7067      cd_cfg = 'GYRE'               ! name & resolution (not used) 
     
    8582      ! 
    8683      !                             ! control print 
    87       WRITE(ldtxt(ii),*) '   '                                                                            ;   ii = ii + 1 
    88       WRITE(ldtxt(ii),*) 'usr_def_nam  : read the user defined namelist (namusr_def) in namelist_cfg'     ;   ii = ii + 1 
    89       WRITE(ldtxt(ii),*) '~~~~~~~~~~~ '                                                                   ;   ii = ii + 1 
    90       WRITE(ldtxt(ii),*) '   Namelist namusr_def : GYRE case'                                             ;   ii = ii + 1 
    91       WRITE(ldtxt(ii),*) '      GYRE used as Benchmark (=T)                      ln_bench  = ', ln_bench  ;   ii = ii + 1 
    92       WRITE(ldtxt(ii),*) '      inverse resolution & implied domain size         nn_GYRE   = ', nn_GYRE   ;   ii = ii + 1 
     84      WRITE(numout,*) '   ' 
     85      WRITE(numout,*) 'usr_def_nam  : read the user defined namelist (namusr_def) in namelist_cfg' 
     86      WRITE(numout,*) '~~~~~~~~~~~ ' 
     87      WRITE(numout,*) '   Namelist namusr_def : GYRE case' 
     88      WRITE(numout,*) '      GYRE used as Benchmark (=T)                      ln_bench  = ', ln_bench 
     89      WRITE(numout,*) '      inverse resolution & implied domain size         nn_GYRE   = ', nn_GYRE 
    9390#if defined key_agrif 
    9491      IF( Agrif_Root() ) THEN 
    9592#endif 
    96       WRITE(ldtxt(ii),*) '         jpiglo = 30*nn_GYRE+2                            jpiglo = ', kpi       ;   ii = ii + 1 
    97       WRITE(ldtxt(ii),*) '         jpjglo = 20*nn_GYRE+2                            jpjglo = ', kpj       ;   ii = ii + 1 
     93      WRITE(numout,*) '         jpiglo = 30*nn_GYRE+2                            jpiglo = ', kpi 
     94      WRITE(numout,*) '         jpjglo = 20*nn_GYRE+2                            jpjglo = ', kpj 
    9895#if defined key_agrif 
    9996      ENDIF 
    10097#endif 
    101       WRITE(ldtxt(ii),*) '      number of model levels                              jpkglo = ', kpk       ;   ii = ii + 1 
     98      WRITE(numout,*) '      number of model levels                              jpkglo = ', kpk 
    10299      ! 
    103100      !                             ! Set the lateral boundary condition of the global domain 
    104101      kperio = 0                    ! GYRE configuration : closed domain 
    105102      ! 
    106       WRITE(ldtxt(ii),*) '   '                                                                            ;   ii = ii + 1 
    107       WRITE(ldtxt(ii),*) '   Lateral b.c. of the global domain set to closed     jperio = ', kperio       ;   ii = ii + 1 
     103      WRITE(numout,*) '   ' 
     104      WRITE(numout,*) '   Lateral b.c. of the global domain set to closed     jperio = ', kperio 
    108105      ! 
    109106   END SUBROUTINE usr_def_nam 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ZDF/zdfdrg.F90

    r10069 r11317  
    238238      REWIND( numnam_ref )                   ! Namelist namdrg in reference namelist 
    239239      READ  ( numnam_ref, namdrg, IOSTAT = ios, ERR = 901) 
    240 901   IF( ios /= 0 )   CALL ctl_nam( ios , 'namdrg in reference namelist', lwp ) 
     240901   IF( ios /= 0 )   CALL ctl_nam( ios , 'namdrg in reference namelist' ) 
    241241      REWIND( numnam_cfg )                   ! Namelist namdrg in configuration namelist 
    242242      READ  ( numnam_cfg, namdrg, IOSTAT = ios, ERR = 902 ) 
    243 902   IF( ios >  0 )   CALL ctl_nam( ios , 'namdrg in configuration namelist', lwp ) 
     243902   IF( ios >  0 )   CALL ctl_nam( ios , 'namdrg in configuration namelist' ) 
    244244      IF(lwm) WRITE ( numond, namdrg ) 
    245245      ! 
     
    338338      IF(ll_top)   READ  ( numnam_ref, namdrg_top, IOSTAT = ios, ERR = 901) 
    339339      IF(ll_bot)   READ  ( numnam_ref, namdrg_bot, IOSTAT = ios, ERR = 901) 
    340 901   IF( ios /= 0 )   CALL ctl_nam( ios , TRIM(cl_namref), lwp ) 
     340901   IF( ios /= 0 )   CALL ctl_nam( ios , TRIM(cl_namref) ) 
    341341      REWIND( numnam_cfg )                   ! Namelist cd_namdrg in configuration namelist 
    342342      IF(ll_top)   READ  ( numnam_cfg, namdrg_top, IOSTAT = ios, ERR = 902 ) 
    343343      IF(ll_bot)   READ  ( numnam_cfg, namdrg_bot, IOSTAT = ios, ERR = 902 ) 
    344 902   IF( ios >  0 )   CALL ctl_nam( ios , TRIM(cl_namcfg), lwp ) 
     344902   IF( ios >  0 )   CALL ctl_nam( ios , TRIM(cl_namcfg) ) 
    345345      IF(lwm .AND. ll_top)   WRITE ( numond, namdrg_top ) 
    346346      IF(lwm .AND. ll_bot)   WRITE ( numond, namdrg_bot ) 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ZDF/zdfgls.F90

    r10425 r11317  
    859859      REWIND( numnam_ref )              ! Namelist namzdf_gls in reference namelist : Vertical eddy diffivity and viscosity using gls turbulent closure scheme 
    860860      READ  ( numnam_ref, namzdf_gls, IOSTAT = ios, ERR = 901) 
    861 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf_gls in reference namelist', lwp ) 
     861901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf_gls in reference namelist' ) 
    862862 
    863863      REWIND( numnam_cfg )              ! Namelist namzdf_gls in configuration namelist : Vertical eddy diffivity and viscosity using gls turbulent closure scheme 
    864864      READ  ( numnam_cfg, namzdf_gls, IOSTAT = ios, ERR = 902 ) 
    865 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf_gls in configuration namelist', lwp ) 
     865902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf_gls in configuration namelist' ) 
    866866      IF(lwm) WRITE ( numond, namzdf_gls ) 
    867867 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ZDF/zdfiwm.F90

    r10425 r11317  
    424424      REWIND( numnam_ref )              ! Namelist namzdf_iwm in reference namelist : Wave-driven mixing 
    425425      READ  ( numnam_ref, namzdf_iwm, IOSTAT = ios, ERR = 901) 
    426 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf_iwm in reference namelist', lwp ) 
     426901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf_iwm in reference namelist' ) 
    427427      ! 
    428428      REWIND( numnam_cfg )              ! Namelist namzdf_iwm in configuration namelist : Wave-driven mixing 
    429429      READ  ( numnam_cfg, namzdf_iwm, IOSTAT = ios, ERR = 902 ) 
    430 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf_iwm in configuration namelist', lwp ) 
     430902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf_iwm in configuration namelist' ) 
    431431      IF(lwm) WRITE ( numond, namzdf_iwm ) 
    432432      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ZDF/zdfosm.F90

    r10425 r11317  
    13861386     REWIND( numnam_ref )              ! Namelist namzdf_osm in reference namelist : Osmosis ML model 
    13871387     READ  ( numnam_ref, namzdf_osm, IOSTAT = ios, ERR = 901) 
    1388 901  IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_osm in reference namelist', lwp ) 
     1388901  IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_osm in reference namelist' ) 
    13891389 
    13901390     REWIND( numnam_cfg )              ! Namelist namzdf_tke in configuration namelist : Turbulent Kinetic Energy 
    13911391     READ  ( numnam_cfg, namzdf_osm, IOSTAT = ios, ERR = 902 ) 
    1392 902  IF( ios >  0 ) CALL ctl_nam ( ios , 'namzdf_osm in configuration namelist', lwp ) 
     1392902  IF( ios >  0 ) CALL ctl_nam ( ios , 'namzdf_osm in configuration namelist' ) 
    13931393     IF(lwm) WRITE ( numond, namzdf_osm ) 
    13941394 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ZDF/zdfphy.F90

    r10907 r11317  
    9393      REWIND( numnam_ref )              ! Namelist namzdf in reference namelist : Vertical mixing parameters 
    9494      READ  ( numnam_ref, namzdf, IOSTAT = ios, ERR = 901) 
    95 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf in reference namelist', lwp ) 
     95901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf in reference namelist' ) 
    9696      ! 
    9797      REWIND( numnam_cfg )              ! Namelist namzdf in reference namelist : Vertical mixing parameters 
    9898      READ  ( numnam_cfg, namzdf, IOSTAT = ios, ERR = 902 ) 
    99 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf in configuration namelist', lwp ) 
     99902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf in configuration namelist' ) 
    100100      IF(lwm)   WRITE ( numond, namzdf ) 
    101101      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ZDF/zdfric.F90

    r10068 r11317  
    8080      REWIND( numnam_ref )              ! Namelist namzdf_ric in reference namelist : Vertical diffusion Kz depends on Richardson number 
    8181      READ  ( numnam_ref, namzdf_ric, IOSTAT = ios, ERR = 901) 
    82 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_ric in reference namelist', lwp ) 
     82901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_ric in reference namelist' ) 
    8383 
    8484      REWIND( numnam_cfg )              ! Namelist namzdf_ric in configuration namelist : Vertical diffusion Kz depends on Richardson number 
    8585      READ  ( numnam_cfg, namzdf_ric, IOSTAT = ios, ERR = 902 ) 
    86 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namzdf_ric in configuration namelist', lwp ) 
     86902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namzdf_ric in configuration namelist' ) 
    8787      IF(lwm) WRITE ( numond, namzdf_ric ) 
    8888      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ZDF/zdftke.F90

    r10425 r11317  
    658658      REWIND( numnam_ref )              ! Namelist namzdf_tke in reference namelist : Turbulent Kinetic Energy 
    659659      READ  ( numnam_ref, namzdf_tke, IOSTAT = ios, ERR = 901) 
    660 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_tke in reference namelist', lwp ) 
     660901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_tke in reference namelist' ) 
    661661 
    662662      REWIND( numnam_cfg )              ! Namelist namzdf_tke in configuration namelist : Turbulent Kinetic Energy 
    663663      READ  ( numnam_cfg, namzdf_tke, IOSTAT = ios, ERR = 902 ) 
    664 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namzdf_tke in configuration namelist', lwp ) 
     664902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namzdf_tke in configuration namelist' ) 
    665665      IF(lwm) WRITE ( numond, namzdf_tke ) 
    666666      ! 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/module_example

    r10425 r11317  
    152152      REWIND( numnam_ref )              ! Namelist namexa in reference namelist : Example 
    153153      READ  ( numnam_ref, namexa, IOSTAT = ios, ERR = 901) 
    154 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namexa in reference namelist', lwp ) 
     154901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namexa in reference namelist' ) 
    155155      ! 
    156156      REWIND( numnam_cfg )              ! Namelist namexa in configuration namelist : Example 
    157157      READ  ( numnam_cfg, namexa, IOSTAT = ios, ERR = 902 ) 
    158 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namexa in configuration namelist', lwp ) 
     158902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namexa in configuration namelist' ) 
    159159   ! Output namelist for control 
    160160      WRITE ( numond, namexa ) 
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/nemogcm.F90

    r10588 r11317  
    103103 
    104104#if defined key_mpp_mpi 
     105   ! need MPI_Wtime 
    105106   INCLUDE 'mpif.h' 
    106107#endif 
     
    220221      ! 
    221222      IF( nstop /= 0 .AND. lwp ) THEN        ! error print 
    222          WRITE(numout,cform_err) 
    223          WRITE(numout,*) '   ==>>>   nemo_gcm: a total of ', nstop, ' errors have been found' 
    224          WRITE(numout,*) 
     223         WRITE(ctmp1,*) '   ==>>>   nemo_gcm: a total of ', nstop, ' errors have been found' 
     224         CALL ctl_stop( ctmp1 ) 
    225225      ENDIF 
    226226      ! 
     
    240240      IF(lwm) THEN 
    241241         IF( nstop == 0 ) THEN   ;   STOP 0 
    242          ELSE                    ;   STOP 999 
     242         ELSE                    ;   STOP 123 
    243243         ENDIF 
    244244      ENDIF 
     
    253253      !! ** Purpose :   initialization of the NEMO GCM 
    254254      !!---------------------------------------------------------------------- 
    255       INTEGER  ::   ji                 ! dummy loop indices 
    256       INTEGER  ::   ios, ilocal_comm   ! local integers 
    257       CHARACTER(len=120), DIMENSION(60) ::   cltxt, cltxt2, clnam 
     255      INTEGER ::   ios, ilocal_comm   ! local integers 
    258256      !! 
    259257      NAMELIST/namctl/ ln_ctl   , sn_cfctl, nn_print, nn_ictls, nn_ictle,   & 
     
    263261      !!---------------------------------------------------------------------- 
    264262      ! 
    265       cltxt  = '' 
    266       cltxt2 = '' 
    267       clnam  = ''   
    268263      cxios_context = 'nemo' 
    269264      ! 
    270       !                             ! Open reference namelist and configuration namelist files 
    271       CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    272       CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    273       ! 
    274       REWIND( numnam_ref )              ! Namelist namctl in reference namelist 
    275       READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
    276 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namctl in reference namelist', .TRUE. ) 
    277       REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist 
    278       READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    279 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. ) 
    280       ! 
    281       REWIND( numnam_ref )              ! Namelist namcfg in reference namelist 
    282       READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 
    283 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist', .TRUE. ) 
    284       REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist 
    285       READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    286 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. )    
    287  
    288       !                             !--------------------------! 
    289       !                             !  Set global domain size  !   (control print return in cltxt2) 
    290       !                             !--------------------------! 
    291       IF( ln_read_cfg ) THEN              ! Read sizes in domain configuration file 
    292          CALL domain_cfg ( cltxt2,        cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 
    293          ! 
    294       ELSE                                ! user-defined namelist 
    295          CALL usr_def_nam( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 
    296       ENDIF 
    297       ! 
    298       ! 
    299       !                             !--------------------------------------------! 
    300       !                             !  set communicator & select the local node  ! 
    301       !                             !  NB: mynode also opens output.namelist.dyn ! 
    302       !                             !      on unit number numond on first proc   ! 
    303       !                             !--------------------------------------------! 
     265      !                             !-------------------------------------------------! 
     266      !                             !     set communicator & select the local rank    ! 
     267      !                             !  must be done as soon as possible to get narea  ! 
     268      !                             !-------------------------------------------------! 
     269      ! 
    304270#if defined key_iomput 
    305271      IF( Agrif_Root() ) THEN 
    306272         IF( lk_oasis ) THEN 
    307273            CALL cpl_init( "oceanx", ilocal_comm )                               ! nemo local communicator given by oasis 
    308             CALL xios_initialize( "not used"       ,local_comm= ilocal_comm )    ! send nemo communicator to xios 
     274            CALL xios_initialize( "not used"       , local_comm =ilocal_comm )   ! send nemo communicator to xios 
    309275         ELSE 
    310             CALL xios_initialize( "for_xios_mpi_id",return_comm=ilocal_comm )    ! nemo local communicator given by xios 
     276            CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )   ! nemo local communicator given by xios 
    311277         ENDIF 
    312278      ENDIF 
    313       ! Nodes selection (control print return in cltxt) 
    314       narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) 
     279      CALL mpp_start( ilocal_comm ) 
    315280#else 
    316281      IF( lk_oasis ) THEN 
     
    318283            CALL cpl_init( "oceanx", ilocal_comm )          ! nemo local communicator given by oasis 
    319284         ENDIF 
    320          ! Nodes selection (control print return in cltxt) 
    321          narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) 
     285         CALL mpp_start( ilocal_comm ) 
    322286      ELSE 
    323          ilocal_comm = 0                                    ! Nodes selection (control print return in cltxt) 
    324          narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop ) 
    325       ENDIF 
    326 #endif 
    327  
    328       narea = narea + 1                                     ! mynode return the rank of proc (0 --> jpnij -1 ) 
    329  
    330       IF( sn_cfctl%l_config ) THEN 
    331          ! Activate finer control of report outputs 
    332          ! optionally switch off output from selected areas (note this only 
    333          ! applies to output which does not involve global communications) 
    334          IF( ( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax  ) .OR. & 
    335            & ( MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) )    & 
    336            &   CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. ) 
    337       ELSE 
    338          ! Use ln_ctl to turn on or off all options. 
    339          CALL nemo_set_cfctl( sn_cfctl, ln_ctl, .TRUE. ) 
    340       ENDIF 
    341  
    342       lwm = (narea == 1)                                    ! control of output namelists 
    343       lwp = (narea == 1) .OR. ln_ctl                        ! control of all listing output print 
    344  
    345       IF(lwm) THEN               ! write merged namelists from earlier to output namelist  
    346          !                       ! now that the file has been opened in call to mynode.  
    347          !                       ! NB: nammpp has already been written in mynode (if lk_mpp_mpi) 
    348          WRITE( numond, namctl ) 
    349          WRITE( numond, namcfg ) 
    350          IF( .NOT.ln_read_cfg ) THEN 
    351             DO ji = 1, SIZE(clnam) 
    352                IF( TRIM(clnam(ji)) /= '' )   WRITE(numond, * ) clnam(ji)     ! namusr_def print 
    353             END DO 
    354          ENDIF 
    355       ENDIF 
    356  
    357       IF(lwp) THEN                            ! open listing units 
    358          ! 
    359          CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 
     287         CALL mpp_start( ) 
     288      ENDIF 
     289#endif 
     290      ! 
     291      narea = mpprank + 1               ! mpprank: the rank of proc (0 --> mppsize -1 ) 
     292      lwm = (narea == 1)                ! control of output namelists 
     293      ! 
     294      !                             !---------------------------------------------------------------! 
     295      !                             ! Open output files, reference and configuration namelist files ! 
     296      !                             !---------------------------------------------------------------! 
     297      ! 
     298      ! open ocean.output as soon as possible to get all output prints (including errors messages) 
     299      IF( lwm )   CALL ctl_opn(     numout,        'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     300      ! open reference and configuration namelist files 
     301                  CALL ctl_opn( numnam_ref,        'namelist_ref',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     302                  CALL ctl_opn( numnam_cfg,        'namelist_cfg',     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     303      IF( lwm )   CALL ctl_opn(     numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     304      ! open /dev/null file to be able to supress output write easily 
     305                  CALL ctl_opn(     numnul,           '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     306      ! 
     307      !                             !--------------------! 
     308      !                             ! Open listing units !  -> need ln_ctl from namctl to define lwp 
     309      !                             !--------------------! 
     310      ! 
     311      REWIND( numnam_ref )              ! Namelist namctl in reference namelist 
     312      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
     313901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namctl in reference namelist' ) 
     314      REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist 
     315      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
     316902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namctl in configuration namelist' ) 
     317      ! 
     318      lwp = (narea == 1) .OR. ln_ctl    ! control of all listing output print 
     319      ! 
     320      IF(lwp) THEN                      ! open listing units 
     321         ! 
     322         IF( .NOT. lwm )   &            ! alreay opened for narea == 1 
     323            &            CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE., narea ) 
    360324         ! 
    361325         WRITE(numout,*) 
    362          WRITE(numout,*) '   CNRS - NERC - Met OFFICE - MERCATOR-ocean - INGV - CMCC' 
     326         WRITE(numout,*) '   CNRS - NERC - Met OFFICE - MERCATOR-ocean - CMCC' 
    363327         WRITE(numout,*) '                       NEMO team' 
    364328         WRITE(numout,*) '            Ocean General Circulation Model' 
     
    379343         WRITE(numout,*) "     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " 
    380344         WRITE(numout,*) 
    381           
    382          DO ji = 1, SIZE(cltxt) 
    383             IF( TRIM(cltxt (ji)) /= '' )   WRITE(numout,*) TRIM(cltxt(ji))    ! control print of mynode 
    384          END DO 
    385          WRITE(numout,*) 
    386          WRITE(numout,*) 
    387          DO ji = 1, SIZE(cltxt2) 
    388             IF( TRIM(cltxt2(ji)) /= '' )   WRITE(numout,*) TRIM(cltxt2(ji))   ! control print of domain size 
    389          END DO 
    390345         ! 
    391346         WRITE(numout,cform_aaa)                                        ! Flag AAAAAAA 
    392347         ! 
    393348      ENDIF 
    394       ! open /dev/null file to be able to supress output write easily 
    395       CALL ctl_opn( numnul, '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    396       ! 
    397       !                                      ! Domain decomposition 
    398       CALL mpp_init                          ! MPP 
     349      ! 
     350      ! finalize the definition of namctl variables 
     351      IF( sn_cfctl%l_config ) THEN 
     352         ! Activate finer control of report outputs 
     353         ! optionally switch off output from selected areas (note this only 
     354         ! applies to output which does not involve global communications) 
     355         IF( ( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax  ) .OR. & 
     356           & ( MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) )    & 
     357           &   CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. ) 
     358      ELSE 
     359         ! Use ln_ctl to turn on or off all options. 
     360         CALL nemo_set_cfctl( sn_cfctl, ln_ctl, .TRUE. ) 
     361      ENDIF 
     362      ! 
     363      IF(lwm) WRITE( numond, namctl ) 
     364      ! 
     365      !                             !------------------------------------! 
     366      !                             !  Set global domain size parameters ! 
     367      !                             !------------------------------------! 
     368      ! 
     369      REWIND( numnam_ref )              ! Namelist namcfg in reference namelist 
     370      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 
     371903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 
     372      REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist 
     373      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
     374904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' )    
     375      ! 
     376      IF( ln_read_cfg ) THEN            ! Read sizes in domain configuration file 
     377         CALL domain_cfg ( cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 
     378      ELSE                              ! user-defined namelist 
     379         CALL usr_def_nam( cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 
     380      ENDIF 
     381      ! 
     382      IF(lwm)   WRITE( numond, namcfg ) 
     383      ! 
     384      !                             !-----------------------------------------! 
     385      !                             ! mpp parameters and domain decomposition ! 
     386      !                             !-----------------------------------------! 
     387      CALL mpp_init 
    399388 
    400389      ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays 
     
    507496      !! ** Purpose :   control print setting 
    508497      !! 
    509       !! ** Method  : - print namctl information and check some consistencies 
     498      !! ** Method  : - print namctl and namcfg information and check some consistencies 
    510499      !!---------------------------------------------------------------------- 
    511500      ! 
     
    673662   END SUBROUTINE nemo_alloc 
    674663 
     664    
    675665   SUBROUTINE nemo_set_cfctl(sn_cfctl, setto, for_all ) 
    676666      !!---------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.