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|
- 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:
- parameterized derived types
- derived type I/O
- Use implicit none. All variables must be explicitly typed.
- 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.
- 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.
- 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).