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 11967 for NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc/latex/global – NEMO

Ignore:
Timestamp:
2019-11-26T15:11:43+01:00 (4 years ago)
Author:
davestorkey
Message:

2019/ENHANCE-02_ISF_nemo_TEST_MERGE : Update to rev 11953.

Location:
NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc
Files:
3 deleted
14 edited
4 copied

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc

    • Property svn:externals set to
      ^/utils/badges badges
      ^/utils/logos logos
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc/latex

    • Property svn:ignore deleted
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc/latex/global

    • Property svn:ignore deleted
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc/latex/global/ametsoc.bst

    r11128 r11967  
    99%% *** Bibliography style file for ALL AMS Journals...version 1.0  *** 
    1010%% *** Brian Papa - American Meteorological Society *** 
    11 %%  
     11%% 
    1212%% Copyright 1994-2004 Patrick W Daly 
    1313 % =============================================================== 
     
    519519  duplicate$ empty$ 'skip$ 
    520520    { 
    521       "\href{http://dx.doi.org/" swap$ * "}{DOI}" * 
     521      "\href{http://dx.doi.org/" swap$ * "}{\aiDoi}" * 
    522522    } 
    523523  if$ 
     
    11921192  crossref missing$ 
    11931193    { format.in.ed.booktitle "booktitle" output.check 
    1194       format.publisher.address output       
     1194      format.publisher.address output 
    11951195      format.bvolume output 
    11961196      format.number.series output 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc/latex/global/annex_D.tex

    r11299 r11967  
    3131- flexible. 
    3232 
    33 To satisfy part of these aims, \NEMO is written with a coding standard which is close to the ECMWF rules, 
     33To satisfy part of these aims, \NEMO\ is written with a coding standard which is close to the ECMWF rules, 
    3434named DOCTOR \citep{gibson_rpt86}.  
    3535These rules present some advantages like: 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc/latex/global/coding_rules.tex

    r11299 r11967  
    1 %\documentclass{article} 
    2  
    3 %\usepackage{fancyhdr} 
    4 %\usepackage{times} 
    5 %\usepackage{graphicx} 
    6 %\usepackage{hyperref} 
    7 %\usepackage{minted} 
    8 %\usepackage[normalem]{ulem}   % striketrough style with \sout{...} 
    9  
    10 %\hypersetup{pdftitle={NEMO coding conventions}, pdfauthor={NEMO System Team}, colorlinks} 
    11 %\setminted{style=emacs, breaklines, frame=leftline} 
    12 %\newmintinline[forcode]{fortran}{fontsize=auto, frame=lines}   % \forcode{...} 
    13 %\newminted[forlines]{fortran}{}                                % \begin{forlines} 
    14  
    15 %\pagestyle{empty} 
    16 %\setlength{\leftmargin}{1 cm} 
    17 %\setlength{\rightmargin}{1 cm} 
    18 %\setlength{\oddsidemargin}{0 cm} 
    19 %\setlength{\evensidemargin}{0 cm} 
    20 %\setlength{\topmargin}{-1cm} 
    21 %\setlength{\textwidth}{16 cm} 
    22 %\setlength{\textheight}{25cm} 
    23 %\pagestyle{fancy} 
    24  
    25 %\title{ 
    26 %  \includegraphics[width=0.3\textwidth]{../../../figures/NEMO_grey} \\ 
    27 %  \vspace{1.0cm} \rule{345pt}{1.5pt} \\ 
    28 %  \vspace{0.45cm} {\Huge NEMO coding conventions} \rule{345pt}{1.5pt} \\ 
    29 %} 
    30 %\title{NEMO coding conventions} 
    31 %\author{\Large NEMO System Team 
    32 %  \thanks{ 
    33 %    To be completed 
    34 %  } 
    35 %} 
    36 %\date{version X.X -- month year} 
    37  
    38 %\begin{document} 
    39  
    40 %\maketitle 
    41  
    42 %\newpage 
    43  
    44 %\tableofcontents 
    45  
    46 %\newpage 
    47  
    48 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     1 
    492\chapter{Coding Rules} 
    50 \label{apdx:coding} 
    51  
    52 \minitoc 
     3\label{apdx:CODING} 
     4 
     5\chaptertoc 
    536 
    547\newpage 
     
    6114Therefore, it is essential that the model development follows some rules: 
    6215 
    63 - well planned and designed 
    64  
    65 - well written 
    66  
    67 - well documented (both on- and off-line) 
    68  
    69 - maintainable 
    70  
    71 - easily portable 
    72  
    73 - flexible. 
    74  
    75 To satisfy part of these aims, \NEMO is written with a coding standard which is close to the ECMWF rules, 
    76 named DOCTOR \citep{gibson_rpt86}.  
     16\begin{itemize} 
     17\item well planned and designed 
     18\item well written 
     19\item well documented (both on- and off-line) 
     20\item maintainable 
     21\item easily portable 
     22\item flexible. 
     23\end{itemize} 
     24 
     25To satisfy part of these aims, \NEMO\ is written with a coding standard which is close to the ECMWF rules, 
     26named DOCTOR \citep{gibson_rpt86}. 
    7727These rules present some advantages like: 
    7828 
    79 - to provide a well presented program 
    80  
    81 - to use rules for variable names which allow recognition of their type 
    82 (integer, real, parameter, local or shared variables, etc. ).  
     29\begin{itemize} 
     30\item to provide a well presented program 
     31\item to use rules for variable names which allow recognition of their type   (integer, real, parameter, local or shared variables, etc. ). 
     32\end{itemize} 
    8333 
    8434This facilitates both the understanding and the debugging of an algorithm. 
     
    8636\section{Introduction} 
    8737 
    88 This document describes conventions\index{conventions} used in NEMO coding and suggested for its development. 
    89 The objectives are to offer a guide to all readers of the NEMO code, and to facilitate the work of 
     38This document describes conventions used in \NEMO\ coding and suggested for its development. 
     39The objectives are to offer a guide to all readers of the \NEMO\ code, and to facilitate the work of 
    9040all the developers, including the validation of their developments, and 
    91 eventually the implementation of these developments within the NEMO platform. 
     41eventually the implementation of these developments within the \NEMO\ platform. 
    9242 
    9343A first approach of these rules can be found in the code in \path{./src/OCE/module_example} where 
     
    9646 
    9747This work is based on the coding conventions in use for the Community Climate System Model 
    98 \footnote {\href{http://www.cesm.ucar.edu/working_groups/Software/dev_guide/dev_guide/node7.html}{UCAR conventions}},  
     48\footnote {\href{http://www.cesm.ucar.edu/working_groups/Software/dev_guide/dev_guide/node7.html}{UCAR conventions}}, 
    9949the previous version of this document (``FORTRAN coding standard in the OPA System'') and 
    100 the expertise of the NEMO System Team. 
     50the expertise of the \NEMO\ System Team. 
    10151After a general overview below, this document will describe: 
    10252 
    10353\begin{itemize} 
    104 \item 
    105   The style rules, $i.e.$ the syntax, appearance and naming conventions chosen to improve readability of the code; 
    106 \item 
    107   The content rules, $i.e.$ the conventions to improve the reliability of the different parts of the code; 
    108 \item 
    109   The package rules to go a step further by improving the reliability of the whole and 
    110   interfaces between routines and modules. 
     54\item The style rules, $i.e.$ the syntax, appearance and naming conventions chosen to improve readability of the code; 
     55\item The content rules, $i.e.$ the conventions to improve the reliability of the different parts of the code; 
     56\item The package rules to go a step further by improving the reliability of the whole and 
     57   interfaces between routines and modules. 
    11158\end{itemize} 
    11259 
    113 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    11460\section{Overview and general conventions} 
    11561 
    116 NEMO has 3 major components: ocean dynamics (\path{./src/OCE}), sea-ice (\path{./src/ICE}) and 
     62\NEMO\ has 3 major components: ocean dynamics (\path{./src/OCE}), sea-ice (\path{./src/ICE}) and 
    11763marine biogeochemistry (\path{./src/MBG}). 
    11864%, linear-tangent and adjoint of the dynamics ($TAM$) each of them corresponding to a directory. 
     
    12672See \path{.src/OCE/DOM/phycst.F90} files for conversions. 
    12773 
    128 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    12974\section{Architecture} 
    13075 
    131 Within each directory, organisation of files is driven by orthogonality\index{orthogonality}, 
     76Within each directory, organisation of files is driven by orthogonality, 
    13277$i.e.$ one functionality of the code is intended to be in one and only one directory, and 
    13378one module and all its related routines are in one file. 
    134 The functional modules\index{module} are: 
     79The functional modules are: 
    13580 
    13681\begin{itemize} 
     
    13883\item \path{IOM}             management of the I/O 
    13984\item \path{NST}             interface to AGRIF (nesting model) for dynamics and biogeochemistry 
    140 \item \path{OBC}, \path{BDY} management of structured and unstructured open boundaries  
     85\item \path{OBC}, \path{BDY} management of structured and unstructured open boundaries 
    14186\item \path{C1D}             1D (vertical) configuration for dynamics, sea-ice and biogeochemistry 
    14287\item \path{OFF}             off-line module: passive tracer or biogeochemistry alone 
     
    14792this module (\texttt{dom\_init, dom\_nam, dom\_ctl}). 
    14893 
    149 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    15094\section{Style rules} 
    15195 
    152 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    15396\subsection{Argument list format} 
    15497 
    155 Routine argument lists will contain a maximum 5 variables\index{variable} per line, 
     98Routine argument lists will contain a maximum 5 variables per line, 
    15699whilst continuation lines can be used. 
    157100This applies both to the calling routine and the dummy argument list in the routine being called. 
     
    164107\end{forlines} 
    165108 
    166 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    167109\subsection{Array syntax} 
    168110 
     
    198140\end{forlines} 
    199141 
    200 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    201142\subsection{Case} 
    202143 
    203144All FORTRAN keywords are in capital: \forcode{DIMENSION}, \forcode{WRITE}, \forcode{DO}, \forcode{END DO}, 
    204 \forcode{NAMELIST}, ... All other parts of the NEMO code will be written in lower case. 
    205  
    206 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     145\forcode{NAMELIST}, ... All other parts of the \NEMO\ code will be written in lower case. 
     146 
    207147\subsection{Comments} 
    208148 
     
    248188\end{enumerate} 
    249189 
    250 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    251190\subsection{Continuation lines} 
    252191 
     
    265204use a ``\&'' as first character of the continuing lines to maintain the alignment. 
    266205 
    267 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    268206\subsection{Declaration of arguments and local variables} 
    269207 
     
    277215\end{forlines} 
    278216 
    279 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    280217\subsection{F90 Standard} 
    281218 
    282 NEMO software adheres to the FORTRAN 95 language standard and does not rely on any specific language or 
     219\NEMO\ software adheres to the \fninety language standard and does not rely on any specific language or 
    283220vendor extensions. 
    284221 
    285  
    286 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    287222\subsection{Free-Form Source} 
    288223 
     
    292227Multi-line comments that extend to column 100 are unacceptable. 
    293228 
    294 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    295229\subsection{Indentation} 
    296230 
     
    310244\end{forlines} 
    311245 
    312 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    313246\subsection{Loops} 
    314247 
     
    317250In the case of a long loop, a self-descriptive label can be used ($i.e.$ not just a number). 
    318251 
    319 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    320252\subsection{Naming Conventions: files} 
    321253 
     
    331263} 
    332264 
    333 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    334265\subsection{Naming Conventions: modules} 
    335266 
     
    338269For example, zdftke, where ``zdf'' stands for vertical diffusion, and ``tke'' for turbulent kinetic energy. \\ 
    339270Note that by implication multiple modules are not allowed in a single file. 
    340 The use of common blocks is deprecated in Fortran 90 and their use in NEMO is strongly discouraged. 
     271The use of common blocks is deprecated in \fortran 90 and their use in \NEMO\ is strongly discouraged. 
    341272Modules are a better way to declare static data. 
    342273Among the advantages of modules is the ability to freely mix data of various types, and 
    343274to limit access to contained variables through the use of the \forcode{ONLY} and \forcode{PRIVATE} attributes. 
    344275 
    345 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    346276\subsection{Naming Conventions: variables} 
    347277 
    348278All variable should be named as explicitly as possible in English. 
    349279The naming convention concerns prefix letters of these name, in order to identify the variable type and status. \\ 
    350 Never use a FORTRAN keyword as a routine or variable name. \\ 
     280Never use a \fortran keyword as a routine or variable name. \\ 
    351281The table below lists the starting letter(s) to be used for variable naming, depending on their type and status: 
    352282%--------------------------------------------------TABLE-------------------------------------------------- 
     
    355285    \begin{tabular}{|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|} 
    356286      \hline 
    357       Type \par / Status &   integer&   real&   logical &   character&   double \par precision&   complex \\ 
     287      Type \par / Status                                                                          & 
     288      integer                                                                                     & 
     289      real                                                                                        & 
     290      logical                                                                                     & 
     291      character                                                                                   & 
     292      double \par precision                                                                       & 
     293      complex                                                                                     \\ 
    358294      \hline 
    359       public  \par or  \par module variable& \textbf{m n} \par \textit{but not } \par \textbf{nn\_}& \textbf{a b e f g h o} \textbf{q} \textit{to} \textbf{x} \par but not \par \textbf{fs rn\_}& \textbf{l} \par \textit{but not} \par \textbf{lp ld ll ln\_}& \textbf{c} \par \textit{but not} \par \textbf{cp cd cl cn\_}& \textbf{d} \par \textit{but not} \par \textbf{dp dd dl dn\_}& \textbf{y} \par \textit{but not} \par \textbf{yp yd yl} \\ 
     295      public \par or \par module variable                                                         & 
     296      \textbf{m n} \par \textit{but not} \par \textbf{nn\_}                                       & 
     297      \textbf{a b e f g h o} \textbf{q} \textit{to} \textbf{x} \par but not \par \textbf{fs rn\_} & 
     298      \textbf{l} \par \textit{but not} \par \textbf{lp ld ll ln\_}                                & 
     299      \textbf{c} \par \textit{but not} \par \textbf{cp cd cl cn\_}                                & 
     300      \textbf{d} \par \textit{but not} \par \textbf{dp dd dl dn\_}                                & 
     301      \textbf{y} \par \textit{but not} \par \textbf{yp yd yl}                                     \\ 
    360302      \hline 
    361       dummy \par argument& \textbf{k} \par \textit{but not} \par \textbf{kf}& \textbf{p} \par \textit{but not}  \par \textbf{pp pf}& \textbf{ld}& \textbf{cd}& \textbf{dd}& \textbf{yd} \\ 
     303      dummy \par argument                                                                         & 
     304      \textbf{k} \par \textit{but not} \par \textbf{kf}                                           & 
     305      \textbf{p} \par \textit{but not} \par \textbf{pp pf}                                        & 
     306      \textbf{ld}                                                                                 & 
     307      \textbf{cd}                                                                                 & 
     308      \textbf{dd}                                                                                 & 
     309      \textbf{yd}                                                                                 \\ 
    362310      \hline 
    363       local \par variable& \textbf{i}& \textbf{z}& \textbf{ll}& \textbf{cl}& \textbf{cd}& \textbf{yl} \\ 
     311      local \par variable                                                                         & 
     312      \textbf{i}                                                                                  & 
     313      \textbf{z}                                                                                  & 
     314      \textbf{ll}                                                                                 & 
     315      \textbf{cl}                                                                                 & 
     316      \textbf{cd}                                                                                 & 
     317      \textbf{yl}                                                                                 \\ 
    364318      \hline 
    365       loop \par control& \textbf{j} \par \textit{but not } \par \textbf{jp}& & & & &  \\ 
     319      loop \par control                                                                           & 
     320      \textbf{j} \par \textit{but not} \par \textbf{jp}                                           & 
     321                                                                                                  & 
     322                                                                                                  & 
     323                                                                                                  & 
     324                                                                                                  & 
     325                                                                                                  \\ 
    366326      \hline 
    367       parameter& \textbf{jp}& \textbf{pp}& \textbf{lp}& \textbf{cp}& \textbf{dp}& \textbf{yp} \\ 
     327      parameter                                                                                   & 
     328      \textbf{jp}                                                                                 & 
     329      \textbf{pp}                                                                                 & 
     330      \textbf{lp}                                                                                 & 
     331      \textbf{cp}                                                                                 & 
     332      \textbf{dp}                                                                                 & 
     333      \textbf{yp}                                                                                 \\ 
    368334      \hline 
    369       namelist& \textbf{nn\_}& \textbf{rn\_}& \textbf{ln\_}& \textbf{cn\_}& \textbf{dn\_}& \\ 
     335      namelist                                                                                    & 
     336      \textbf{nn\_}                                                                               & 
     337      \textbf{rn\_}                                                                               & 
     338      \textbf{ln\_}                                                                               & 
     339      \textbf{cn\_}                                                                               & 
     340      \textbf{dn\_}                                                                               & 
     341                                                                                                  \\ 
    370342      \hline 
    371       CPP \par macro& \textbf{kf}& \textbf{sf} \par & & & & \\ 
     343      CPP \par macro                                                                              & 
     344      \textbf{kf}                                                                                 & 
     345      \textbf{sf}                                                                                 & 
     346                                                                                                  & 
     347                                                                                                  & 
     348                                                                                                  & 
     349                                                                                                  \\ 
    372350      \hline 
    373351    \end{tabular} 
     
    377355%-------------------------------------------------------------------------------------------------------------- 
    378356 
    379 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    380357\subsection{Operators} 
    381358 
     
    385362In general use the notation: \\ 
    386363$<Blank><Operator><Blank>$ 
    387 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     364 
    388365\subsection{Pre processor} 
    389366 
     
    412389Is to be used rather than the \#ifdef abbreviate form since it may have conflicts with some Unix scripts. 
    413390 
    414 Tests on cpp keys included in NEMO at compilation step: 
     391Tests on cpp keys included in \NEMO\ at compilation step: 
    415392 
    416393\begin{itemize} 
     
    421398  If a change occurs in the CPP keys used for a given experiment, the whole compilation phase is done again. 
    422399\end{itemize} 
    423 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     400 
    424401\section{Content rules} 
    425402 
    426 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    427403\subsection{Configurations} 
    428404 
    429 The configuration defines the domain and the grid on which NEMO is running. 
    430 It may be useful to associate a cpp key and some variables to a given configuration, although 
     405The configuration defines the domain and the grid on which \NEMO\ is running. 
     406It may be useful to associate a CPP key and some variables to a given configuration, although 
    431407the part of the code changed under each of those keys should be minimized. 
    432408As an example, the "ORCA2" configuration (global ocean, 2 degrees grid size) is associated with 
     
    438414\end{forlines} 
    439415 
    440 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    441416\subsection{Constants} 
    442417 
    443 Physical constants ($e.g.$ $\pi$, gas constants) must never be hardwired into the executable portion of a code. 
     418Physical constants ($e.g.$ $\pi$, gas constants) must never be hard-wired into the executable portion of a code. 
    444419Instead, a mnemonically named variable or parameter should be set to the appropriate value, 
    445 in the setup routine for the package\index{package}. 
     420in the setup routine for the package. 
    446421We realize than many parameterizations rely on empirically derived constants or fudge factors, 
    447422which are not easy to name. 
     
    450425Hard-coded numbers should never be passed through argument lists. 
    451426 
    452 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    453427\subsection{Declaration for variables and constants} 
    454428 
     
    512486improve control of variables in routine calls. 
    513487 
    514 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    515488\subsection{Headers} 
    516489 
    517 Prologues are not used in NEMO for now, although it may become an interesting tool in combination with 
     490Prologues are not used in \NEMO\ for now, although it may become an interesting tool in combination with 
    518491ProTeX auto documentation script in the future. 
    519492Rules to code the headers and layout of a module or a routine are illustrated in the example module available with 
    520493the code: \path{./src/OCE/module_example} 
    521494 
    522 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    523495\subsection{Interface blocks} 
    524496 
     
    528500FORTRAN 95 compilers can automatically provide explicit interface blocks for routines contained in a module. 
    529501 
    530 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    531502\subsection{I/O Error Conditions} 
    532503 
     
    536507a negative value means the end of record or end of file was encountered. 
    537508 
    538 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    539509\subsection{PRINT - ASCII output files} 
    540510 
     
    551521\end{forlines} 
    552522 
    553 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    554523\subsection{Precision} 
    555524 
     
    570539\end{forlines} 
    571540 
    572 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    573541\subsection{Structures} 
    574542 
    575 The \forcode{TYPE} structure allowing to declare some variables is more often used in NEMO, 
     543The \forcode{TYPE} structure allowing to declare some variables is more often used in \NEMO, 
    576544especially in the modules dealing with reading fields, or interfaces. 
    577545For example: 
     
    592560Missing rule on structure name?? 
    593561 
    594 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    595562\section{Packages coding rules} 
    596563 
    597 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    598564\subsection{Bounds checking} 
    599565 
    600 NEMO is able to run when an array bounds checking option is enabled 
     566\NEMO\ is able to run when an array bounds checking option is enabled 
    601567(provided the cpp key \texttt{key\_vectopt\_loop} is not defined). \\ 
    602568Thus, constructs of the following form are disallowed: 
     
    610576it effectively disables array bounds checking. 
    611577 
    612 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    613578\subsection{Communication} 
    614579 
     
    624589} 
    625590 
    626 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    627591\subsection{Error conditions} 
    628592 
     
    634598see \textit{stpctl.F90}. 
    635599 
    636 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    637600\subsection{Memory management} 
    638601 
    639602The main action is to identify and declare which arrays are \forcode{PUBLIC} and which are \forcode{PRIVATE}. \\ 
    640 As of version 3.3.1 of NEMO, the use of static arrays (size fixed at compile time) has been deprecated. 
     603As of version 3.3.1 of \NEMO, the use of static arrays (size fixed at compile time) has been deprecated. 
    641604All module arrays are now declared \forcode{ALLOCATABLE} and 
    642605allocated in either the \texttt{<module\_name>\_alloc()} or \texttt{<module\_name>\_init()} routines. 
     
    644607the \texttt{stat=<integer\ variable>} optional argument. \\ 
    645608 
    646 In addition to arrays contained within modules, many routines in NEMO require local, ``workspace'' arrays to 
     609In addition to arrays contained within modules, many routines in \NEMO\ require local, ``workspace'' arrays to 
    647610hold the intermediate results of calculations. 
    648 In previous versions of NEMO, these arrays were declared in such a way as to be automatically allocated on 
     611In previous versions of \NEMO, these arrays were declared in such a way as to be automatically allocated on 
    649612the stack when the routine was called. 
    650613An example of an automatic array is: 
     
    735698It is then associated with a sub-array of \texttt{wrk\_3d\_5} once the call to 
    736699\texttt{wrk\_in\_use()} has completed successfully. 
    737 Note that in F95 (to which NEMO conforms) it is not possible for either the upper or lower array bounds of 
     700Note that in F95 (to which \NEMO\ conforms) it is not possible for either the upper or lower array bounds of 
    738701the pointer object to differ from those of the target array. \\ 
    739702 
     
    748711This should enable the developer to choose alternatives for use in the subroutine being worked on. \\ 
    749712 
    750 When compiling NEMO for production runs, 
     713When compiling \NEMO\ for production runs, 
    751714the calls to {\texttt{wrk\_in\_use()} / \texttt{wrk\_not\_released()} can be reduced to stubs that just 
    752715return \forcode{.false.} by setting the cpp key \texttt{key\_no\_workspace\_check}. 
    753 These stubs may then be inlined (and thus effectively removed altogether) by setting appropriate compiler flags 
     716These stubs may then be in-lined (and thus effectively removed altogether) by setting appropriate compiler flags 
    754717($e.g.$ ``-finline'' for the Intel compiler or ``-Q'' for the IBM compiler). 
    755718 
    756 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    757719\subsection{Optimisation} 
    758720 
    759721Considering the new computer architecture, optimisation cannot be considered independently from the computer type. 
    760 In NEMO, portability is a priority, before any too specific optimisation. 
     722In \NEMO, portability is a priority, before any too specific optimisation. 
    761723 
    762724Some tools are available to help: for vector computers, \texttt{key\_vectopt\_loop} allows to unroll a loop 
    763725 
    764 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    765726\subsection{Package attribute: \forcode{PRIVATE}, \forcode{PUBLIC}, \forcode{USE}, \forcode{ONLY}} 
    766727 
     
    770731defined in a module are to be made available to the using routine. 
    771732 
    772 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    773 \subsection {Parallelism using MPI} 
    774  
    775 NEMO is written in order to be able to run on one processor, or on one or more using MPI 
     733\subsection{Parallelism using MPI} 
     734 
     735\NEMO\ is written in order to be able to run on one processor, or on one or more using MPI 
    776736($i.e.$ activating the cpp key $key\_mpp\_mpi$). 
    777 The domain decomposition divides the global domain in cubes (see NEMO reference manual). 
     737The domain decomposition divides the global domain in cubes (see \NEMO\ reference manual). 
    778738Whilst coding a new development, the MPI compatibility has to be taken in account 
    779739(see \path{./src/LBC/lib_mpp.F90}) and should be tested. 
    780740By default, the $x$-$z$ part of the decomposition is chosen to be as square as possible. 
    781 However, this may be overriden by specifying the number of subdomains in latitude and longitude in 
     741However, this may be overriden by specifying the number of sub-domains in latitude and longitude in 
    782742the \texttt{nammpp} section of the namelist file. 
    783743 
    784 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    785744\section{Features to be avoided} 
    786745 
     
    790749Below is a list of features to avoid: 
    791750\begin{itemize} 
    792 \item 
    793   \forcode{COMMON} block 
     751\item \forcode{COMMON} block 
    794752  (use the declaration part of \forcode{MODULE} instead) 
    795 \item 
    796   \forcode{EQUIVALENCE} 
     753\item \forcode{EQUIVALENCE} 
    797754  (use \forcode{POINTER} or derived data type instead to form data structure) 
    798 \item 
    799   Assigned and computed \forcode{GOTO} 
     755\item Assigned and computed \forcode{GOTO} 
    800756  (use the \forcode{CASE} construct instead) 
    801 \item 
    802   Arithmetic \forcode{IF} statement 
     757\item Arithmetic \forcode{IF} statement 
    803758  (use the block \forcode{IF}, \forcode{ELSE}, \forcode{ELSEIF}, \forcode{ENDIF} or 
    804759  \forcode{SELECT CASE} construct instead) 
    805 \item 
    806   Labeled \forcode{DO} construct 
    807   (use unlabeled \forcode{END DO} instead) 
    808 \item 
    809   \forcode{FORMAT} statement 
     760\item Labelled \forcode{DO} construct 
     761  (use unlabelled \forcode{END DO} instead) 
     762\item \forcode{FORMAT} statement 
    810763  (use character parameters or 
    811764  explicit format- specifiers inside the \forcode{READ} or \forcode{WRITE} statement instead) 
    812 \item 
    813   \forcode{GOTO} and \forcode{CONTINUE} statements 
     765\item \forcode{GOTO} and \forcode{CONTINUE} statements 
    814766  (use \forcode{IF}, \forcode{CASE}, \forcode{DO WHILE}, \forcode{EXIT} or \forcode{CYCLE} statements or 
    815767  a contained ?) 
    816 \item 
    817   \forcode{PAUSE} 
    818 \item 
    819   \forcode{ENTRY} statement: a subprogram must only have one entry point. 
    820 \item 
    821   \forcode{RETURN} is obsolete and so not necessary at the end of program units 
    822 \item 
    823   \forcode{FUNCTION} statement 
    824 \item 
    825   Avoid functions with side effects. 
     768\item \forcode{PAUSE} 
     769\item \forcode{ENTRY} statement: a sub-program must only have one entry point. 
     770\item \forcode{RETURN} is obsolete and so not necessary at the end of program units 
     771\item \forcode{FUNCTION} statement 
     772\item Avoid functions with side effects. 
    826773  \footnote{ 
    827774    First, the code is easier to understand, if you can rely on 
     
    832779    This is especially important on massive parallel and as well on vector machines. 
    833780  } 
    834 \item 
    835   \forcode{DATA} and \forcode{BLOCK DATA} 
     781\item \forcode{DATA} and \forcode{BLOCK DATA} 
    836782  (use initialisers) 
    837783\end{itemize} 
    838784 
    839 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    840  
    841 % \printindex 
    842 % \input NEMO_coding.conv.ind 
    843  
    844 %\end{document} 
     785%% Imported from introduction 
     786%%gm    To be put somewhere else .... 
     787%%nm    We should consider creating a glossary for all this kind of stuff (terms, acronyms and symbols) 
     788%%      http://en.wikibooks.org/wiki/LaTeX/Glossary 
     789%\noindent CPP keys and namelists are used as inputs to the code. 
     790 
     791%\noindent \index{CPP keys} CPP keys 
     792 
     793%Some CPP keys are implemented in the \fortran code to allow code selection at compiling step. 
     794%This selection of code at compilation time reduces the reliability of the whole platform since 
     795%it changes the code from one set of CPP keys to the other. 
     796%It is used only when the addition/suppression of the part of code highly changes the amount of memory at run time. 
     797%Usual coding looks like: 
     798 
     799%\begin{forlines} 
     800%#if defined key_option1 
     801%  ! This part of the \fortran code will be active 
     802%  ! only if key_option1 is activated at compiling step 
     803%#endif 
     804%\end{forlines} 
     805 
     806%\noindent \index{Namelist} Namelists 
     807 
     808%The namelist allows to input variables (character, logical, real and integer) into the code. 
     809%There is one namelist file for each component of \NEMO\ (dynamics, sea-ice, biogeochemistry...) 
     810%containing all the \fortran namelists needed. 
     811%The implementation in \NEMO\ uses a 2-step process. 
     812%For each \fortran namelist, two files are read: 
     813 
     814%\begin{enumerate} 
     815%\item 
     816%  A reference namelist (in \path{./cfgs/SHARED/namelist_ref}) is read first. 
     817%  This file contains all the namelist variables which are initialised to default values 
     818%\item 
     819%  A configuration namelist (in \path{./cfgs/CFG_NAME/EXP00/namelist_cfg}) is read aferwards. 
     820%  This file contains only the namelist variables which are changed from default values, and overwrites those. 
     821%\end{enumerate} 
     822%A template can be found in \path{NEMO/OPA_SRC/module.example}. 
     823%The effective namelist, taken in account during the run, is stored at execution time in 
     824%an \texttt{output\_namelist\_dyn} (or \texttt{\_ice} or \texttt{\_top}) file. 
     825%%gm  end 
     826 
     827%%nm: Add some words on the \NEMO\ dependencies 
     828%The model is implemented in \fninety, with preprocessing (C pre-processor). 
     829%It runs under UNIX. 
     830%It is optimized for vector computers and parallelised by domain decomposition with MPI. 
     831%All input and output is done in NetCDF (Network Common Data Format) with a optional direct access format for output. 
     832%To ensure the clarity and readability of the code it is necessary to follow coding rules. 
     833%The coding rules for OPA include conventions for naming variables, 
     834%with different starting letters for different types of variables (real, integer, parameter\ldots). 
     835%Those rules are briefly presented in \autoref{apdx:coding} and a more complete document is available . 
     836 
     837%The model is organized with a high internal modularity based on physics. 
     838%For example, each trend (\ie, a term in the RHS of the prognostic equation) for momentum and tracers 
     839%is computed in a dedicated module. 
     840%To make it easier for the user to find his way around the code, the module names follow a three-letter rule. 
     841%For example, \mdl{traldf} is a module related to the TRAcers equation, computing the Lateral DiFfussion. 
     842%The complete list of module names is presented in \autoref{apdx:coding}.      %====>>>> to be done ! 
     843%Furthermore, modules are organized in a few directories that correspond to their category, 
     844%as indicated by the first three letters of their name (\autoref{tab:chapters}). 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc/latex/global/document.tex

    r11299 r11967  
    11 
    2 %% ============================================================================== 
    3 %% Template structure for reference manual 
    4 %% ============================================================================== 
     2%% ================================================================================================= 
     3%% Template structure for reference manuals 
     4%% ================================================================================================= 
    55 
    66%% NEMO release version 
    7 \def \version{4.0rc~} 
     7\def \version{trunk} 
    88 
    99%% Preamble 
    10 %% ============================================================================== 
     10%% ================================================================================================= 
    1111 
    1212%% Document layout 
    13 \documentclass[draft]{scrreprt} 
     13\documentclass[fontsize = 10pt, twoside, abstract]{scrreprt} 
    1414 
    15 %% Load the configuration of the manual 
    16 \input{../main/definitions} 
    17  
    18 %% Load global *.tex files 
    19 \input{../../global/preamble} 
    20  
    21 \dominitoc 
    22  
    23 %% Launch the creation of the indexes 
    24 \input{../../global/indexes} 
    25  
     15%% Load manual configuration 
     16\input{../../global/prologue} 
    2617 
    2718%% End of common preamble between main and sub-files 
    2819%% Override custom cmds for full manual compilation 
    29 \newcommand{\onlyinsubfile}[1]{#1} 
    30 \newcommand{\notinsubfile}[1]{} 
     20\newcommand{\subinc}[1]{#1} 
     21\newcommand{\subexc}[1]{} 
    3122 
    3223\begin{document} 
    3324 
    34 \renewcommand{\onlyinsubfile}[1]{} 
    35 \renewcommand{\notinsubfile}[1]{#1} 
    36  
    37 \renewcommand{\biblio}{} 
    38 \renewcommand{\pindex}{} 
     25\renewcommand{\subinc}[1]{} 
     26\renewcommand{\subexc}[1]{#1} 
    3927 
    4028 
    4129%% Frontmatter 
    42 %% ============================================================================== 
     30%% ================================================================================================= 
    4331 
    44 \pagenumbering{gobble} 
     32\pagenumbering{gobble}   %% Disable page numbering temporarily 
    4533 
    4634%% Title page 
    4735\input{../../global/frontpage} 
    4836 
    49 \maketitle 
    50 \emptythanks 
     37%% Footer for introductory parts (no header by cleaning default) 
     38\ofoot[]{\engine\ Reference Manual} \ifoot[]{\pagemark} 
    5139 
    5240%% Information page (2nd page) 
    5341\input{../../global/info_page} 
    5442 
    55 %% Foreword 
    56 %\frontmatter   %% Chapter numbering off and Roman numerals for page numbers 
     43\listoffigures 
     44\listoflistings 
     45\listoftables 
     46 
     47\clearpage 
     48 
    5749\pagenumbering{roman} 
    58 \input{foreword} 
     50\ofoot[]{\engine\ Reference Manual} \ifoot[]{\pagemark} 
     51 
     52\input{introduction} 
    5953 
    6054%% Table of Contents 
    6155\tableofcontents 
    62 \listoffigures 
    63 \listoftables 
    64 \listoflistings 
    6556 
    6657\clearpage 
    67 %\end{document} 
    6858 
    6959 
    7060%% Mainmatter 
    71 %% ============================================================================== 
     61%% ================================================================================================= 
    7262 
    73 %\mainmatter   %% Chapter numbering on, page numbering is reset with Arabic numerals 
     63%% Headings for document body 
    7464\pagenumbering{arabic} 
     65\lohead{Chap.\ \thechapter\ \leftmark} \rehead{Sect.\ \thesection\ \rightmark} 
     66\ifoot[]{Page\ \pagemark\ of \pageref*{LastPage}} 
    7567 
    7668\include{chapters} 
     
    7870 
    7971%% Appendix 
    80 %% ============================================================================== 
     72%% ================================================================================================= 
    8173 
    82 %% Chapter numbering is reset with letters now 
    83 \appendix    
    84  
     74\appendix   %% Chapter numbering with letters by now 
     75\lohead{Apdx\ \thechapter\ \leftmark} 
    8576\include{appendices} 
    8677 
     
    9081 
    9182%% Backmatter 
    92 %% ============================================================================== 
     83%% ================================================================================================= 
    9384 
    94 %\backmatter   %% Chapter numbering off 
    95  
    96 %% Bibliography 
    97 \phantomsection 
    98 \addcontentsline{toc}{chapter}{Bibliography} 
    99 \bibliography{../main/bibliography} 
    100  
    101 %% Index 
    102 \clearpage 
    103 \phantomsection 
    104 \addcontentsline{toc}{chapter}{Indexes} 
    105 \printindex[keys] 
    106 \printindex[modules] 
    107 \printindex[blocks] 
    108 \printindex[parameters] 
    109 \printindex[subroutines] 
     85%% Bibliography and indexes 
     86\input{../../global/epilogue} 
    11087 
    11188\end{document} 
    112  
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc/latex/global/frontpage.tex

    r11176 r11967  
    11 
    2 \title{\heading} 
    3 \author{\firstauthor \and \secondauthor\thanks{\protect\input{thanks}}} 
    4 \date{\today} 
     2\begin{titlepage} 
     3%  \newgeometry{hmargin = 1.5cm, vmargin = 3cm} 
     4  \setlength{\parindent}{0pt} 
    55 
    6 \pretitle{ 
    76  \begin{center} 
    8 \begin{figure}[H] 
    9   \begin{minipage}[c]{0.35\textwidth} 
    10     \href{http://www.nemo-ocean.eu}{\includegraphics[width=0.7\textwidth]{logos/NEMO_grey}} 
     7    \begin{minipage}{0.3\textwidth} 
     8      \includegraphics[height=1.5cm]{logos/NEMO_grey} 
     9    \end{minipage}\begin{minipage}{0.6\textwidth} 
     10      \begin{center} 
     11      \Large\slshape 
     12      \textbf{N}ucleus for \textbf{E}uropean \textbf{M}odelling of the \textbf{O}cean \\ 
     13      \medskip 
     14      \hyperref[resources]{\textcolor{black}{ 
     15          \faWordpress \hspace{0.75cm} \faCodeFork      \hspace{0.75cm} 
     16          \faGithub    \hspace{0.75cm} \faCloudDownload \hspace{0.75cm} \faEnvelope 
     17        } 
     18      } 
     19      \end{center} 
     20    \end{minipage} 
     21  \end{center} 
     22 
     23  \spacetop 
     24  \textcolor{white}{\fontsize{0.8cm}{0.8cm}\selectfont\textbf{\heading}} 
     25  \ifdef{\subheading}{ 
     26    \medskip 
     27    \par 
     28    \textcolor{white}{\Huge \subheading} 
     29  }{} 
     30  \spacedown 
     31 
     32  \begin{center} 
     33    \LARGE Version \version\ -\ \today \\ 
     34    \medskip 
     35    \href{http://doi.org/10.5281/zenodo.\zid}{ \includegraphics{badges/zenodo.\zid} } 
     36  \end{center} 
     37 
     38  \vfill 
     39 
     40  \begin{minipage}{\authorswidth} 
     41    \raggedleft 
     42    \input{authors} 
     43  \end{minipage}\hspace{15pt}\begin{minipage}{0.02\linewidth} 
     44    \rule{1pt}{\rulelenght} 
     45  \end{minipage}\hspace{ 5pt}\begin{minipage}{\abstractwidth} 
     46    \begin{abstract} 
     47      \input{abstract} 
     48    \end{abstract} 
    1149  \end{minipage} 
    12   \hfill 
    13   \begin{minipage}[c]{0.65\textwidth} 
    14     \centering 
    15     \large{\em{{N}ucleus for {E}uropean {M}odelling of the {O}cean}} 
    16   \end{minipage} 
    17 \end{figure} 
    18 \vfill 
    19     \Huge 
    20 } 
    21 \posttitle{\par\end{center}\vskip 0.5em} 
    22 \preauthor{\begin{center}\Large\lineskip0.5em\begin{tabular}[t]{c}} 
    23 \postauthor{\end{tabular}\par\end{center}} 
    24 \predate{ 
     50 
    2551  \vfill 
     52 
    2653  \begin{center} 
    27     \large Version \version --- 
    28 } 
    29 \postdate{ 
    30     \par~\\ 
    31     \href{http://doi.org/10.5281/zenodo.\zid}{\includegraphics{{badges/zenodo.\zid}.pdf}} 
     54    \Large 
     55    \href{http://www.cmcc.it          }{ \includegraphics[height=1cm]{logos/CMCC} } \hspace{0.25cm} 
     56    \href{http://www.cnrs.fr          }{ \includegraphics[height=1cm]{logos/CNRS} } \hspace{0.25cm} 
     57    \href{http://www.mercator-ocean.fr}{ \includegraphics[height=1cm]{logos/MOI}  } \hspace{0.25cm} 
     58    \href{http://www.metoffice.gov.uk }{ \includegraphics[height=1cm]{logos/UKMO} } \hspace{0.25cm} 
     59    \href{http://nerc.ukri.org        }{ \includegraphics[height=1cm]{logos/NERC} } \\ 
     60    \medskip 
     61    \slshape 
     62    {C}ommunity \hspace{1.5em} {O}cean \hspace{1.5em} {M}odel \\ 
    3263  \end{center} 
    33   \vfill 
    34   \begin{center} 
    35     \href{http://www.cmcc.it}{          \includegraphics[height=0.055\textheight]{logos/CMCC}} 
    36     \hspace{0.5em} 
    37     \href{http://www.cnrs.fr}{          \includegraphics[height=0.055\textheight]{logos/CNRS}} 
    38     \hspace{0.9em} 
    39     \href{http://www.mercator-ocean.fr}{\includegraphics[height=0.055\textheight]{logos/MOI} } 
    40     \hspace{0.45em} 
    41     \href{http://www.metoffice.gov.uk}{ \includegraphics[height=0.055\textheight]{logos/UKMO}} 
    42     \hspace{0.5em} 
    43     \href{http://nerc.ukri.org}{        \includegraphics[height=0.055\textheight]{logos/NERC}} \\ 
    44     \large{{\em{C}ommunity \hspace{1.5em} {O}cean \hspace{1.5em} {M}odel}} 
    45   \end{center} 
    46 } 
    4764 
    48 \thanksmarkseries{fnsymbol} 
     65\end{titlepage} 
    4966 
     67\restoregeometry 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc/latex/global/highlighting.tex

    r11310 r11967  
    22%% ============================================================================== 
    33 
    4 \usepackage[outputdir=../build]{minted} 
     4\usepackage[outputdir=../build, chapter, newfloat]{minted} 
    55 
    66%% Global highlighting style 
    77\definecolor{bg}{HTML}{f8f8f8} 
    88\usemintedstyle{emacs} 
    9 \setminted{bgcolor=bg, fontsize=\scriptsize, breaklines, frame=leftline} 
     9\setminted{bgcolor=bg, fontsize=\scriptsize, breaklines} 
    1010\setminted[xml]{style=borland} %% Specific per language 
    1111 
     
    2222 
    2323%% File 
    24 \newmintedfile[forfile]{fortran}{}   % \forfile{../namelists/nam...} 
     24\newmintedfile[forfile]{fortran}{} 
    2525 
    2626%% Inline 
    27 \newmintinline[forcode]{fortran}{bgcolor=, fontsize=auto, frame=lines}   % \forcode{...} 
    28 \newmintinline[xmlcode]{xml}{    bgcolor=, fontsize=auto, frame=lines}   % \xmlcode{...} 
    29 \newmintinline[snippet]{console}{bgcolor=, fontsize=auto, frame=lines}   % \snippet{...} 
     27\newmintinline[forcode]{fortran}{bgcolor=, fontsize=auto}   % \forcode{...} 
     28\newmintinline[xmlcode]{xml}{    bgcolor=, fontsize=auto}   % \xmlcode{...} 
     29\newmintinline[snippet]{console}{bgcolor=, fontsize=auto}   % \snippet{...} 
    3030 
    3131%% Namelists inclusion 
    3232\newcommand{\nlst}[1]{\forfile{../../../namelists/#1}} 
    33  
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc/latex/global/index.ist

    r11176 r11967  
    11headings_flag 1 
    2 heading_prefix "{\\medskip\\hfill\\large\\textsf{\\textbf{" 
    3 heading_suffix "}}\\hfill}\\medskip\\nopagebreak\n" 
    4  
     2heading_prefix "\\medskip\\hfill\\textnormal{" 
     3heading_suffix "}\\hfill\\smallskip\n" 
    54delim_0 "\\dotfill~" 
    6 delim_1 "\\dotfill~" 
    7 delim_2 "\\dotfill~" 
    8  
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc/latex/global/info_page.tex

    r11176 r11967  
    22\thispagestyle{plain} 
    33 
    4 % ================================================================ 
    5 % Disclaimer 
    6 % ================================================================ 
     4%% ================================================================ 
     5%% Disclaimer 
     6%% ================================================================ 
    77\subsubsection*{Disclaimer} 
    88 
    99Like all components of the modelling framework, 
    10 the \engine~core engine is developed under the \href{http://www.cecill.info}{CECILL license}, 
    11 which is a French adaptation of the GNU GPL (General Public License). 
     10the \engine\ core engine is developed under the \href{http://www.cecill.info}{CECILL license}, 
     11which is a French adaptation of the GNU GPL (\textbf{G}eneral \textbf{P}ublic \textbf{L}icense). 
    1212Anyone may use it freely for research purposes, and is encouraged to 
    13 communicate back to the NEMO team its own developments and improvements. 
     13communicate back to the development team its own developments and improvements. 
    1414 
    1515The model and the present document have been made available as a service to the community. 
     
    1818Users are encouraged to bring them to our attention. 
    1919 
    20 The authors assume no responsibility for problems, errors, or incorrect usage of NEMO. 
     20The authors assume no responsibility for problems, errors, or incorrect usage of \NEMO. 
    2121 
    22 % ================================================================ 
    23 % External resources 
    24 % ================================================================ 
     22%% ================================================================ 
     23%% External resources 
     24%% ================================================================ 
    2525\subsubsection*{Other resources} 
     26\label{resources} 
    2627 
    2728Additional information can be found on: 
    2829\begin{itemize} 
    29 \item the \href{http://www.nemo-ocean.eu}{website} of the project detailing several 
     30\item \faWordpress\ the \href{http://www.nemo-ocean.eu}{website} of the project detailing several 
    3031  associated applications and an exhaustive users bibliography 
    31 \item the \href{http://forge.ipsl.jussieu.fr/nemo}{development platform} of the model with 
    32   the code repository and some main resources (wiki, ticket system, forums, \ldots) 
    33 \item the \href{http://zenodo.org/communities/nemo-ocean}{online archive} 
    34   delivering the publications issued by the consortium 
    35 \item two mailing lists: 
     32\item \faCodeFork\ the \href{http://forge.ipsl.jussieu.fr/nemo}{development platform} of 
     33  the model with the code repository for the shared reference and some main resources 
     34  (wiki, ticket system, forums, \ldots) \\ 
     35  \faGithub\ the \href{http://github.com/NEMO-ocean/NEMO-examples} 
     36  {repository of the demonstration cases} for research or training 
     37\item \faCloudDownload\ the \href{http://zenodo.org/communities/nemo-ocean}{online archive} 
     38  delivering the publications issued by the consortium (manuals, reports, datasets, \ldots) 
     39\item \faEnvelope\ two mailing lists: 
    3640  the \href{http://listes.ipsl.fr/sympa/info/nemo-newsletter}{newsletter} for 
    3741  top-down communications from the project 
     
    4145\end{itemize} 
    4246 
    43 % ================================================================ 
    44 % Citation 
    45 % ================================================================ 
     47%% ================================================================ 
     48%% Citation 
     49%% ================================================================ 
    4650\subsubsection*{Citation} 
    4751 
    4852Reference for papers and other publications is as follows: 
    4953 
    50 \vspace{0.5cm} 
     54\medskip 
    5155 
    52 %% \sloppy: workaround for breaking DOI URL 
    53 \sloppy 
    54 ``{\bfseries \heading}'',  
    55 \firstauthor and \secondauthor,  
    56 {\em Scientific Notes of Climate Modelling Center}, \textbf{\ipslnum} --- ISSN 1288-1619,  
    57 Institut Pierre-Simon Laplace (IPSL),  
    58 \href{https://doi.org/10.5281/zenodo.\zid}{doi:10.5281/zenodo.\zid} 
     56\begin{sloppypar} 
     57  ``{\bfseries \heading}\ifdef{\subheading}{ -- \subheading}{}'', 
     58  {\em Scientific Notes of Climate Modelling Center}, \textbf{\ipslnum} --- ISSN 1288-1619, 
     59  Institut Pierre-Simon Laplace (IPSL), 
     60  \href{https://doi.org/10.5281/zenodo.\zid}{doi:10.5281/zenodo.\zid} 
     61\end{sloppypar} 
    5962 
    6063\begin{figure}[b] 
    61   \begin{minipage}[c]{0.72\textwidth} 
    62     \small\ttfamily{Scientific Notes of Climate Modelling Center \\ 
    63       ISSN 1288-1619                                             \\ 
     64  \begin{minipage}[c]{0.7\textwidth} 
     65    \small 
     66    \ttfamily{ 
     67      Scientific Notes of Climate Modelling Center \\ 
     68      ISSN 1288-1619                               \\ 
    6469      Institut Pierre-Simon Laplace (IPSL) 
    6570    } 
     
    7075  \end{minipage} 
    7176\end{figure} 
    72  
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc/latex/global/new_cmds.tex

    r11212 r11967  
    22%% ============================================================================== 
    33 
    4 %% Include references and index for compilation of single subfile  
    5 \newcommand{\mtoc}{\minitoc} 
    6 \newcommand{\biblio}{\bibliography{../main/bibliography}} 
    7 \newcommand{\pindex}{\printindex} 
     4%% Same slanted font for NEMO and its core engines 
     5\newcommand{\NEMO  }{\textsl{NEMO}} 
     6\newcommand{\OPA   }{\textsl{OPA}} 
     7\newcommand{\SIcube}{\textsl{SI$^3$}} 
     8\newcommand{\TOP   }{\textsl{TOP}} 
     9\newcommand{\PISCES}{\textsl{PISCES}} 
     10\newcommand{\NEMOVAR}{\textsl{NEMOVAR}} 
    811 
    9 %% NEMO and Fortran in small capitals 
    10 \newcommand{\NEMO}{\textsc{nemo}~} 
    11 \newcommand{\fortran}{\textsc{Fortran}~} 
    12 \newcommand{\fninety}{\textsc{Fortran 90}~} 
     12%% Links for external components 
     13\newcommand{\AGRIF}{\href{http://agrif.imag.fr}{AGRIF}} 
     14\newcommand{\CICE }{\href{http://github.com/CICE-Consortium/CICE}{CICE}} 
     15\newcommand{\OASIS}{\href{http://portal.enes.org/oasis}{OASIS}} 
     16\newcommand{\XIOS }{\href{http://forge.ipsl.jussieu.fr/ioserver}{XIOS}} 
     17 
     18%% Fortran in small capitals 
     19\newcommand{\fortran}{\textsc{Fortran}} 
     20\newcommand{\fninety}{\textsc{Fortran 90}} 
    1321 
    1422%% Common aliases 
     
    1826\newcommand{\ztilde}{\ensuremath{\tilde z}} 
    1927\newcommand{\stilde}{\ensuremath{\tilde s}} 
    20 \newcommand{\ie}{\ensuremath{i.e.}~} 
    21 \newcommand{\eg}{\ensuremath{e.g.}~} 
     28\newcommand{\ie}{\ensuremath{i.e.}} 
     29\newcommand{\eg}{\ensuremath{e.g.}} 
    2230 
    2331%% Inline maths 
     
    2533\newcommand{\rdt}{\Delta t} 
    2634 
    27 %% Text env. for Gurvan 
    28 \newcommand{\gmcomment}[1]{} 
     35%% Gurvan's comments 
     36\newcommand{\cmtgm}[1]{} 
    2937 
    3038%% Maths 
    3139\newcommand{\lt}{\left} 
    3240\newcommand{\rt}{\right} 
    33 \newcommand{\vect}[1]{\ensuremath{\mathbf{#1}}} 
     41\newcommand{\vect}[1]{\ensuremath{ \mathbf{#1} }} 
    3442\newcommand{\pd}[2][]{\ensuremath{\frac{\partial #1}{\partial #2}}} 
    3543 
    36 %% Workaround for issue with \listoffigures 
    37 \DeclareRobustCommand{\triad}[6][]{\ensuremath{{}_{#2}^{#3}{\mathbb{#4}_{#1}}_{#5}^{\,#6}}} 
     44%% Convert chapter/section headings to lowercase 
     45\renewcommand{\chaptermark}[1]{\markboth{#1}{}} 
     46\renewcommand{\sectionmark}[1]{\markright{#1}{}} 
     47 
     48%% Retrieve month name 
     49\renewcommand{\today}{ 
     50  \ifcase \month\or January\or February\or March\or 
     51                    April\or   May\or      June\or 
     52                    July\or    August\or   September\or 
     53                    October\or November\or December 
     54  \fi, \number \year 
     55} 
     56 
     57%% Link to orcid profile 
     58\newcommand{\orcid}[1]{\href{http://orcid.org/#1}{\textcolor{orcidcolor}\aiOrcidSquare}} 
     59 
     60%% Workaround for \listoffigures 
     61\DeclareRobustCommand{\triad}[6][]{\ensuremath{ {}_{#2}^{#3} { \mathbb{#4}_{#1} }_{#5}^{\,#6} }} 
     62 
     63%% New command for ToC 
     64\newcommand{\chaptertoc}[1][Table of contents]{% 
     65  \thispagestyle{empty} 
     66  \etocsettocstyle{\addsec*{#1}}{}% 
     67  \localtableofcontents% 
     68  \vfill 
     69} 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc/latex/global/packages.tex

    r11189 r11967  
    33%% ============================================================================== 
    44 
    5 \usepackage{natbib}                      %% bib 
    6 \usepackage{caption}                     %% caption 
    7 \usepackage{xcolor}                      %% color 
    8 \usepackage{times}                       %% font 
    9 \usepackage{enumitem}                    %% list 
    10 \usepackage{amsmath}                     %% maths 
    11 %\usepackage{fancyhdr}                    %% page 
    12 \usepackage{minitoc}                     %% toc 
    13 \usepackage{subfiles}                    %% subdocs 
    14 \usepackage{draftwatermark}              %% watermark 
    15 \usepackage{titling}                     %% titlepage 
     5%% 'hyperref' pkg is loaded at the end of the preamble for higher compatibility 
    166 
    17 %% Extensions in bundle package 
    18 \usepackage{amssymb, graphicx, tabularx, textcomp} 
    19 \usepackage[utf8]{inputenc}              %% input encoding 
     7%% KOMA-script 
     8\usepackage[footsepline=0.25pt, headsepline=0.25pt]{scrlayer-scrpage} 
     9 
     10%% customization (layout, header/footer styles & contents, background) 
     11\usepackage{draftwatermark} 
     12\usepackage[margin = 2cm]{geometry} 
     13\usepackage[pages = some]{background}   %% 'some' for title page 
     14\usepackage[Bjornstrup]{fncychap} 
     15 
     16%% Fonts 
     17\usepackage{fontspec} 
     18%% Issue with fontawesome pkg: path to FontAwesome.otf has to be hard-coded 
     19\defaultfontfeatures{ 
     20    Path = /usr/local/texlive/2019/texmf-dist/fonts/opentype/public/fontawesome/ 
     21} 
     22\usepackage{academicons, fontawesome, newtxtext} 
     23 
     24%% Formatting 
     25\usepackage[inline]{enumitem} 
     26\usepackage{etoc, tabularx, xcolor} 
     27 
     28%% Graphics 
     29\usepackage{caption, graphicx, grffile} 
     30 
     31%% Labels 
     32\usepackage{lastpage, natbib} 
     33 
     34%% Mathematics 
     35\usepackage{amsmath, amssymb, mathtools} 
     36 
     37%% Versatility 
     38\usepackage{subfiles} 
    2039 
    2140%% Configuration 
    22 \graphicspath{ {../../figures/} {../../figures/\engine/} } 
    23 %\captionsetup{margin=10pt, font={small}, labelsep=colon, labelfont={bf}} 
    24 \renewcommand{\bibfont}{\small} 
    25 %\renewcommand{\bibsep}{3pt} 
     41\graphicspath{ {../../../} {../figures/} } 
    2642 
     43%% Missing utmr8a font 
     44\usepackage{times} 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo_TEST_MERGE/doc/latex/global/styles.tex

    r11212 r11967  
    33%% ============================================================================== 
    44 
    5 %\pagestyle{fancy} 
    6 \bibliographystyle{../../global/ametsoc} 
    7 \renewcommand{\bibpreamble}{\begin{multicols}{2}} 
    8 \renewcommand{\bibpostamble}{\end{multicols}} 
    9  
    10 %% Additional fonts 
    11 \DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it} 
     5%% Colors 
     6\setmanualcolor 
     7\colorlet{manualcolorshaded}{manualcolor!60} 
     8\definecolor{orcidcolor}{HTML}{A6CE39} 
    129 
    1310%% Page layout 
    14 %\fancyhf{} 
    15 %\fancyhead[LE,RO]{\bfseries\thepage} 
    16 %\fancyhead[LO]{\bfseries\hspace{-0em}\rightmark} 
    17 %\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}} 
    18 %\fancyhead[RE]{\bfseries\leftmark} 
    19 %\renewcommand{\chaptermark}[1]{\markboth{#1}{}} 
    20 %\renewcommand{\headrulewidth}{0.5pt} 
    21 %\renewcommand{\footrulewidth}{0pt  } 
    22 %\addtolength{\headheight}{2.6pt} 
     11\pagestyle{scrheadings} 
     12\addtokomafont{pagehead}{  \sffamily              } 
     13\addtokomafont{pagefoot}{  \sffamily \footnotesize} 
     14\addtokomafont{pagenumber}{\sffamily \slshape     } 
     15\addtokomafont{chapter}{\color{white}} 
     16\ohead{} \ofoot{}   %% Clear defaults 
    2317 
     18%% Caption 
     19\captionsetup{font = footnotesize, justification = justified} 
     20 
     21%% Footnote 
     22\renewcommand{\thefootnote}{\fnsymbol{footnote}} 
     23 
     24%% Bibliography 
     25\bibliographystyle{../../global/ametsoc} 
     26\renewcommand{\bibfont}{\small} 
     27\renewcommand{\bibpreamble }{\begin{multicols}{2}} 
     28\renewcommand{\bibpostamble}{  \end{multicols}   } 
    2429 
    2530%% Catcodes 
    26 %\makeatletter 
    27 %\def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax} 
    28 %\def\LignesVerticales{\let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV} 
    29 %\def\GrosCarreAvecUnChiffre#1{ 
    30 %  \rlap{\vrule height 0.8cm width 1cm depth 0.2cm} 
    31 %  \rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}} 
    32 %  \vrule height 0pt width 1cm depth 0pt 
    33 %} 
    34 %\def\@makechapterhead#1{ 
    35 %  \hbox{ 
    36 %     \huge\LignesVerticales\hspace{-0.5cm} 
    37 %     \GrosCarreAvecUnChiffre{\thechapter}\hspace{0.2cm} 
    38 %     \hbox{#1} 
    39 %  } 
    40 %  \par\vskip 
    41 %1cm 
    42 %} 
    43 %\def\@makeschapterhead#1{ 
    44 %  \hbox{ 
    45 %     \huge\LignesVerticales 
    46 %     \hbox{#1} 
    47 %  } 
    48 %  \par\vskip 
    49 %2cm 
    50 %} 
    51 %\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else 
    52 %  \hbox{} 
    53 %  \vspace*{\fill} 
    54 %  \vspace{\fill} 
    55 %  \thispagestyle{empty} 
    56 %  \newpage 
    57 %  \if@twocolumn\hbox{}\newpage\fi\fi\fi} 
    58 %\def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\quad}} 
    59 %\makeatother 
     31\makeatletter 
    6032 
     33%% Prevent error with tikz and namelist inclusion 
     34\global\let\tikz@ensure@dollar@catcode=\relax 
    6135 
     36%% First page 
     37\backgroundsetup{ 
     38  firstpage = true, 
     39  scale = 1, angle = 0, opacity = 1, 
     40  contents = { 
     41    \begin{tikzpicture}[remember picture, overlay] 
     42      \path [fill = manualcolor] (-0.5\paperwidth, 7) rectangle (0.5\paperwidth, 10); 
     43    \end{tikzpicture} 
     44  } 
     45} 
     46 
     47%% Apply engine color for chapter headings: tweaking snippets from fncychap.sty 
     48\renewcommand{\DOCH}{% 
     49  \settowidth{\py}{\CNoV\thechapter} 
     50  \addtolength{\py}{-10pt}      % Amount of space by which the 
     51%                                  % number is shifted right 
     52  \fboxsep=0pt% 
     53  \colorbox{manualcolor}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}% 
     54  \kern-\py\raise20pt% 
     55  \hbox{\color{manualcolorshaded}\CNoV\thechapter}\\% 
     56} 
     57\renewcommand{\DOTI}[1]{% 
     58  \nointerlineskip\raggedright% 
     59  \fboxsep=\myhi% 
     60  \vskip-1ex% 
     61  \colorbox{manualcolor}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak% 
     62  \vskip 40\p@% 
     63} 
     64\renewcommand{\DOTIS}[1]{% 
     65  \fboxsep=0pt 
     66  \colorbox{manualcolor}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}\\% 
     67  \nointerlineskip\raggedright% 
     68  \fboxsep=\myhi% 
     69  \vskip-1ex% Remove white 1pt line 
     70  \colorbox{manualcolor}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak% 
     71  \vskip 40\p@% 
     72} 
     73 
     74%% Temporary fix 
     75\def\set@curr@file#1{% 
     76  \begingroup 
     77    \escapechar\m@ne 
     78    \xdef\@curr@file{\expandafter\string\csname #1\endcsname}% 
     79  \endgroup 
     80} 
     81\def\quote@name#1{"\quote@@name#1\@gobble""} 
     82\def\quote@@name#1"{#1\quote@@name} 
     83\def\unquote@name#1{\quote@@name#1\@gobble"} 
     84 
     85\makeatother 
Note: See TracChangeset for help on using the changeset viewer.