Changeset 11299
- Timestamp:
- 2019-07-18T16:27:43+02:00 (5 years ago)
- Location:
- NEMO/trunk/doc/latex
- Files:
-
- 3 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/doc/latex/NEMO/main/appendices.tex
r11187 r11299 4 4 \subfile{../subfiles/annex_C} %% Discrete invariants of the eqs. 5 5 \subfile{../subfiles/annex_iso} %% Isoneutral diffusion using triads 6 \subfile{../subfiles/annex_D} %% Coding rules7 6 8 7 %% Not included -
NEMO/trunk/doc/latex/NEMO/subfiles/introduction.tex
r11123 r11299 151 151 The coding rules for OPA include conventions for naming variables, 152 152 with different starting letters for different types of variables (real, integer, parameter\ldots). 153 Those rules are briefly presented in \autoref{apdx: D} and a more complete document is available .153 Those rules are briefly presented in \autoref{apdx:coding} and a more complete document is available . 154 154 155 155 The model is organized with a high internal modularity based on physics. … … 158 158 To make it easier for the user to find his way around the code, the module names follow a three-letter rule. 159 159 For example, \mdl{traldf} is a module related to the TRAcers equation, computing the Lateral DiFfussion. 160 %The complete list of module names is presented in \autoref{apdx: D}. %====>>>> to be done !160 %The complete list of module names is presented in \autoref{apdx:coding}. %====>>>> to be done ! 161 161 Furthermore, modules are organized in a few directories that correspond to their category, 162 162 as indicated by the first three letters of their name (\autoref{tab:chapters}). -
NEMO/trunk/doc/latex/global/coding_rules.tex
r11290 r11299 1 \documentclass{article}2 3 \usepackage{fancyhdr}4 \usepackage{times}5 \usepackage{graphicx}6 \usepackage{hyperref}7 \usepackage{minted}1 %\documentclass{article} 2 3 %\usepackage{fancyhdr} 4 %\usepackage{times} 5 %\usepackage{graphicx} 6 %\usepackage{hyperref} 7 %\usepackage{minted} 8 8 %\usepackage[normalem]{ulem} % striketrough style with \sout{...} 9 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 }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 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 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 49 \chapter{Coding Rules} 50 \label{apdx:coding} 51 52 \minitoc 41 53 42 54 \newpage 43 55 44 \tableofcontents 45 46 \newpage 47 48 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 56 A "model life" is more than ten years. 57 Its software, composed of a few hundred modules, is used by many people who are scientists or students and 58 do not necessarily know every aspect of computing very well. 59 Moreover, a well thought-out program is easier to read and understand, less difficult to modify, 60 produces fewer bugs and is easier to maintain. 61 Therefore, it is essential that the model development follows some rules: 62 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}. 77 These rules present some advantages like: 78 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. ). 83 84 This facilitates both the understanding and the debugging of an algorithm. 85 49 86 \section{Introduction} 50 87 … … 805 842 % \input NEMO_coding.conv.ind 806 843 807 \end{document}844 %\end{document} -
NEMO/trunk/doc/latex/global/document.tex
r11212 r11299 85 85 \include{appendices} 86 86 87 %% Append coding rules for every manual 88 \input{../../global/coding_rules} 89 87 90 88 91 %% Backmatter
Note: See TracChangeset
for help on using the changeset viewer.