Skip to content

Conventions

Robert Pincus edited this page Jul 31, 2018 · 6 revisions

RTE+RRTMGP aspires to follow a set of coding conventions that may be useful in learning to use the code.

  • Module names start with mo_, class/type names with ty_.
  • Real variables are defined with working precision wp set in rte/mo_rte_kind.F90
  • Most procedures in RTE+RRTMGP are functions which return a string. A non-empty string indicates an error of some kind.
  • RTE and RRTMGP operate on multiple columns (profiles) at once. Problems are dimensioned by column, layer, and spectral quadrature point.
  • RTE and RRTMGP are agnostic to vertical ordering
  • Many classes use
    • init() routines to specify e.g. the spectral discretization
    • load() routines to provide data (e.g. lookup tables) needed to do a calculation
    • alloc() routines to allocate memory once the problem size is known
    • finalize() routines to reset variables to an un-initialized state
  • Some classes have get_ncol() and get_nlay() methods to report the problem size
  • Some classes have get_subset() methods to extract values along the column dimension
  • Units are MKS

Most user-facing procedures are documented in this Wiki. Curious users can also inspect the public names in each class definition or see which routines are declared as public in individual modules.

Clone this wiki locally