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 1831 for branches/DEV_r1826_DOC/DOC/TexFiles/Chapters/Annex_D.tex – NEMO

Ignore:
Timestamp:
2010-04-12T16:59:59+02:00 (14 years ago)
Author:
gm
Message:

cover, namelist, rigid-lid, e3t, appendices, see ticket: #658

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_r1826_DOC/DOC/TexFiles/Chapters/Annex_D.tex

    r1223 r1831  
    55\label{Apdx_D} 
    66\minitoc 
     7 
     8\newpage 
     9$\ $\newline    % force a new ligne 
     10$\ $\newline    % force a new ligne 
    711 
    812 
     
    3337 
    3438- to use rules for variable names which allow recognition of their type  
    35 (integer, real, parameter, local or shared variables, etc. ) so that debugging is  
    36 facilitated. 
     39(integer, real, parameter, local or shared variables, etc. ).  
     40 
     41This facilitates both the understanding and the debugging of an algorithm. 
    3742 
    3843% ================================================================ 
     
    6368- A program has not more than 200 to 300 lines. 
    6469 
     70A template of a module style can be found on the NEMO depository  
     71in the following file : NEMO/OPA\_SRC/module\_example. 
    6572% ================================================================ 
    6673% Coding conventions 
     
    7279features like statement functions, do not use GO TO and EQUIVALENCE statements. 
    7380 
    74 - A continuation line begins with the character {\$} indented by three spaces  
    75 compared to the previous line. 
     81- A continuation line begins with the character {\&} indented by three spaces  
     82compared to the previous line, while the previous line ended with the character {\&}. 
     83 
     84- All the variables must be declared. The code is usually compiled with implicit none. 
     85  
     86- Never use continuation lines in the declaration of a variable. When searching a  
     87variable in the code through a \textit{grep} command, the declaration line will be found. 
     88 
     89- In the declaration of a PUBLIC variable, the comment part at the end of the line  
     90should start with the two characters "\verb?!:?". the following UNIX command,  
     91\verb?grep var_name *90 \ grep \!: ?  
     92will display the module name and the line where the var\_name declaration is. 
    7693 
    7794- Always use a three spaces indentation in DO loop, CASE, or IF-ELSEIF-ELSE-ENDIF  
    7895statements. 
    7996 
     97- use a space after a comma, except when it appears to separate the indices of an array. 
     98 
    8099- use call to ctl\_stop routine instead of just a STOP. 
    81100 
     101 
     102\newpage 
    82103% ================================================================ 
    83104% Naming Conventions 
     
    87108 
    88109The purpose of the naming conventions is to use prefix letters to classify  
    89 model variables. These conventions allow the variable type to be easily known 
    90 and rapidly identified: 
     110model variables. These conventions allow the variable type to be easily  
     111known and rapidly identified. The naming conventions are summarised  
     112in the Table below: 
     113 
    91114 
    92115%--------------------------------------------------TABLE-------------------------------------------------- 
    93 \begin{table}[htbp] 
     116\begin{table}[htbp]  \label{Tab_VarName} 
    94117\begin{center} 
    95 \begin{tabular}{|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|} 
    96 \hline  Type \par / Status &   integer&   real&   logical &   character&   double \par precision&   complex \\   
     118\begin{tabular}{|p{45pt}|p{35pt}|p{45pt}|p{40pt}|p{40pt}|p{40pt}|p{40pt}|p{40pt}|} 
     119\hline  Type \par / Status &   integer&   real&   logical &   character  & structure &   double \par precision&   complex \\   
    97120\hline 
    98121public  \par or  \par module variable&  
    99 \textbf{m n} \par \textit{but not } \par \textbf{nn\_}&  
    100 \textbf{a b e f g h o} \textbf{q} \textit{to} \textbf{x} \par but not \par \textbf{fs rn\_}&  
    101 \textbf{l} \par \textit{but not} \par \textbf{lp ld ll ln\_}&  
    102 \textbf{c} \par \textit{but not} \par \textbf{cp cd cl cn\_}&  
    103 \textbf{d} \par \textit{but not} \par \textbf{dp dd dl dn\_}&  
    104 \textbf{y} \par \textit{but not} \par \textbf{yp yd yl} \\ 
     122\textbf{m n} \par \textit{but not} \par \textbf{nn\_}&  
     123\textbf{a b e f g h o q r} \par \textbf{t} \textit{to} \textbf{x} \par but not \par \textbf{fs rn\_}&  
     124\textbf{l} \par \textit{but not} \par \textbf{lp ld} \par \textbf{ ll ln\_}&  
     125\textbf{c} \par \textit{but not} \par \textbf{cp cd} \par \textbf{cl cn\_}&  
     126\textbf{s} \par \textit{but not} \par \textbf{sd sd} \par \textbf{sl sn\_}&  
     127\textbf{d} \par \textit{but not} \par \textbf{dp dd} \par \textbf{dl dn\_}&  
     128\textbf{y} \par \textit{but not} \par \textbf{yp yd} \par \textbf{yl yn} \\ 
    105129\hline 
    106130dummy \par argument&  
    107131\textbf{k} \par \textit{but not} \par \textbf{kf}&  
    108 \textbf{p} \par \textit{but not}  \par \textbf{pp pf}&  
     132\textbf{p} \par \textit{but not} \par \textbf{pp pf}&  
    109133\textbf{ld}&  
    110134\textbf{cd}&  
     135\textbf{sd}&  
    111136\textbf{dd}&  
    112137\textbf{yd} \\ 
     
    117142\textbf{ll}&  
    118143\textbf{cl}&  
    119 \textbf{cd}&  
     144\textbf{sl}&  
     145\textbf{dl}&  
    120146\textbf{yl} \\ 
    121147\hline 
    122148loop \par control&  
    123 \textbf{j} \par \textit{but not } \par \textbf{jp}&  
     149\textbf{j} \par \textit{but not} \par \textbf{jp}&  
    124150&  
    125151&  
     152& 
    126153&  
    127154&  
     
    133160\textbf{lp}&  
    134161\textbf{cp}&  
     162\textbf{sp}&  
    135163\textbf{dp}&  
    136164\textbf{yp} \\ 
     
    142170\textbf{ln\_}&  
    143171\textbf{cn\_}&  
     172\textbf{sn\_}&  
    144173\textbf{dn\_}&  
     174\textbf{yn\_} 
    145175\\ 
    146176\hline 
    147177CPP \par macro&  
    148178\textbf{kf}&  
    149 \textbf{sf} \par &  
     179\textbf{fs} \par &  
    150180&  
     181& 
    151182&  
    152183&  
Note: See TracChangeset for help on using the changeset viewer.