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 10354 for NEMO/trunk/doc/latex/NEMO/subfiles/annex_D.tex – NEMO

Ignore:
Timestamp:
2018-11-21T17:59:55+01:00 (5 years ago)
Author:
nicolasmartin
Message:

Vast edition of LaTeX subfiles to improve the readability by cutting sentences in a more suitable way
Every sentence begins in a new line and if necessary is splitted around 110 characters lenght for side-by-side visualisation,
this setting may not be adequate for everyone but something has to be set.
The punctuation was the primer trigger for the cutting process, otherwise subordinators and coordinators, in order to mostly keep a meaning for each line

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/doc/latex/NEMO/subfiles/annex_D.tex

    r9407 r10354  
    1313 
    1414 
    15 A "model life" is more than ten years. Its software, composed of a few  
    16 hundred modules, is used by many people who are scientists or students  
    17 and do not necessarily know every aspect of computing very well.  
    18 Moreover, a well thought-out program is easier to read and understand,  
    19 less difficult to modify, produces fewer bugs and is easier to maintain.  
    20 Therefore, it is essential that the model development follows some rules : 
     15A "model life" is more than ten years. 
     16Its software, composed of a few hundred modules, is used by many people who are scientists or students and 
     17do not necessarily know every aspect of computing very well. 
     18Moreover, a well thought-out program is easier to read and understand, less difficult to modify, 
     19produces fewer bugs and is easier to maintain. 
     20Therefore, it is essential that the model development follows some rules: 
    2121 
    2222- well planned and designed 
     
    3232- flexible. 
    3333 
    34 To satisfy part of these aims, \NEMO is written with a coding standard which  
    35 is close to the ECMWF rules, named DOCTOR \citep{Gibson_TR86}.  
    36 These rules present some advantages like : 
     34To satisfy part of these aims, \NEMO is written with a coding standard which is close to the ECMWF rules, 
     35named DOCTOR \citep{Gibson_TR86}.  
     36These rules present some advantages like: 
    3737 
    3838- to provide a well presented program 
    3939 
    40 - to use rules for variable names which allow recognition of their type  
     40- to use rules for variable names which allow recognition of their type 
    4141(integer, real, parameter, local or shared variables, etc. ).  
    4242 
     
    4949\label{sec:D_structure} 
    5050 
    51 Each program begins with a set of headline comments containing : 
     51Each program begins with a set of headline comments containing: 
    5252 
    5353- the program title 
     
    6565- the author name(s), the date of creation and any updates. 
    6666 
    67 - Each program is split into several well separated sections and  
     67- Each program is split into several well separated sections and 
    6868sub-sections with an underlined title and specific labelled statements. 
    6969 
    7070- A program has not more than 200 to 300 lines. 
    7171 
    72 A template of a module style can be found on the NEMO depository  
    73 in the following file : NEMO/OPA\_SRC/module\_example. 
     72A template of a module style can be found on the NEMO depository in the following file: 
     73NEMO/OPA\_SRC/module\_example. 
    7474% ================================================================ 
    7575% Coding conventions 
     
    7878\label{sec:D_coding} 
    7979 
    80 - Use of the universal language \textsc{Fortran} 90, and try to avoid obsolescent 
    81 features like statement functions, do not use GO TO and EQUIVALENCE statements. 
    82  
    83 - A continuation line begins with the character {\&} indented by three spaces  
    84 compared to the previous line, while the previous line ended with the character {\&}. 
    85  
    86 - All the variables must be declared. The code is usually compiled with implicit none. 
     80- Use of the universal language \textsc{Fortran} 90, and try to avoid obsolescent features like statement functions, 
     81do not use GO TO and EQUIVALENCE statements. 
     82 
     83- A continuation line begins with the character {\&} indented by three spaces compared to the previous line, 
     84while the previous line ended with the character {\&}. 
     85 
     86- All the variables must be declared. 
     87The code is usually compiled with implicit none. 
    8788  
    88 - Never use continuation lines in the declaration of a variable. When searching a  
    89 variable in the code through a \textit{grep} command, the declaration line will be found. 
    90  
    91 - In the declaration of a PUBLIC variable, the comment part at the end of the line  
    92 should start with the two characters "\verb?!:?". the following UNIX command, \\ 
     89- Never use continuation lines in the declaration of a variable. 
     90When searching a variable in the code through a \textit{grep} command, the declaration line will be found. 
     91 
     92- In the declaration of a PUBLIC variable, the comment part at the end of the line should start with 
     93the two characters "\verb?!:?". 
     94The following UNIX command, \\ 
    9395\verb?grep var_name *90 \ grep \!: ? \\ 
    9496will display the module name and the line where the var\_name declaration is. 
    9597 
    96 - Always use a three spaces indentation in DO loop, CASE, or IF-ELSEIF-ELSE-ENDIF  
    97 statements. 
     98- Always use a three spaces indentation in DO loop, CASE, or IF-ELSEIF-ELSE-ENDIF statements. 
    9899 
    99100- use a space after a comma, except when it appears to separate the indices of an array. 
     
    109110\label{sec:D_naming} 
    110111 
    111 The purpose of the naming conventions is to use prefix letters to classify  
    112 model variables. These conventions allow the variable type to be easily  
    113 known and rapidly identified. The naming conventions are summarised  
    114 in the Table below: 
     112The purpose of the naming conventions is to use prefix letters to classify model variables. 
     113These conventions allow the variable type to be easily known and rapidly identified. 
     114The naming conventions are summarised in the Table below: 
    115115 
    116116 
     
    192192%-------------------------------------------------------------------------------------------------------------- 
    193193 
    194 N.B.   Parameter here, in not only parameter in the \textsc{Fortran} acceptation, it is also used for code variables  
    195 that are read in namelist and should never been modified during a simulation.  
     194N.B. Parameter here, in not only parameter in the \textsc{Fortran} acceptation, 
     195it is also used for code variables that are read in namelist and should never been modified during a simulation.  
    196196It is the case, for example, for the size of a domain (jpi,jpj,jpk). 
    197197 
Note: See TracChangeset for help on using the changeset viewer.