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 12144 – NEMO

Changeset 12144


Ignore:
Timestamp:
2019-12-10T13:24:43+01:00 (4 years ago)
Author:
acc
Message:

Branch 2019/fix_sn_cfctl_ticket2328. Merge in trunk changes from 11862 to 12072. Fully SETTE tested

Location:
NEMO/branches/2019/fix_sn_cfctl_ticket2328
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/fix_sn_cfctl_ticket2328/cfgs/SHARED/namelist_ice_ref

    r11731 r12144  
    6060      rn_icebfr     =  15.            !        maximum bottom stress per unit volume [N/m3] 
    6161      rn_lfrelax    =   1.e-5         !        relaxation time scale to reach static friction [s-1] 
    62       rn_tensile    =   0.05          !        isotropic tensile strength [0-0.5??] 
     62      rn_tensile    =   0.2           !        isotropic tensile strength [0-0.5??] 
    6363/ 
    6464!------------------------------------------------------------------------------ 
     
    9191!------------------------------------------------------------------------------ 
    9292   ln_rhg_EVP       = .true.          !  EVP rheology 
    93       ln_aEVP       = .true.          !     adaptive rheology (Kimmritz et al. 2016 & 2017) 
     93      ln_aEVP       = .false.         !     adaptive rheology (Kimmritz et al. 2016 & 2017) 
    9494      rn_creepl     =   2.0e-9        !     creep limit [1/s] 
    9595      rn_ecc        =   2.0           !     eccentricity of the elliptical yield curve           
  • NEMO/branches/2019/fix_sn_cfctl_ticket2328/doc/latex/NEMO/subfiles/chap_misc.tex

    r11693 r12144  
    362362 
    363363%% ================================================================================================= 
    364 \subsection{Control print} 
    365  
    366 The \np{ln_ctl}{ln\_ctl} switch was originally used as a debugging option in two modes: 
    367  
    368 \begin{enumerate} 
    369 \item {\np{ln_ctl}{ln\_ctl}: compute and print the trends averaged over the interior domain in all TRA, DYN, LDF and 
    370 ZDF modules. 
    371 This option is very helpful when diagnosing the origin of an undesired change in model results. } 
    372  
    373 \item {also \np{ln_ctl}{ln\_ctl} but using the nictl and njctl namelist parameters to check the source of differences between 
    374 mono and multi processor runs.} 
     364\subsection{Status and debugging information output} 
     365 
     366 
     367NEMO can produce a range of text information output either: in the main output 
     368file (ocean.output) written by the normal reporting processor (narea == 1) or various 
     369specialist output files (e.g. layout.dat, run.stat, tracer.stat etc.). Some, for example 
     370run.stat and tracer.stat, contain globally collected values for which a single file is 
     371sufficient. Others, however, contain information that could, potentially, be different 
     372for each processing region. For computational efficiency, the default volume of text 
     373information produced is reduced to just a few files from the narea=1 processor. 
     374 
     375When more information is required for monitoring or debugging purposes, the various 
     376forms of output can be selected via the \np{sn\_cfctl} structure. As well as simple 
     377on-off switches this structure also allows selection of a range of processors for 
     378individual reporting (where appropriate) and a time-increment option to restrict 
     379globally collected values to specified time-step increments. 
     380 
     381Most options within the structure are influenced by the top-level switches shown here 
     382with their default settings: 
     383 
     384\begin{verbatim} 
     385   sn_cfctl%l_allon  = .FALSE.    ! IF T activate all options. If F deactivate all unless l_config is T 
     386     sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the following 
     387\end{verbatim} 
     388 
     389The first switch is a convenience option which can be used to switch on and off all 
     390sub-options. However, if it is false then switching off all sub-options is only done 
     391if \texttt{sn_cfctl%l\_config} is also false. Specifically, the logic is: 
     392 
     393\begin{verbatim} 
     394  IF ( sn_cfctl%l_allon ) THEN 
     395    set all suboptions .TRUE. 
     396    and set procmin, procmax and procincr so that all regions are selected ([0,10000000,1], respectively) 
     397  ELSEIF ( sn_cfctl%l_config ) THEN 
     398    honour individual settings of the suboptions from the namelist 
     399  ELSE 
     400    set all suboptions .FALSE. 
     401  ENDIF 
     402\end{verbatim} 
     403 
     404Details of the suboptions follow but first an explanation of the stand-alone option: 
     405\texttt{sn_cfctl%l_glochk}.  This option modifies the action of the early warning checks 
     406carried out in \textt{stpctl.F90}. These checks detect probable numerical instabilites 
     407by searching for excessive sea surface heights or velocities and salinity values 
     408outside a sensible physical range. If breaches are detected then the default behaviour 
     409is to locate and report the local indices of the grid-point in breach. These indices 
     410are included in the error message that precedes the model shutdown. When true, 
     411\texttt{sn_cfctl%l_glochk} modifies this action by performing a global location of 
     412the various minimum and maximum values and the global indices are reported. This has 
     413some value in locating the most severe error in cases where the first detected error 
     414may not be the worst culprit. 
     415 
     416\subsubsection{Control print suboptions} 
     417 
     418The options that can be individually selected fall into three categories: 
     419 
     420\begin{enumerate} \item{Time step progress information} This category includes 
     421\texttt{run.stat} and \texttt{tracer.stat} files which record certain physical and 
     422passive tracer metrics (respectively). Typical contents of \texttt{run.stat} include 
     423global maximums of ssh, velocity; and global minimums and maximums of temperature 
     424and salinity.  A netCDF version of \texttt{run.stat} (\texttt{run.stat.nc}) is also 
     425produced with the same time-series data and this can easily be expanded to include 
     426extra monitoring information.  \texttt{tracer.stat} contains the volume-weighted 
     427average tracer value for each passive tracer. Collecting these metrics involves 
     428global communications and will impact on model efficiency so both these options are 
     429disabled by default by setting the respective options, \texttt{sn\_cfctl%runstat} and 
     430\texttt{sn\_cfctl%trcstat} to false. A compromise can be made by activating either or 
     431both of these options and setting the \texttt{sn\_cfctl%timincr} entry to an integer 
     432value greater than one. This increment determines the time-step frequency at which 
     433the global metrics are collected and reported.  This increment also applies to the 
     434time.step file which is otherwise updated every timestep. 
     435\item{One-time configuration information/progress logs} 
     436 
     437Some run-time configuration information and limited progress information is always 
     438produced by the first ocean process. This includes the \texttt{ocean.output} file 
     439which reports on all the namelist options read by the model and remains open to catch 
     440any warning or error messages generated during execution. A \texttt{layout.dat} 
     441file is also produced which details the MPI-decomposition used by the model. The 
     442suboptions: \texttt{sn\_cfctl%oceout} and \texttt{sn\_cfctl%layout} can be used 
     443to activate the creation of these files by all ocean processes.  For example, 
     444when \texttt{sn\_cfctl%oceout} is true all processors produce their own version of 
     445\texttt{ocean.output}.  All files, beyond the the normal reporting processor (narea == 1), are 
     446named with a \_XXXX extension to their name, where XXXX is a 4-digit area number (with 
     447leading zeros, if required). This is useful as a debugging aid since all processes can 
     448report their local conditions. Note though that these files are buffered on most UNIX 
     449systems so bug-hunting efforts using this facility should also utilise the \fortran: 
     450 
     451\begin{verbatim}  
     452   CALL FLUSH(numout) 
     453\end{verbatim} 
     454 
     455statement after any additional write statements to ensure that file contents reflect 
     456the last model state. Associated with the \texttt{sn\_cfctl%oceout} option is the 
     457additional \texttt{sn\_cfctl%oasout} suboption. This does not activate its own output 
     458file but rather activates the writing of addition information regarding the OASIS 
     459configuration when coupling via oasis and the sbccpl routine. This information is 
     460written to any active \texttt{ocean.output} files. 
     461\item{Control sums of trends for debugging} 
     462 
     463NEMO includes an option for debugging reproducibility differences between 
     464a MPP and mono-processor runs.  This is somewhat dated and clearly only 
     465useful for this purpose when dealing with configurations that can be run 
     466on a single processor. The full details can be found in this report: \href{ 
     467http://forge.ipsl.jussieu.fr/nemo/attachment/wiki/Documentation/prtctl_NEMO_doc_v2.pdf}{The 
     468control print option in NEMO} The switches to activate production of the control sums 
     469of trends for either the physics or passive tracers are the \texttt{sn\_cfctl%prtctl} 
     470and \texttt{sn\_cfctl%prttrc} suboptions, respectively. Although, perhaps, of limited use for its 
     471original intention, the ability to produce these control sums of trends in specific 
     472areas provides another tool for diagnosing model behaviour.  If only the output from a 
     473select few regions is required then additional options are available to activate options 
     474for only a simple subset of processing regions. These are: \texttt{sn\_cfctl%procmin}, 
     475\texttt{sn\_cfctl%procmax} and \texttt{sn\_cfctl%procincr} which can be used to specify 
     476the minimum and maximum active areas and the increment. The default values are set 
     477such that all regions will be active. Note this subsetting can also be used to limit 
     478which additional \texttt{ocean.output} and \texttt{layout.dat} files are produced if 
     479those suboptions are active. 
     480 
    375481\end{enumerate} 
    376482 
    377 However, in recent versions it has also been used to force all processors to assume the 
    378 reporting role. Thus when \np{ln_ctl}{ln\_ctl} is true all processors produce their own versions 
    379 of files such as: ocean.output, layout.dat, etc.  All such files, beyond the the normal 
    380 reporting processor (narea == 1), are named with a \_XXXX extension to their name, where 
    381 XXXX is a 4-digit area number (with leading zeros, if required). Other reporting files 
    382 such as run.stat (and its netCDF counterpart: run.stat.nc) and tracer.stat contain global 
    383 information and are only ever produced by the reporting master (narea == 1). For version 
    384 4.0 a start has been made to return \np{ln_ctl}{ln\_ctl} to its original function by introducing 
    385 a new control structure which allows finer control over which files are produced. This 
    386 feature is still evolving but it does already allow the user to: select individually the 
    387 production of run.stat and tracer.stat files and to toggle the production of other files 
    388 on processors other than the reporting master. These other reporters can be a simple 
    389 subset of processors as defined by a minimum, maximum and incremental processor number. 
    390  
    391 Note, that production of the run.stat and tracer.stat files require global communications. 
    392 For run.stat, these are global min and max operations to find metrics such as the gloabl 
    393 maximum velocity. For tracer.stat these are global sums of tracer fields. To improve model 
    394 performance these operations are disabled by default and, where necessary, any use of the 
    395 global values have been replaced with local calculations. For example, checks on the CFL 
    396 criterion are now done on the local domain and only reported if a breach is detected. 
    397  
    398 Experienced users may wish to still monitor this information as a check on model progress. 
    399 If so, the best compromise will be to activate the files with: 
    400  
    401 \begin{verbatim} 
    402      sn_cfctl%l_config = .TRUE. 
    403        sn_cfctl%l_runstat = .TRUE. 
    404        sn_cfctl%l_trcstat = .TRUE. 
    405 \end{verbatim} 
    406  
    407 and to use the new time increment setting to ensure the values are collected and reported 
    408 at a suitably long interval. For example: 
    409  
    410 \begin{verbatim} 
    411        sn_cfctl%ptimincr  = 25 
    412 \end{verbatim} 
    413  
    414 will carry out the global communications and write the information every 25 timesteps. This 
    415 increment also applies to the time.step file which is otherwise updated every timestep. 
     483 
     484   sn_cfctl%l_glochk = .FALSE.    ! Range sanity checks are local (F) or global (T). Set T for debugging only 
     485   sn_cfctl%l_allon  = .FALSE.    ! IF T activate all options. If F deactivate all unless l_config is T 
     486     sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the following 
     487       sn_cfctl%l_runstat = .FALSE. ! switches and which areas produce reports with the proc integer settings. 
     488       sn_cfctl%l_trcstat = .FALSE. ! The default settings for the proc integers should ensure 
     489       sn_cfctl%l_oceout  = .FALSE. ! that  all areas report. 
     490       sn_cfctl%l_layout  = .FALSE. ! 
     491       sn_cfctl%l_prtctl  = .FALSE. ! 
     492       sn_cfctl%l_prttrc  = .FALSE. ! 
     493       sn_cfctl%l_oasout  = .FALSE. ! 
     494       sn_cfctl%procmin   = 0       ! Minimum area number for reporting [default:0] 
     495       sn_cfctl%procmax   = 1000000 ! Maximum area number for reporting [default:1000000] 
     496       sn_cfctl%procincr  = 1       ! Increment for optional subsetting of areas [default:1] 
     497       sn_cfctl%ptimincr  = 1       ! Timestep increment for writing time step progress info 
     498 
     499 
    416500 
    417501\subinc{\input{../../global/epilogue}} 
  • NEMO/branches/2019/fix_sn_cfctl_ticket2328/doc/namelists/namctl

    r11869 r12144  
    22&namctl        !   Control prints                                       (default: OFF) 
    33!----------------------------------------------------------------------- 
    4    ln_ctl = .FALSE.                 ! Toggle all report printing on/off (T/F); Ignored if sn_cfctl%l_config is T 
     4   sn_cfctl%l_glochk = .FALSE.    ! Range sanity checks are local (F) or global (T). Set T for debugging only 
     5   sn_cfctl%l_allon  = .FALSE.    ! IF T activate all options. If F deactivate all unless l_config is T 
    56     sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the following 
    67       sn_cfctl%l_runstat = .FALSE. ! switches and which areas produce reports with the proc integer settings. 
     
    89       sn_cfctl%l_oceout  = .FALSE. ! that  all areas report. 
    910       sn_cfctl%l_layout  = .FALSE. ! 
    10        sn_cfctl%l_mppout  = .FALSE. ! 
    11        sn_cfctl%l_mpptop  = .FALSE. ! 
     11       sn_cfctl%l_prtctl  = .FALSE. ! 
     12       sn_cfctl%l_prttrc  = .FALSE. ! 
    1213       sn_cfctl%l_oasout  = .FALSE. ! 
    1314       sn_cfctl%procmin   = 0       ! Minimum area number for reporting [default:0] 
  • NEMO/branches/2019/fix_sn_cfctl_ticket2328/doc/rst/source/conf.py

    r11780 r12144  
    230230texinfo_documents = [ 
    231231  ('guide', 'NEMO', u'NEMO Documentation', 
    232    u'NEMO System Team', 'NEMO', 'One line description of project.', 
     232   u'NEMO System Team', 'NEMO', 'Community Ocean Model', 
    233233   'Miscellaneous'), 
    234234] 
  • NEMO/branches/2019/fix_sn_cfctl_ticket2328/doc/rst/source/global.rst

    r11735 r12144  
    1 .. Roles (custom styles related to CSS classes in 'source/_static/style.css') 
     1.. Roles 
     2 
     3.. custom styles related to CSS classes in './_static/style.css' 
    24 
    35.. role:: blue 
     
    57.. role:: grey 
    68.. role:: greysup(sup) 
     9 
     10.. inline code snippets 
     11 
     12.. role:: python(code) 
     13   :language: python 
     14   :class: highlight 
     15 
     16.. role:: fortran(code) 
     17   :language: fortran 
     18   :class: highlight 
     19 
     20.. role:: console(code) 
     21   :language: console 
     22   :class: highlight 
    723 
    824.. Substitutions 
  • NEMO/branches/2019/fix_sn_cfctl_ticket2328/src/OCE/BDY/bdydta.F90

    r11793 r12144  
    171171                        ii = idx_bdy(jbdy)%nbi(ib,igrd) 
    172172                        ij = idx_bdy(jbdy)%nbj(ib,igrd) 
    173                         dta_bdy(jbdy)%tem(ib,ik) = tsn(ii,ij,ik,jp_bdytem) * tmask(ii,ij,ik)          
    174                         dta_bdy(jbdy)%sal(ib,ik) = tsn(ii,ij,ik,jp_bdysal) * tmask(ii,ij,ik)          
     173                        dta_bdy(jbdy)%tem(ib,ik) = tsn(ii,ij,ik,jp_tem) * tmask(ii,ij,ik)          
     174                        dta_bdy(jbdy)%sal(ib,ik) = tsn(ii,ij,ik,jp_sal) * tmask(ii,ij,ik)          
    175175                     END DO 
    176176                  END DO 
     
    447447               ELSE                                                            ;   ipl = 1            ! xy or xyt 
    448448               ENDIF 
     449               bf(jp_bdya_i,jbdy)%clrootname = 'NOT USED'   ! reset to default value as this subdomain may not need to read this bdy 
    449450            ENDIF 
    450451         ENDIF 
     
    615616            ENDIF 
    616617 
    617             IF( llneed ) THEN                                              ! dta_bdy(jbdy)%xxx will be needed 
     618            IF( llneed .AND. iszdim > 0 ) THEN                             ! dta_bdy(jbdy)%xxx will be needed 
    618619               !                                                           !   -> must be associated with an allocated target 
    619620               ALLOCATE( bf_alias(1)%fnow( iszdim, 1, ipk ) )              ! allocate the target 
  • NEMO/branches/2019/fix_sn_cfctl_ticket2328/src/OCE/DYN/dynnxt.F90

    r11872 r12144  
    175175      IF( neuler == 0 .AND. kt == nit000 ) THEN        !* Euler at first time-step: only swap 
    176176         DO jk = 1, jpkm1 
     177            ub(:,:,jk) = un(:,:,jk)                         ! ub <-- un 
     178            vb(:,:,jk) = vn(:,:,jk) 
    177179            un(:,:,jk) = ua(:,:,jk)                         ! un <-- ua 
    178180            vn(:,:,jk) = va(:,:,jk) 
  • NEMO/branches/2019/fix_sn_cfctl_ticket2328/src/OCE/DYN/dynspg_ts.F90

    r11536 r12144  
    687687            hvr_e(2:jpim1,2:jpjm1) = ssvmask(2:jpim1,2:jpjm1) / ( hv_e(2:jpim1,2:jpjm1) + 1._wp - ssvmask(2:jpim1,2:jpjm1) ) 
    688688            CALL lbc_lnk_multi( 'dynspg_ts', ua_e , 'U', -1._wp, va_e , 'V', -1._wp  & 
    689                  &                         , hu_e , 'U', -1._wp, hv_e , 'V', -1._wp  & 
    690                  &                         , hur_e, 'U', -1._wp, hvr_e, 'V', -1._wp  ) 
     689                 &                         , hu_e , 'U',  1._wp, hv_e , 'V',  1._wp  & 
     690                 &                         , hur_e, 'U',  1._wp, hvr_e, 'V',  1._wp  ) 
    691691         ELSE 
    692692            CALL lbc_lnk_multi( 'dynspg_ts', ua_e , 'U', -1._wp, va_e , 'V', -1._wp  ) 
     
    803803 
    804804      IF ( ln_wd_dl .and. ln_wd_dl_bc) THEN  
     805         ! need to set lbc here because not done prior time averaging 
     806         CALL lbc_lnk_multi( 'dynspg_ts', zuwdav2, 'U', 1._wp, zvwdav2, 'V', 1._wp) 
    805807         DO jk = 1, jpkm1 
    806808            un(:,:,jk) = ( un_adv(:,:)*r1_hu_n(:,:) & 
  • NEMO/branches/2019/fix_sn_cfctl_ticket2328/src/OCE/TRA/traadv_fct.F90

    r11411 r12144  
    659659         DO ji = fs_2, fs_jpim1 
    660660            ikt = mikt(ji,jj) + 1            ! w-point below the 1st  wet point 
    661             ikb = mbkt(ji,jj)                !     -   above the last wet point 
     661            ikb = MAX(mbkt(ji,jj), 2)        !     -   above the last wet point 
    662662            ! 
    663663            zwd (ji,jj,ikt) = 1._wp          ! top 
  • NEMO/branches/2019/fix_sn_cfctl_ticket2328/src/OFF/nemogcm.F90

    r11872 r12144  
    114114#else 
    115115                                CALL dta_dyn    ( istp )         ! Interpolation of the dynamical fields 
     116#endif 
     117                                CALL trc_stp    ( istp )         ! time-stepping 
     118#if ! defined key_sed_off 
    116119         IF( .NOT.ln_linssh )   CALL dta_dyn_swp( istp )         ! swap of sea  surface height and vertical scale factors 
    117120#endif 
    118                                 CALL trc_stp    ( istp )         ! time-stepping 
    119121                                CALL stp_ctl    ( istp, indic )  ! Time loop: control and print 
    120122         istp = istp + 1 
  • NEMO/branches/2019/fix_sn_cfctl_ticket2328/src/TOP/TRP/trcnxt.F90

    r11872 r12144  
    139139      ENDIF 
    140140      !                                ! Leap-Frog + Asselin filter time stepping 
    141       IF( (neuler == 0 .AND. kt == nittrc000) .OR. ln_top_euler ) THEN    ! Euler time-stepping (only swap) 
     141      IF( (neuler == 0 .AND. kt == nittrc000) ) THEN 
     142         ! set up for leapfrog on second timestep 
     143         DO jn = 1, jptra 
     144            DO jk = 1, jpkm1 
     145               trb(:,:,jk,jn) = trn(:,:,jk,jn)   
     146               trn(:,:,jk,jn) = tra(:,:,jk,jn) 
     147            END DO 
     148         END DO 
     149      ELSE IF( ln_top_euler ) THEN 
     150         ! always doing euler timestepping 
    142151         DO jn = 1, jptra 
    143152            DO jk = 1, jpkm1 
     
    146155            END DO 
    147156         END DO 
     157      ENDIF 
     158      IF( (neuler == 0 .AND. kt == nittrc000) .OR. ln_top_euler ) THEN    ! Euler time-stepping (only swap) 
    148159         IF (l_trdtrc .AND. .NOT. ln_linssh ) THEN   ! Zero Asselin filter contribution must be explicitly written out since for vvl 
    149160            !                                        ! Asselin filter is output by tra_nxt_vvl that is not called on this time step 
  • NEMO/branches/2019/fix_sn_cfctl_ticket2328/tests/CANAL/MY_SRC/usrdef_nam.F90

    r11536 r12144  
    8686      REWIND( numnam_cfg )          ! Namelist namusr_def (exist in namelist_cfg only) 
    8787      READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 
    88 902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist', cdtxt ) 
     88902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 
    8989      ! 
    9090      IF(lwm)   WRITE( numond, namusr_def ) 
Note: See TracChangeset for help on using the changeset viewer.