Century and DayCent5 Command Options


To run a Century5 or DayCent5 simulation, enter one of the following commands in an MS-DOS window, Microsoft Windows console window, or from your Linux shell prompt:

century5 [options]
daycent5 [options]

where options is an optional list of parameters (do not enter the brackets) from the list of standard options, and for further information, the list of debug options. For examples of configuring the environment to find the executable files, see below.

Sometimes strings should be enclosed in double quotes, such as when file names and paths contain spaces.

If you have many simulations to run, you can create a text file containing the command-line options (exclude the executable command), and use a script program to run the simulations using those command-line options.

RunCmdLinesCentury5 command-line-file-name
RunCmdLinesDayCent5 command-line-file-name

See the Utilities section for more information on these scripts.

Alternatively, using the same command-line file, you can use MPI to distribute the simulations among many nodes and cores on a cluster or similar high-performance computer, using the utility C5MPI.

Command-Line Options

-s filename[,ID]     (Required) Name of site parameter file. Site ID number is required for spatial netCDF site files.
-m filename   (Required) Name of management file. To import a Century 4 schedule file, add the file name extension ".sch".
-o filename   Name of output file (omit the file name extension). This name will have a suffix and and extension added to it. For details, see the section Examining the Century Simulation Results.
-tn|-ts|-tsn|-t0|-td0   Output file type:
-tn
netCDF file.
-ts
CSV format; comma-separated values in a text spreadsheet format.
-tsn
Write to existing Spatial netCDF files. The files must have been created by C5MPI, IRC, IRCMPI, or a utility program.
-t0
Do not produce output files. This option turns off writing all output variable to the output files.
-td0
DayCent5 only: Do not produce daily output files. This option does not affect monthly output files. The default is to produce daily output files.
-an|-ar|-aa   Output file access:
-an
new (default);
-ar
replace;
-aa
append (not currently implemented.)
-f filename   Use the file name containing the fixed parameters (with optional path) supplied by the user.
-fm filename   Use the fixed parameters in this file name supplied with the model. For example, you may want to use the file gfix.100 for a temperate grassland.
-pp path   Specify a directory path for searching for parameter files (crop.100, etc.). This path is searched before the default path for the parameter files. The default path is a subdirectory of the installation path for the model. Parameter sets from this path are read first, then any sets in the default parameter file which have a different name are loaded next.
-soil filename[,ID]   Specify the name of a soils netCDF file containing parameter values for a soil that will replace the values in the site parameters. If the ID is provided, the soil with that ID in the netCDF file will be used. If no ID is given or the ID is not found, the first soil at the latitude and longitude in given in the site parameters will be used.
-mf name=value   Modify a parameter or management value by a fractional value. The parameter specified is multiplied by this value.
-mf?   View a list of names that can be specified in the -mf option.
-shp   Calculate the soil hydrologic parameters at initialization. This includes wilting point, field capacity, and for DayCent5, Ks. Calculations are based on soil texture, so sand, clay, and bulk density values per layer must be reasonable.
-u "username"   Your name (in quotes if username contains spaces). This is written to the output files, and to the output site file, if any.
-i filename   Specify the Century initialization file name and path.
-sf filename   Write new site parameters file at end of simulation with this name. This file will be in netCDF format, and will have " -ST.nc" added to filename.
-no-log   Do not produce a log file for this simulation. The default is to create a log file in either the output directory, or the current work directory if the "no output" option is given. The log file name will be have the form
"site-mgmt-date-time.log",
where site is the site file root name, mgmt is the management file root name, and date-time is a date and time timestamp.
-V   Display software copyright and version information.
-d?   Display debugging options. (You can see the section Debugging Command-Line Options below for the list.)
-?   Displays this help screen.

Debug Command-Line Options

-d1   Display total execution time.
-d2   Display time to the screen at each write to output.
-d3   Echo the command-line arguments.
-d4   Display simulation time limits.
-d5   Display verbose messages.
-d7   Century5 only: Produce a log file for the weather server.
-da   Turn on all the debugging options.

Examples

Example command for a Century5 simulation:

century5 -s site/Jungle.100 -m mgmt/Jungle.sch -o output/Jungle -fm tfix.100 -ts -ar -u "George" -d1

If you are using BASH (in Linux or Cygwin), you can use environment variables to hold the command-line options, and put everything into a shell script file which can be re-used, or kept for history:

#!/bin/bash
# configuration
site="site/Jungle.100"
mgmt="mgmt/Jungle.sch"
output="output/Jungle"
fix='tfix.100'
options='-ts -ar -u George -d1'
# executable file
model='century5'
# run the simulation
$model -s $site -m $mgmt -o $output -fm $fix $options
  

Configuring the Operating System Environment

Microsoft Windows Configuration Suggestions

If the file "century.gxx.exe" is not located within a folder specified in your PATH variable, you should supply the path in the command name. On Microsoft Windows systems, if there are spaces in the folder names in the path, enclose the entire name in double-quotes, e.g.,

"C:\cygwin\home\MYNAME\dev\IRC\Ecosystem\Century5\bin\century5.gxx.exe" [options]

On Microsoft Windows systems, you can create a batch file to store this command for you. The batch file would then be kept in a folder in your search path. For example, the batch file may be called "century.bat" and contain only the following line:

"C:\cygwin\home\MYNAME\dev\IRC\Ecosystem\Century5\bin\century5.gxx.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9

Alternatively, you can create a shortcut to the executable file, add specific command-line parameters, and rename this shortcut to reflect its customization. For instance, you can have different shortcuts to century5, each with a command-line parameter for the initialization file specific to a project. Each shortcut might have a name such as "century5 for Project Cool". The shortcuts can exist in the project folders.

Cygwin, Linux, UNIX (etc.), and Apple OS X Configuration Suggestions

On these systems, you can modify your shell's PATH (or path) environment variable to include the installation path of the Century files. Then you will be able to execute any of the Century files from any location on your system. In the BASH shell's ~/.bash_profile file, put the line

export PATH=$PATH:~/dev/IRC/Ecosystem/Century5/bin

Alternatively, you can create an alias in your shell's startup configuration file (e.g., .profile or .bashrc) containing a command line, including your usual initialization file. For example, a BASH alias can be as follows:

alias century5="~/dev/IRC/Ecosystem/Century5/bin/century5.gxx.exe"
alias daycent5="~/dev/IRC/Ecosystem/Century5/bin/daycent5.gxx.exe"

The actual form of the alias definition may vary according to the syntax rules of the shell you are using.

Most Linux systems have /usr/local/bin in your PATH variable. If you have administrator privileges (or if you give your sysAdmin a bar of good chocolate) add a link to the executable files in /usr/local/bin:

ln -s ~/dev/IRC/Ecosystem/Century5/bin/century5.gxx.exe /usr/local/bin/century5
ln -s ~/dev/IRC/Ecosystem/Century5/bin/daycent5.gxx.exe /usr/local/bin/daycent5

See Also

Running a Century5 or DayCent5 Simulation
Running a Century Simulation to Equilibrium
Site Parameters Validation
C5MPI