next up previous contents
Next: 4 Namelist Variables Up: 3 The CSIM Scripts Previous: 3.3 Uncoupled Setup Script   Contents


3.4 The Build Environment

The coupled and uncoupled ice models use the same Makefile and make environment. These files are located in the ccsm3/models/bld directory for the coupled model and in ccsm3/models/ice/csim4/src/bld for the uncoupled model. These directories contain the following files:

There is a Macros.$<$OS$>$ file for each supported platform. These files contain machine dependent preprocessor, compiler and library information for building the model. The Macros.$<$OS$>$ files for the uncoupled model have been simplified, since most of the libraries used by the coupled model are not used by the uncoupled ice model. If you are running the model on a platform other than those tested, you will need to create a new Macros.$<$OS$>$ file and modify the paths and settings for your system. In some cases, CSIM has a set of options that are different from the default values at the top of the file. These are after the line ifeq ($(MODEL),csim) in the Macros.$<$OS$>$ files and are described below.

3.4.1 CSIM Preprocessor Flags

Preprocessor flags are activated in the form -Doption in the Macros.$<$OS$>$ files. The flags specific to the ice model are


The option -Dcoupled is set to activate the coupling interface. This will include the source code in ice_coupling.F, for example. For uncoupled runs, it has been removed. If a coupler other than the CCSM coupler is used, there is a flag called -Dfcd_coupled that will keep the fluxes from being divided by the ice area. In coupled runs, the CCSM coupler multiplies the fluxes by the ice area, so they are divided by the ice area in CSIM to get the correct fluxes.

The options -DNPROC_X=$(NX) and -DNPROC_Y=$(NY) set the number of processors used in each grid direction. These values are set automatically in the scripts for the coupled model, and in csim_run by the user for uncoupled runs. NX and NY must divide evenly into the grid, and are used only for MPI grid decomposition. If NX or NY do not divide evenly into the grid, the model setup will exit from the setup script and print an error message to the ice.log* (standard out) file.

The flag -D_MPI sets up the message passing interface. This must be set for runs using a parallel environment. To get a better idea of what code is included or excluded at compile time, grep for ifdef and ifndef in the source code or look at the *.f files in the /obj directory.

3.4.2 CSIM Compiler Options

The name of the Fortran compiler is set by the variable FC in the Macros.$<$OS$>$ files. The default name of the compiler is f90 on the SGI and mpxlf90_r on the IBM SP. CSIM uses the following compiler options on the SGI platform:

   FFLAGS     := -c -64 -mips4 -O2 -r8 -i4 -show -extend_source

On the IBM, the following compiler options are set in Macros.AIX:

   FFLAGS  := -c -O2 -qstrict -Q -qmaxmem=-1 -qrealsize=8  \
              -qarch=auto -qtune=auto

next up previous contents
Next: 4 Namelist Variables Up: 3 The CSIM Scripts Previous: 3.3 Uncoupled Setup Script   Contents