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 11101 for branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2019-06-11T16:10:28+02:00 (5 years ago)
Author:
frrh
Message:

Merge changes from Met Office GMED ticket 450 to reduce unnecessary
text output from NEMO.
This output, which is typically not switchable, is rarely of interest
in normal (non-debugging) runs and simply redunantley consumes extra
file space.
Further, the presence of this text output has been shown to
significantly degrade performance of models which are run during
Met Office HPC RAID (disk) checks.
The new code introduces switches which are configurable via the
changes made in the associated Met Office MOCI ticket 399.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r10149 r11101  
    248248      CHARACTER(len=80), DIMENSION(16) ::   cltxt 
    249249      ! 
    250       NAMELIST/namctl/ ln_ctl  , nn_print, nn_ictls, nn_ictle,   & 
     250      NAMELIST/namctl/ ln_ctl  ,sn_cfctl, nn_print, nn_ictls, nn_ictle,   & 
    251251         &             nn_isplt, nn_jsplt, nn_jctls, nn_jctle,   & 
    252          &             nn_bench, nn_timing 
     252         &             nn_bench, nn_timing, ln_flush 
    253253      NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 
    254254         &             jpizoom, jpjzoom, jperio, ln_use_jattr 
     
    295295   ENDIF 
    296296#endif 
     297      nprint    = nn_print          ! convert DOCTOR namelist names into OLD names 
     298      lflush    = ln_flush          ! convert namelist variable to model variable 
    297299      ! 
    298300      !                             !--------------------------------------------! 
     
    327329      narea = narea + 1                                     ! mynode return the rank of proc (0 --> jpnij -1 ) 
    328330 
     331      IF( sn_cfctl%l_config ) THEN 
     332         ! Activate finer control of report outputs 
     333         ! optionally switch off output from selected areas (note this only 
     334         ! applies to output which does not involve global communications) 
     335         IF( ( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax  ) .OR. & 
     336           & ( MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) )    & 
     337           &   CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. ) 
     338      ELSE 
     339         ! Use ln_ctl to turn on or off all options. 
     340         CALL nemo_set_cfctl( sn_cfctl, ln_ctl, .TRUE. ) 
     341      ENDIF 
     342 
    329343      lwm = (narea == 1)                                    ! control of output namelists 
    330344      lwp = (narea == 1) .OR. ln_ctl                        ! control of all listing output print 
    331345 
    332       IF(lwm) THEN 
     346      IF(lwm .AND. nprint > 2) THEN 
    333347         ! write merged namelists from earlier to output namelist now that the 
    334348         ! file has been opened in call to mynode. nammpp has already been 
     
    391405         END DO 
    392406         WRITE(numout,cform_aaa)                                         ! Flag AAAAAAA 
     407         IF(lflush) CALL flush(numout) 
    393408         ! 
    394409      ENDIF 
     
    496511      IF( lk_asminc     )   CALL asm_inc_init   ! Initialize assimilation increments 
    497512      IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler 
     513      IF(lwp .AND. lflush) CALL flush(numout) 
    498514       
    499515      IF (nstop > 0) THEN 
     
    520536         WRITE(numout,*) '   Namelist namctl' 
    521537         WRITE(numout,*) '      run control (for debugging)     ln_ctl     = ', ln_ctl 
     538         WRITE(numout,*) '       finer control over o/p sn_cfctl%l_config  = ', sn_cfctl%l_config 
     539         WRITE(numout,*) '                              sn_cfctl%l_runstat = ', sn_cfctl%l_runstat 
     540         WRITE(numout,*) '                              sn_cfctl%l_trcstat = ', sn_cfctl%l_trcstat 
     541         WRITE(numout,*) '                              sn_cfctl%l_oceout  = ', sn_cfctl%l_oceout 
     542         WRITE(numout,*) '                              sn_cfctl%l_layout  = ', sn_cfctl%l_layout 
     543         WRITE(numout,*) '                              sn_cfctl%l_mppout  = ', sn_cfctl%l_mppout 
     544         WRITE(numout,*) '                              sn_cfctl%l_mpptop  = ', sn_cfctl%l_mpptop 
     545         WRITE(numout,*) '                              sn_cfctl%procmin   = ', sn_cfctl%procmin   
     546         WRITE(numout,*) '                              sn_cfctl%procmax   = ', sn_cfctl%procmax   
     547         WRITE(numout,*) '                              sn_cfctl%procincr  = ', sn_cfctl%procincr  
     548         WRITE(numout,*) '                              sn_cfctl%ptimincr  = ', sn_cfctl%ptimincr  
    522549         WRITE(numout,*) '      level of print                  nn_print   = ', nn_print 
     550         WRITE(numout,*) '      flush numout/stat               ln_flush   = ', ln_flush 
    523551         WRITE(numout,*) '      Start i indice for SUM control  nn_ictls   = ', nn_ictls 
    524552         WRITE(numout,*) '      End i indice for SUM control    nn_ictle   = ', nn_ictle 
     
    529557         WRITE(numout,*) '      benchmark parameter (0/1)       nn_bench   = ', nn_bench 
    530558         WRITE(numout,*) '      timing activated    (0/1)       nn_timing  = ', nn_timing 
    531       ENDIF 
    532       ! 
    533       nprint    = nn_print          ! convert DOCTOR namelist names into OLD names 
     559         IF(lflush) CALL flush(numout) 
     560      ENDIF 
     561      ! 
    534562      nictls    = nn_ictls 
    535563      nictle    = nn_ictle 
     
    557585         WRITE(numout,*) '      lateral cond. type (between 0 and 6) jperio = ', jperio    
    558586         WRITE(numout,*) '      use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 
     587         IF(lflush) CALL flush(numout) 
    559588      ENDIF 
    560589      !                             ! Parameter control 
     
    572601         IF(lwp) WRITE(numout,*)'          - The total number of processors over which the' 
    573602         IF(lwp) WRITE(numout,*)'            print control will be done is ijsplt : ', ijsplt 
     603         IF(lwp .AND. lflush) CALL flush(numout) 
    574604         ! 
    575605         !                              ! indices used for the SUM control 
     
    691721   END SUBROUTINE nemo_alloc 
    692722 
     723   SUBROUTINE nemo_set_cfctl(sn_cfctl, setto, for_all ) 
     724      !!---------------------------------------------------------------------- 
     725      !!                     ***  ROUTINE nemo_set_cfctl  *** 
     726      !! 
     727      !! ** Purpose :   Set elements of the output control structure to setto. 
     728      !!                for_all should be .false. unless all areas are to be 
     729      !!                treated identically. 
     730      !! 
     731      !! ** Method  :   Note this routine can be used to switch on/off some 
     732      !!                types of output for selected areas but any output types 
     733      !!                that involve global communications (e.g. mpp_max, glob_sum) 
     734      !!                should be protected from selective switching by the 
     735      !!                for_all argument 
     736      !!---------------------------------------------------------------------- 
     737      LOGICAL :: setto, for_all 
     738      TYPE(sn_ctl) :: sn_cfctl 
     739      !!---------------------------------------------------------------------- 
     740      IF( for_all ) THEN 
     741         sn_cfctl%l_runstat = setto 
     742         sn_cfctl%l_trcstat = setto 
     743      ENDIF 
     744      sn_cfctl%l_oceout  = setto 
     745      sn_cfctl%l_layout  = setto 
     746      sn_cfctl%l_mppout  = setto 
     747      sn_cfctl%l_mpptop  = setto 
     748   END SUBROUTINE nemo_set_cfctl 
    693749 
    694750   SUBROUTINE nemo_partition( num_pes ) 
     
    717773         WRITE (numout, *) 'WARNING: factorisation of number of PEs failed' 
    718774         WRITE (numout, *) '       : using grid of ',num_pes,' x 1' 
     775         IF(lflush) CALL flush(numout) 
    719776         jpnj = 1 
    720777         jpni = num_pes 
Note: See TracChangeset for help on using the changeset viewer.