next up previous contents
Next: 2.1 The configure utility Up: usersguide Previous: 1.5 Getting Help -   Contents


2. Building and Running CAM

This chapter describes how to build and run the standalone model CAM 3.0. This includes a description of the build procedure, a variety of example use cases demonstrating available options, and a discussion of running the executable. CAM 3.0 may also be run as part of the Community Climate System Model (CCSM); this is discussed in Section 2.7 on page [*].

Building and running CAM takes place in the following steps:

  1. Configure
  2. Build model
  3. Build namelist
  4. Execute model

Configure includes setting the compile-time parameters such as resolution, dynamical core (Eulerian Spectral, Semi-Lagrangian Spectral, or Finite-Volume), type of parallelism to employ (shared-memory and/or distributed memory), number of constituents, and number of vertical levels. This step is done most easily by invoking the configure script that creates the files necissary for the build step to take place. The configure utility is discussed in the configure ([*]) section.

Build model includes compiling and linking the executable using the GNU make utility. The configure script creates a copy of the Makefile in the directory where the build is to take place. The user then need only change to this directory and execute gmake.

Build namelist includes executing the build-namelist script, which supports a variety of options to control the run-time behavior of the model. The build-namelist utility is discussed in the build-namelist (2.2) section.

Execute model includes the actual invocation of the executable. When running using distributed memory parallelism this step requires knowledge of how your machine invokes MPI executables. When using shared-memory parallelism using Open-MP you may also set the number of Open-MP threads.

It is assumed that the user has access to the utilities tar, gunzip, gmake (GNU make), and perl. The scripts written in perl need at least Perl 5.4 to work. Lastly, we assume there is a CAM 3.0distribution (with root $CAM_ROOT) available.

The most basic execution procedure is:

$CAM_ROOT/models/atm/cam/bld/configure
gmake
$CAM_ROOT/models/atm/cam/bld/build-namelist
./cam < namelist

Most users will encapsulate these steps in higher level perl or shell scripts. Sample scripts to use as templates for this purpose are included in the directory $CAM_ROOT/models/atm/cam/bld. These are discussed in more detail in the section named Sample Run Scripts (2.4).



Subsections
next up previous contents
Next: 2.1 The configure utility Up: usersguide Previous: 1.5 Getting Help -   Contents
Jim McCaa 2004-10-22