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 12377 for NEMO/trunk/doc/latex/NEMO/subfiles/chap_misc.tex – NEMO

Ignore:
Timestamp:
2020-02-12T15:39:06+01:00 (4 years ago)
Author:
acc
Message:

The big one. Merging all 2019 developments from the option 1 branch back onto the trunk.

This changeset reproduces 2019/dev_r11943_MERGE_2019 on the trunk using a 2-URL merge
onto a working copy of the trunk. I.e.:

svn merge --ignore-ancestry \

svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk \
svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/branches/2019/dev_r11943_MERGE_2019 ./

The --ignore-ancestry flag avoids problems that may otherwise arise from the fact that
the merge history been trunk and branch may have been applied in a different order but
care has been taken before this step to ensure that all applicable fixes and updates
are present in the merge branch.

The trunk state just before this step has been branched to releases/release-4.0-HEAD
and that branch has been immediately tagged as releases/release-4.0.2. Any fixes
or additions in response to tickets on 4.0, 4.0.1 or 4.0.2 should be done on
releases/release-4.0-HEAD. From now on future 'point' releases (e.g. 4.0.2) will
remain unchanged with periodic releases as needs demand. Note release-4.0-HEAD is a
transitional naming convention. Future full releases, say 4.2, will have a release-4.2
branch which fulfills this role and the first point release (e.g. 4.2.0) will be made
immediately following the release branch creation.

2020 developments can be started from any trunk revision later than this one.

Location:
NEMO/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
         5^/vendors/AGRIF/dev_r11615_ENHANCE-04_namelists_as_internalfiles_agrif@HEAD      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_misc.tex

    r11693 r12377  
    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}} 
Note: See TracChangeset for help on using the changeset viewer.