Abstract IAMG 2009
The CSDMS project and submission standards for model source code
S.D. Peckham, E.W.H. Hutton and J.P.M. Syvitski
CSDMS Integration Facility, INSTAAR, University of Colorado, Boulder CO, 80309-0545
The Community Surface Dynamics Modeling System (CSDMS) is an NSF-funded project that represents an effort to bring together a diverse community of surface dynamics modelers and model users. Key goals of the CSDMS project are to
- promote open-source code sharing and re-use,
- to develop a review process for code contributions,
- promote recognition of contributors,
- develop a library of low-level software tools and higher-level models that can be linked as easily as possible into new applications and
- provide resources to simplify the efforts of surface dynamics modelers.
CSDMS builds upon the software standards and tools of the Common Component Architecture (CCA) which have been specifically designed to support component-based, high-performance, scientific computing. Babel, one of the key tools in the CCA toolchain, provides interoperability between components that are written in different languages. It currently supports C, C++, Fortran (all years), Java and Python. In addition, CSDMS utilizes model interface standards such as OpenMI to help accomodate other differences between models, such as dimensionality, units and computational mesh type.
In order for a model to be usable as a plug-and-play component, it must provide some type of standard component interface. Typical surface dynamics models advance values forward in time on a grid or mesh and have a similar internal structure. This structure consists of some lines of code before the beginning of a time loop, some lines of code inside the time loop and then some additional lines after the end of the time loop. Virtually all component-based modeling efforts have recognized the utility of moving these lines of code into three separate functions, with names such as Initialize, Update and Finalize. This very simple refactoring is a first important step towards allowing a model or process module to be used either as a component within a larger application or as a stand-alone model. It provides a calling program with fine-grained access to the model's capabilities and the ability to take over the management of time. Another key step is to annotate the model source code using special keywords within comment blocks to provide basic metadata for a model and its variables. For example, metadata for a variable would include its units, valid range of values and whether it is used for input or output. This type of annotation makes it possible to write utilities that parse the source code, extract the metadata and then automatically generate whatever component interface is required for compatibility with other models. The purpose of this talk is to explain these ideas with examples and to propose a set of model code submission standards that may be adopted by code repositories such as CSDMS or Computers & Geosciences. Though relatively simple, standards such as these will help to facilitate more widespread use of open-source models.