Options to configure

All configuration options can be specified using command line arguments to configure and this is the recommended practice. Options specified via command line arguments take precedence over options specified any other way.

At the next level of precedence a few options can be specified by setting environment variables. And finally, at the lowest precedence, many options have hard-coded defaults. Most of these are located in the files $CAM_ROOT/models/atm/cam/bld/config_files/defaults_*.xml. A few that depend on the values of other options are set by logic contained in the configure script (a Perl script). The hard-coded defaults are designed to produce the standard production configurations of CAM.

The configure script allows the user to specify compile time options such as model resolution, dynamical core type, additional compiler flags, and many other aspects. The user can type configure --help for a complete list of available options.

The options may all be specified with either one or two leading dashes, e.g., -help or --help. The few options that can be expressed as single letter switches may not be clumped, e.g., -h -s -v may NOT be expressed as -hsv. When multiple options are listed separated by a vertical bar either version may be used.

CAM configuration

These options will have an effect whether running CAM as part of CESM or running in a CAM standalone mode:

-[no]age_of_air_trcs

Switch on [off] age of air tracers. Default: on for waccm_phys, otherwise off.

-carma <name>

Build CAM with specified CARMA microphysics model [ none | bc_strat | cirrus | dust | meteor_smoke | pmc | sea_salt | sulfate | test_detrain | test_growth | test_passive | test_radiative | test_swelling | test_tracers ]. Default: none.

-chem <name>

Build CAM with specified prognostic chemistry package [ waccm_mozart | waccm_mozart_v1 | waccm_mozart_sulfur | waccm_ghg | trop_mozart | trop_mozart_mam3 | trop_mozart_soa | trop_ghg | trop_bam | trop_mam3 | trop_mam7 | super_fast_llnl | super_fast_llnl_mam3 | trop_strat_bam_v1 | trop_strat_mam3 | trop_strat_mam7 | none ]. Default: trop_mam3 if the physics package is cam5, otherwise default is none.

-clubb_sgs

Switch to turn on the CLUBB_SGS package. Default: Off.

-co2_cycle

This option is usually used with the -ccsm_seq option as part of the configuration for running biogeochemistry (BGC) compsets. It modifies the CAM configuration by increasing the number of advected constituents by 4. Default: not set.

-comp_intf [mct | esmf]

Specify the component interfaces Default: mct.

-cosp

Enable the COSP simulator package. Default: not set.

-cppdefs <string>

A string of user specified CPP defines appended to Makefile defaults. E.g. -cppdefs '-DVAR1 -DVAR2'. Note that a string containing whitespace will need to be quoted.

-dyn [eul | sld | fv | homme ]

Build CAM with specified dynamical core. Note that the spectral element dycore is specified by using the option homme. Default: fv.

-edit_chem_mech

Invokes CAMCHEM_EDITOR to allow the user to edit the chemistry mechanism file.

-hgrid <name>

Specify horizontal grid. For spectral grids use nlatxnlon where nlat and nlon are the number of latitude and longitude grid points respectively in the global Gaussian grid. For FV grids use dlatxdlon where dlat and dlon are the grid cell size in degrees for latitude and longitude respectively. For SE grids (cubed sphere) use nexnp where ne is the number of elements on an edge of the cube, and np is the number of Gauss points on the edge of an element.

-microphys [mg | rk]

Microphysics package. Default: mg if the physics package is cam5, otherwise rk.

-nadv <n>

Set total number of advected species to <n>. If -nadv is set to a larger number than is required by the selected physics and chemistry schemes, then the remainder will automatically be used for test tracers. Default: set to the number required by the selected physics and chemistry schemes.

-nadv_tt <n>

Set number of advected test tracers to <n>. Default: 0.

-nlev <n>

Set number of vertical layers to <n>. Default: 30 if the physics package is cam5, ideal, or adiabatic. 26 if the physics package is cam4. 66 if the chemistry package is waccm_*. 81 if the -waccmx is used.

-offline_dyn

Switch enables the use of offline driver for FV dycore. Default: not set.

-pbl [uw | hb | hbr | clubb_sgs]

PBL package. Default: uw if the physics package is cam5; clubb_sgs if the -clubb_sgs switch is set; otherwise hb.

-pcols <n>

Set maximum number of columns in a chunk to <n>. Default: 16.

-pergro

Switch enables building CAM for perturbation growth tests. Only valid with cam3 and cam4 physics packages.

-phys [cam3 | cam4 | cam5 | ideal | adiabatic]

Physics package. Default: cam5.

-prog_species <list>

Comma separated list of prognostic mozart species packages. Currently available: DST,SSLT,SO4,GHG,OC,BC,CARBON16

-rad [rrtmg | camrt]

Radiation package. Default: rrtmg if the physics package is cam5, otherwise camrt.

-usr_mech_infile <name>

Pathname of the user supplied chemistry mechanism file.

-waccm_phys

Switch enables the use of WACCM physics in any chemistry configuration. Default: Off. If one of the waccm chemistry options is chosen then it's automatically turned on.

-waccmx

Build CAM/WACCM with WACCM upper Thermosphere/Ionosphere extended package.

SCAM configuration

-camiop

Configure CAM to generate an IOP file that can be used to drive SCAM. This switch only works with the Eulerian dycore.

-scam

Compiles model in single column mode. Only works with Eulerian dycore.

CAM parallelization

-ntasks <n>

This option must be used to specify SPMD parallelism when the CICE component is present. <n> is the number of MPI tasks. Setting ntasks > 0 implies -spmd. Use -nospmd to turn off linking with an MPI library. To configure for pure MPI specify "-ntasks N -nosmp". ntasks is used by CICE to determine default grid decompositions which must be specified at build time.

-nthreads <n>

This option must be used to specify SMP parallelism when the CICE component is present. <n> is the number of OpenMP threads per process. Setting nthreads > 0 implies -smp. Use -nosmp to turn off compilation of OMP directives. For pure OpenMP set "-nthreads N -nospmd" nthreads is used by CICE to determine default grid decomposition which must be specified at build time.

-[no]smp

Switch on [off] SMP parallelism (OpenMP). This option can be used when building a model that doesn't contain CICE. It allows building an executable whose thread count can be set at run time.

-[no]spmd

Switch on [off] SPMD parallelism (MPI). This option can be used when building a model that doesn't contain CICE. It allows building an executable whose task count can be set at run time.

CICE decomposition

When CAM is running standalone with CICE the default CICE decomposition is determined from the values of the -ntasks and -nthreads arguments. The user also has the ability to explicitly set the CICE decomposition using the following arguments:

Note: *** All four of these arguments must be set. ***

-cice_bsizex <n>

CICE block size in longitude dimension. This size must evenly divide the number of longitude points in the global grid.

-cice_bsizey <n>

CICE block size in latitude dimension. This size must evenly divide the number of latitude points in the global grid.

-cice_maxblocks <n>

Maximum number of CICE blocks per process.

-cice_decomptype <name>

CICE decomposition type [ cartesian | spacecurve | roundrobin ].

General options

-cache <name>

Name of output cache file. Default: config_cache.xml.

-cachedir <dir>

Name of directory where output cache file is written. Default: CAM build directory.

-ccsm_seq

Switch to specify that CAM is being built from within the CESM scripts. This produces Filepath and CCSM_cppdefs files that contains only the paths and CPP macros needed to build a library for the CAM component.

-defaults <name>

Specify a configuration file which will be used to supply defaults instead of one of the config_files/defaults_*.xml files. This file is used to specify model configuration parameters only. Parameters relating to the build which are system dependent will be ignored.

-help | -h

Print usage to STDOUT.

-silent | -s

Turns on silent mode - only fatal messages printed to STDOUT.

-test

Switch on testing of Fortran compiler and linking to external libraries.

-verbose | -v

Turn on verbose echoing of settings made by configure.

-version

Echo the repository tag name used to check out this CAM source tree.

Surface components

Options for surface components used in standalone CAM mode:

-ice [cice | sice ]

Specify the sea ice component. Default: cice.

-lnd [clm | slnd ]

Specify the land component. Default: clm.

-ocn [docn | socn | dom | aquaplanet ]

Specify ocean component. If set to aquaplanet then the stub ice (sice) and stubb land (slnd) components are implied. Default: docn.

-rof [rtm | srof ]

Specify the river runoff component. Default: rtm.

CAM standalone build

Options for building CAM via standalone scripts:

-cam_bld <dir>

Directory where CAM will be built. This is where configure will write the output files it generates (Makefile, Filepath, etc...). Default: ./

-cam_exe <name>

Name of the CAM executable. Default: cam.

-cam_exedir <dir>

Directory where CAM executable will be created. Default: CAM build directory.

-cc <name>

User specified C compiler. Default: Depends on the OS and the Fortran compiler.

-cflags <string>

A string of user specified C compiler options appended to the default options set in Makefile.

-debug

Switch to turn on building CAM with compiler options for debugging. The specific options are compiler dependent. These flags are set in the Makefile.in template file.

-esmf_libdir <dir>

Directory containing ESMF library and the esmf.mk file. If this option is specified then the external ESMF library will be used in place of the ESMF-WRF time manager code which is provided in the CESM source distribution.

-fc <name>

User specified Fortran compiler. Default: Depends on the OS and whether MPI is enabled.

-fc_type [pgi | lahey | intel | pathscale | gnu | xlf]

Type of the Fortran compiler. This argument is used in conjunction with the -fc argument when the name of the fortran compiler refers to a wrapper script (e.g., mpif90 or ftn). In this case the user needs to specify the type of Fortran compiler that is being invoked by the wrapper script. Default: Depends on the name of the Fortran compiler.

-fflags <string>

A string of user specified Fortran compiler options appended to the default options set in the Makefile. See -fopt to override optimization flags.

-fopt <string>

A string of user specified Fortran compiler optimization flags. Overrides Makefile defaults.

-gmake <name>

Name of the GNU make program on your system. Supply the absolute pathname if the program is not in your path (or fix your path). This is only needed by configure for running tests via the -test option.

-lapack_libdir <dir>

Directory containing LAPACK library.

-ldflags <string>

A string of user specified load options. Appended to Makefile defaults.

-linker <name>

User specified linker. Default: use the Fortran compiler.

-mpi_inc <dir>

Directory containing MPI include files.

-mpi_lib <dir>

Directory containing MPI library.

-nc_inc <dir>

Directory containing NetCDF include files.

-nc_lib <dir>

Directory containing NetCDF library.

-nc_mod <dir>

Directory containing NetCDF module files.

-pnc_inc <dir>

Directory containing PnetCDF include files.

-pnc_lib <dir>

Directory containing PnetCDF library.

-rad_driver

Build CAM with the offline radiation driver. This produces an executable that can only be used for offline radiation calculations.

-target_os <name>

Override the OS setting for cross platform compilation from the following list [aix|irix|linux| bgl|bgp ]. Default: OS on which configure is executed as defined by the Perl $OSNAME variable.

-usr_src <dir1>[,<dir2>[,<dir3>[...]]]

Directories containing user source code. Note that these directories will also be searched for modified versions of the files needed by the build-namelist script, e.g., the namelist definition and use case files.