Child pages
  • Comprehensive list of standards

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added whitespace in order to update the last-modified time

...

HTML Table
border0
bgcolor353d4a
cellpadding0
cellspacing0
width"100%"
cellspacing0


>>Terms of Use
>>Go BACK to previous page.

These conventions cover some of the more detailed aspects of CLM code design. It is intended to compliment and extend the information found on the previous page. If you have questions please contact us at CLM-CMT@cgd.ucar.edu.

...

Table of Contents
indent20px
styledisc

...

General Guidelines

  1. We support Fortran 2003 language features with a few exceptions. Information regarding compiler support for Fortran 2003 features may be found at the fortran wiki . The three Fortran 2003 feature that we can't support due to lack of compiler implementation are:
    1. finalization
    2. parameterized derived types
    3. derived type I/O
  2. Use implicit none. All variables must be explicitly typed.
  3. Don't repeat yourself. Duplicated code is difficult to maintain. If you find yourself using copy and paste more than once, create a new function or subroutine that encapsulates the desired functionality.
  4. Try to implement subroutine and function interface with argument lists of 9 or less. If you have lists longer than this, break up the functionality into multiple methods and/or use derived types for higher level interfaces. Try to have argument lists short enough that you can make unit-tests for them.
  5. If you have argument lists greater than 8 -- you must call such routines using the keyword-pair form for all arguments (but see 3 above).

...