Ignore:
Timestamp:
2019-11-07T17:55:13+01:00 (11 months ago)
Author:
acc
Message:

Branch 2019/fix_sn_cfctl_ticket2328. See #2328. Replacement of ln_ctl and activation of full functionality with
sn_cfctl structure. These changes rename structure components l_mppout and l_mpptop as l_prtctl and l_prttrc
and introduce l_glochk to activate former ln_ctl code in stpctl.F90 to perform global location of min and max
checks. Also added is l_allon which can be used to activate all output (much like the former ln_ctl). If l_allon
is .false. then l_config decides whether or not the suboptions are used.

   sn_cfctl%l_glochk = .FALSE.    ! Range sanity checks are local (F) or global (T). Set T for debugging only
   sn_cfctl%l_allon  = .FALSE.    ! IF T activate all options. If F deactivate all unless l_config is T
   sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the remaining options

Note, these changes pass SETTE tests but all references to ln_ctl need to be removed from the sette scripts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/fix_sn_cfctl_ticket2328/src/OFF/nemogcm.F90

    r11869 r11872  
    162162      INTEGER ::   ios, ilocal_comm   ! local integers 
    163163      !! 
    164       NAMELIST/namctl/ ln_ctl   , sn_cfctl, nn_print, nn_ictls, nn_ictle,   & 
     164      NAMELIST/namctl/ sn_cfctl, nn_print, nn_ictls, nn_ictle,              & 
    165165         &             nn_isplt , nn_jsplt, nn_jctls, nn_jctle,             & 
    166166         &             ln_timing, ln_diacfl 
     
    199199      ! 
    200200      !                             !--------------------! 
    201       !                             ! Open listing units !  -> need ln_ctl from namctl to define lwp 
     201      !                             ! Open listing units !  -> need sn_cfctl from namctl to define lwp 
    202202      !                             !--------------------! 
    203203      ! 
     
    210210      ! 
    211211      ! finalize the definition of namctl variables 
    212       IF( sn_cfctl%l_config ) THEN 
     212      IF( sn_cfctl%l_allon ) THEN 
     213         ! Turn on all options. 
     214         CALL nemo_set_cfctl( sn_cfctl, .TRUE., .TRUE. ) 
     215         ! Ensure all processors are active 
     216         sn_cfctl%procmin = 0 ; sn_cfctl%procmax = 1000000 ; sn_cfctl%procincr = 1 
     217      ELSEIF( sn_cfctl%l_config ) THEN 
    213218         ! Activate finer control of report outputs 
    214219         ! optionally switch off output from selected areas (note this only 
     
    218223           &   CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. ) 
    219224      ELSE 
    220          ! Use ln_ctl to turn on or off all options. 
    221          CALL nemo_set_cfctl( sn_cfctl, ln_ctl, .TRUE. ) 
    222       ENDIF 
    223       ! 
    224       lwp = (narea == 1) .OR. ln_ctl .OR. sn_cfctl%l_oceout    ! control of all listing output print 
     225         ! turn off all options. 
     226         CALL nemo_set_cfctl( sn_cfctl, .FALSE., .TRUE. ) 
     227      ENDIF 
     228      ! 
     229      lwp = (narea == 1) .OR. sn_cfctl%l_oceout    ! control of all listing output print 
    225230      ! 
    226231      IF(lwp) THEN                            ! open listing units 
     
    299304      IF( lk_c1d       )   CALL     c1d_init        ! 1D column configuration 
    300305                           CALL     dom_init("OPA") ! Domain 
    301       IF( ln_ctl .OR. sn_cfctl%l_mppout )   & 
     306      IF( sn_cfctl%l_prtctl )   & 
    302307         &                 CALL prt_ctl_init        ! Print control 
    303308 
     
    339344      !! ** Purpose :   control print setting 
    340345      !! 
    341       !! ** Method  : - print namctl information and check some consistencies 
     346      !! ** Method  : - print namctl and namcfg information and check some consistencies 
    342347      !!---------------------------------------------------------------------- 
    343348      ! 
     
    347352         WRITE(numout,*) '~~~~~~~~' 
    348353         WRITE(numout,*) '   Namelist namctl' 
    349          WRITE(numout,*) '      run control (for debugging)     ln_ctl     = ', ln_ctl 
     354         WRITE(numout,*) '                              sn_cfctl%l_glochk  = ', sn_cfctl%l_glochk 
     355         WRITE(numout,*) '                              sn_cfctl%l_allon   = ', sn_cfctl%l_allon 
    350356         WRITE(numout,*) '       finer control over o/p sn_cfctl%l_config  = ', sn_cfctl%l_config 
    351357         WRITE(numout,*) '                              sn_cfctl%l_runstat = ', sn_cfctl%l_runstat 
     
    353359         WRITE(numout,*) '                              sn_cfctl%l_oceout  = ', sn_cfctl%l_oceout 
    354360         WRITE(numout,*) '                              sn_cfctl%l_layout  = ', sn_cfctl%l_layout 
    355          WRITE(numout,*) '                              sn_cfctl%l_mppout  = ', sn_cfctl%l_mppout 
    356          WRITE(numout,*) '                              sn_cfctl%l_mpptop  = ', sn_cfctl%l_mpptop 
     361         WRITE(numout,*) '                              sn_cfctl%l_prtctl  = ', sn_cfctl%l_prtctl 
     362         WRITE(numout,*) '                              sn_cfctl%l_prttrc  = ', sn_cfctl%l_prttrc 
     363         WRITE(numout,*) '                              sn_cfctl%l_oasout  = ', sn_cfctl%l_oasout 
    357364         WRITE(numout,*) '                              sn_cfctl%procmin   = ', sn_cfctl%procmin   
    358365         WRITE(numout,*) '                              sn_cfctl%procmax   = ', sn_cfctl%procmax   
     
    392399      !                             ! Parameter control 
    393400      ! 
    394       IF( ln_ctl .OR. sn_cfctl%l_mppout ) THEN                         ! sub-domain area indices for the control prints 
     401      IF( sn_cfctl%l_prtctl .OR. sn_cfctl%l_prttrc ) THEN              ! sub-domain area indices for the control prints 
    395402         IF( lk_mpp .AND. jpnij > 1 ) THEN 
    396403            isplt = jpni   ;   jsplt = jpnj   ;   ijsplt = jpni*jpnj   ! the domain is forced to the real split domain 
     
    507514      sn_cfctl%l_oceout  = setto 
    508515      sn_cfctl%l_layout  = setto 
    509       sn_cfctl%l_mppout  = setto 
    510       sn_cfctl%l_mpptop  = setto 
     516      sn_cfctl%l_prtctl  = setto 
     517      sn_cfctl%l_prttrc  = setto 
    511518      sn_cfctl%l_oasout  = setto 
    512519   END SUBROUTINE nemo_set_cfctl 
Note: See TracChangeset for help on using the changeset viewer.