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 12958 for NEMO/branches/UKMO/dev_r12866_HPC-02_Daley_Tiling_trial_extra_halo/src/SAS/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2020-05-21T17:14:32+02:00 (4 years ago)
Author:
hadcv
Message:

Merge in trunk changes to r12933

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/dev_r12866_HPC-02_Daley_Tiling_trial_extra_halo/src/SAS/nemogcm.F90

    r12586 r12958  
    3535   USE step_diu       ! diurnal bulk SST timestepping (called from here if run offline) 
    3636   ! 
     37   USE in_out_manager ! I/O manager 
    3738   USE lib_mpp        ! distributed memory computing 
    3839   USE mppini         ! shared/distributed memory setting (mpp_init routine) 
     
    126127      END DO 
    127128      ! 
    128       IF( .NOT. Agrif_Root() ) THEN 
    129          CALL Agrif_ParentGrid_To_ChildGrid() 
    130          IF( ln_timing )   CALL timing_finalize 
    131          CALL Agrif_ChildGrid_To_ParentGrid() 
    132       ENDIF 
    133       ! 
    134129#else 
    135130      ! 
     
    166161      IF( nstop /= 0 .AND. lwp ) THEN        ! error print 
    167162         WRITE(ctmp1,*) '   ==>>>   nemo_gcm: a total of ', nstop, ' errors have been found' 
    168          CALL ctl_stop( ctmp1 ) 
     163         IF( ngrdstop > 0 ) THEN 
     164            WRITE(ctmp9,'(i2)') ngrdstop 
     165            WRITE(ctmp2,*) '      ==>>>   Error detected in Agrif grid '//TRIM(ctmp9) 
     166            WRITE(ctmp3,*) '      ==>>>   look for error messages in '//TRIM(ctmp9)//'_ocean_output* files' 
     167            CALL ctl_stop( ctmp1, ctmp2, ctmp3 ) 
     168         ELSE 
     169            CALL ctl_stop( ctmp1 ) 
     170         ENDIF 
    169171      ENDIF 
    170172      ! 
     
    258260      ENDIF 
    259261      ! open /dev/null file to be able to supress output write easily 
     262      IF( Agrif_Root() ) THEN 
    260263                     CALL ctl_opn(     numnul,               '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     264#ifdef key_agrif 
     265      ELSE 
     266                  numnul = Agrif_Parent(numnul)    
     267#endif 
     268      ENDIF 
    261269      ! 
    262270      !                             !--------------------! 
     
    270278      ! 
    271279      ! finalize the definition of namctl variables 
    272       IF( sn_cfctl%l_allon ) THEN 
    273          ! Turn on all options. 
    274          CALL nemo_set_cfctl( sn_cfctl, .TRUE., .TRUE. ) 
    275          ! Ensure all processors are active 
    276          sn_cfctl%procmin = 0 ; sn_cfctl%procmax = 1000000 ; sn_cfctl%procincr = 1 
    277       ELSEIF( sn_cfctl%l_config ) THEN 
    278          ! Activate finer control of report outputs 
    279          ! optionally switch off output from selected areas (note this only 
    280          ! applies to output which does not involve global communications) 
    281          IF( ( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax  ) .OR. & 
    282            & ( MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) )    & 
    283            &   CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. ) 
    284       ELSE 
    285          ! turn off all options. 
    286          CALL nemo_set_cfctl( sn_cfctl, .FALSE., .TRUE. ) 
    287       ENDIF 
     280      IF( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax .OR. MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 )   & 
     281         &   CALL nemo_set_cfctl( sn_cfctl, .FALSE. ) 
    288282      ! 
    289283      lwp = (narea == 1) .OR. sn_cfctl%l_oceout    ! control of all listing output print 
     
    404398         WRITE(numout,*) '~~~~~~~~' 
    405399         WRITE(numout,*) '   Namelist namctl' 
    406          WRITE(numout,*) '                              sn_cfctl%l_glochk  = ', sn_cfctl%l_glochk 
    407          WRITE(numout,*) '                              sn_cfctl%l_allon   = ', sn_cfctl%l_allon 
    408          WRITE(numout,*) '       finer control over o/p sn_cfctl%l_config  = ', sn_cfctl%l_config 
    409400         WRITE(numout,*) '                              sn_cfctl%l_runstat = ', sn_cfctl%l_runstat 
    410401         WRITE(numout,*) '                              sn_cfctl%l_trcstat = ', sn_cfctl%l_trcstat 
     
    548539   END SUBROUTINE nemo_alloc 
    549540 
    550    SUBROUTINE nemo_set_cfctl(sn_cfctl, setto, for_all ) 
     541   SUBROUTINE nemo_set_cfctl(sn_cfctl, setto ) 
    551542      !!---------------------------------------------------------------------- 
    552543      !!                     ***  ROUTINE nemo_set_cfctl  *** 
    553544      !! 
    554545      !! ** Purpose :   Set elements of the output control structure to setto. 
    555       !!                for_all should be .false. unless all areas are to be 
    556       !!                treated identically. 
    557546      !! 
    558547      !! ** Method  :   Note this routine can be used to switch on/off some 
    559       !!                types of output for selected areas but any output types 
    560       !!                that involve global communications (e.g. mpp_max, glob_sum) 
    561       !!                should be protected from selective switching by the 
    562       !!                for_all argument 
    563       !!---------------------------------------------------------------------- 
    564       LOGICAL :: setto, for_all 
    565       TYPE(sn_ctl) :: sn_cfctl 
    566       !!---------------------------------------------------------------------- 
    567       IF( for_all ) THEN 
    568          sn_cfctl%l_runstat = setto 
    569          sn_cfctl%l_trcstat = setto 
    570       ENDIF 
     548      !!                types of output for selected areas. 
     549      !!---------------------------------------------------------------------- 
     550      TYPE(sn_ctl), INTENT(inout) :: sn_cfctl 
     551      LOGICAL     , INTENT(in   ) :: setto 
     552      !!---------------------------------------------------------------------- 
     553      sn_cfctl%l_runstat = setto 
     554      sn_cfctl%l_trcstat = setto 
    571555      sn_cfctl%l_oceout  = setto 
    572556      sn_cfctl%l_layout  = setto 
Note: See TracChangeset for help on using the changeset viewer.