# 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 11563 – NEMO

# Changeset 11563

Ignore:
Timestamp:
2019-09-18T15:36:42+02:00 (3 years ago)
Message:

Miscellaneous changes

Location:
NEMO/trunk/doc/latex/global
Files:
8 edited

Unmodified
Removed
• ## NEMO/trunk/doc/latex/global/annex_D.tex

 r11299 - flexible. To satisfy part of these aims, \NEMO is written with a coding standard which is close to the ECMWF rules, To satisfy part of these aims, \NEMO\ is written with a coding standard which is close to the ECMWF rules, named DOCTOR \citep{gibson_rpt86}. These rules present some advantages like:
• ## NEMO/trunk/doc/latex/global/coding_rules.tex

 r11543 \end{itemize} To satisfy part of these aims, \NEMO is written with a coding standard which is close to the ECMWF rules, To satisfy part of these aims, \NEMO\ is written with a coding standard which is close to the ECMWF rules, named DOCTOR \citep{gibson_rpt86}. These rules present some advantages like: \section{Introduction} This document describes conventions used in \NEMO coding and suggested for its development. The objectives are to offer a guide to all readers of the \NEMO code, and to facilitate the work of This document describes conventions used in \NEMO\ coding and suggested for its development. The objectives are to offer a guide to all readers of the \NEMO\ code, and to facilitate the work of all the developers, including the validation of their developments, and eventually the implementation of these developments within the \NEMO platform. eventually the implementation of these developments within the \NEMO\ platform. A first approach of these rules can be found in the code in \path{./src/OCE/module_example} where \footnote {\href{http://www.cesm.ucar.edu/working_groups/Software/dev_guide/dev_guide/node7.html}{UCAR conventions}}, the previous version of this document (FORTRAN coding standard in the OPA System'') and the expertise of the \NEMO System Team. the expertise of the \NEMO\ System Team. After a general overview below, this document will describe: \section{Overview and general conventions} \NEMO has 3 major components: ocean dynamics (\path{./src/OCE}), sea-ice (\path{./src/ICE}) and \NEMO\ has 3 major components: ocean dynamics (\path{./src/OCE}), sea-ice (\path{./src/ICE}) and marine biogeochemistry (\path{./src/MBG}). %, linear-tangent and adjoint of the dynamics ($TAM$) each of them corresponding to a directory. All FORTRAN keywords are in capital: \forcode{DIMENSION}, \forcode{WRITE}, \forcode{DO}, \forcode{END DO}, \forcode{NAMELIST}, ... All other parts of the \NEMO code will be written in lower case. \forcode{NAMELIST}, ... All other parts of the \NEMO\ code will be written in lower case. \subsection{Comments} \subsection{F90 Standard} \NEMO software adheres to the \fninety language standard and does not rely on any specific language or \NEMO\ software adheres to the \fninety language standard and does not rely on any specific language or vendor extensions. For example, zdftke, where zdf'' stands for vertical diffusion, and tke'' for turbulent kinetic energy. \\ Note that by implication multiple modules are not allowed in a single file. The use of common blocks is deprecated in \fortran 90 and their use in \NEMO is strongly discouraged. The use of common blocks is deprecated in \fortran 90 and their use in \NEMO\ is strongly discouraged. Modules are a better way to declare static data. Among the advantages of modules is the ability to freely mix data of various types, and Is to be used rather than the \#ifdef abbreviate form since it may have conflicts with some Unix scripts. Tests on cpp keys included in \NEMO at compilation step: Tests on cpp keys included in \NEMO\ at compilation step: \begin{itemize} \subsection{Configurations} The configuration defines the domain and the grid on which \NEMO is running. The configuration defines the domain and the grid on which \NEMO\ is running. It may be useful to associate a CPP key and some variables to a given configuration, although the part of the code changed under each of those keys should be minimized. \subsection{Headers} Prologues are not used in \NEMO for now, although it may become an interesting tool in combination with Prologues are not used in \NEMO\ for now, although it may become an interesting tool in combination with ProTeX auto documentation script in the future. Rules to code the headers and layout of a module or a routine are illustrated in the example module available with \subsection{Bounds checking} \NEMO is able to run when an array bounds checking option is enabled \NEMO\ is able to run when an array bounds checking option is enabled (provided the cpp key \texttt{key\_vectopt\_loop} is not defined). \\ Thus, constructs of the following form are disallowed: the \texttt{stat=} optional argument. \\ In addition to arrays contained within modules, many routines in \NEMO require local, workspace'' arrays to In addition to arrays contained within modules, many routines in \NEMO\ require local, workspace'' arrays to hold the intermediate results of calculations. In previous versions of \NEMO, these arrays were declared in such a way as to be automatically allocated on It is then associated with a sub-array of \texttt{wrk\_3d\_5} once the call to \texttt{wrk\_in\_use()} has completed successfully. Note that in F95 (to which \NEMO conforms) it is not possible for either the upper or lower array bounds of Note that in F95 (to which \NEMO\ conforms) it is not possible for either the upper or lower array bounds of the pointer object to differ from those of the target array. \\ This should enable the developer to choose alternatives for use in the subroutine being worked on. \\ When compiling \NEMO for production runs, When compiling \NEMO\ for production runs, the calls to {\texttt{wrk\_in\_use()} / \texttt{wrk\_not\_released()} can be reduced to stubs that just return \forcode{.false.} by setting the cpp key \texttt{key\_no\_workspace\_check}. \subsection{Parallelism using MPI} \NEMO is written in order to be able to run on one processor, or on one or more using MPI \NEMO\ is written in order to be able to run on one processor, or on one or more using MPI ($i.e.$ activating the cpp key $key\_mpp\_mpi$). The domain decomposition divides the global domain in cubes (see \NEMO reference manual). The domain decomposition divides the global domain in cubes (see \NEMO\ reference manual). Whilst coding a new development, the MPI compatibility has to be taken in account (see \path{./src/LBC/lib_mpp.F90}) and should be tested.
• ## NEMO/trunk/doc/latex/global/document.tex

 r11543 %% Document layout \documentclass[fontsize = 10pt, twoside = semi, abstract = on, open = right]{scrreprt} \documentclass[fontsize = 10pt, twoside, abstract]{scrreprt} %% Load configurations \input{../../global/info_page} \listoffigures \listoftables %\listoflistings   %% \listoflistings not working \listoffigures \listoflistings \listoftables \clearpage
• ## NEMO/trunk/doc/latex/global/frontpage.tex

 r11515 \begin{titlepage} \newgeometry{hmargin = 1.5cm, vmargin = 3cm} %  \newgeometry{hmargin = 1.5cm, vmargin = 3cm} \setlength{\parindent}{0pt}
• ## NEMO/trunk/doc/latex/global/highlighting.tex

 r11515 %% ============================================================================== \usepackage[outputdir=../build]{minted} \usepackage[outputdir=../build, section]{minted} %% Global highlighting style %% File \newmintedfile[forfile]{fortran}{}   % \forfile{../namelists/nam...} \newmintedfile[forfile]{fortran}{} %% Inline
• ## NEMO/trunk/doc/latex/global/indexes.tex

 r11433 \indexsetup{toclevel=section, othercode=\small} \makeindex[intoc=true, name=keys       , title=CPP keys            ({\em key\_     } prefix)           ] \makeindex[intoc=true, name=modules    , title=\fortran modules                                        ] \makeindex[intoc=true, name=blocks     , title=Namelist blocks     ({\em nam       } prefix), columns=3] \makeindex[intoc=true, name=parameters , title=Namelist parameters ({\em [cdlnr]n\_}       ), columns=3] \makeindex[intoc=true, name=subroutines, title=Subroutines                                             ] \makeindex[intoc=true, name=keys       , title=CPP keys            ({\em key\_     } prefix) ] \makeindex[intoc=true, name=modules    , title=\fortran\ modules   ({\em *.F90     }       ), columns=3] \makeindex[intoc=true, name=blocks     , title=Namelist blocks     ({\em nam       } prefix), columns=3] \makeindex[intoc=true, name=parameters , title=Namelist parameters ({\em [cdlnr]n\_}       ), columns=3] \makeindex[intoc=true, name=subroutines, title=Subroutines ]
• ## NEMO/trunk/doc/latex/global/new_cmds.tex

• ## NEMO/trunk/doc/latex/global/styles.tex

 r11515 %% Caption \captionsetup{font = footnotesize, justification = justified} %% Footnote \renewcommand{\thefootnote}{\fnsymbol{footnote}} %% Bibliography
Note: See TracChangeset for help on using the changeset viewer.