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 817 for trunk/DOC/BETA/Chapters/Annex_D.tex – NEMO

Ignore:
Timestamp:
2008-02-09T15:13:48+01:00 (16 years ago)
Author:
gm
Message:

trunk - update including Steven correction of the first 5 chapters (until DYN) and activation of Appendix A & B

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DOC/BETA/Chapters/Annex_D.tex

    r707 r817  
    11% ================================================================ 
    2 % Chapter Ñ Appendix D : Coding Rules 
     2% Appendix D Ñ Coding Rules 
    33% ================================================================ 
    4 \chapter{Appendix D : Coding Rules} 
     4\chapter{Coding Rules} 
    55\label{Apdx_D} 
    66\minitoc 
    77 
    88 
    9 The "model life" is about ten years and its software, composed by about one  
    10 hundred programs, is used by many people who are scientists or students and  
     9A "model life" is more than ten years. Its software, composed by a few  
     10hundred modules, is used by many people who are scientists or students and  
    1111do not necessary know very well all computer aspects. Moreover, a well  
    1212thought-out programme is easy to read and understand, less difficult to  
     
    2626- flexible. 
    2727 
    28 To satisfy part of these aims, OPA is written with a coding standard which  
    29 is close to the ECMWF rule, named DOCTOR [Gibson,1986]. These rules present  
    30 some advantages like : 
     28To satisfy part of these aims, \NEMO is written with a coding standard which  
     29is close to the ECMWF rules, named DOCTOR \citep{Gibson_TR86}. These rules present some advantages like : 
    3130 
    3231- to provide a well presented program 
    3332 
    34 - to enable the extraction of several levels of on-line documentation 
    35  
    3633- to use rules for variable names which allow recognition of their type  
    37 (integer, real, parameter, common variables, etc. ) so that debugging is  
     34(integer, real, parameter, local or shared variables, etc. ) so that debugging is  
    3835facilitated. 
    3936 
    40 \textbf{The program structure} 
     37% ================================================================ 
     38% The program structure 
     39% ================================================================ 
     40\section{The program structure} 
     41\label{Apdx_D_structure} 
    4142 
    4243Each program begins with a set of headline comments containing : 
     
    6162- A program has not more than 200 to 300 lines. 
    6263 
    63 \textbf{Coding conventions} 
     64% ================================================================ 
     65% Coding conventions 
     66% ================================================================ 
     67\section{Coding conventions} 
     68\label{Apdx_D_coding} 
    6469 
    6570- Use of the universal language \textsc{Fortran} 5 ANSI 77, with non  
     
    106111- STOP must be well documented with the name of the subroutine or a number. 
    107112 
    108 \textbf{Naming Conventions.} 
     113% ================================================================ 
     114% Naming Conventions 
     115% ================================================================ 
     116\section{Naming Conventions} 
     117\label{Apdx_D_naming} 
    109118 
    110119The purpose of the naming conventions is to use prefix letters to classify  
     
    117126\begin{center} 
    118127\begin{tabular}{|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|} 
     128\hline  Type \par / Status &   integer&   real&   logical &   character&   double \par precision&   complex \\   
    119129\hline 
    120 Type \par / \par Status &  
    121 integer&  
    122 real&  
    123 logical &  
    124 character&  
    125 double \par precision&  
    126 complex \\ 
    127 \hline 
    128 global \par or \par common&  
     130public &  
    129131\textbf{m n} \par \textit{but not } \par \textbf{nam}&  
    130132\textbf{a b e f g h o} \textbf{q} \textit{to} \textbf{x} \par but not \par \textbf{sf}&  
     
    179181\end{table} 
    180182%-------------------------------------------------------------------------------------------------------------- 
    181  
    182 \textbf{References} 
    183  
    184 {\small Gibson, J. K., 1986: Standard software development and maintenance. }{\small \textit{Tech. memorandum}}{\small , Operational Dep., ECMWF, Reading, UK.} 
    185  
Note: See TracChangeset for help on using the changeset viewer.