Header Image

DayCent Step by Step

If you want a copy of these instructions that you can download click here.

Summary of DayCent command lines

The version of DayCent shown here is DDcent_vDec2016.exe. This version requires a PC with the 64-bit version of Microsoft Windows. DayCent is run from the DOS Command Window.

Definitions of command line arguments:

<sch_file> = schedule file name (do not include the .sch extension on the command line)

<binary_file> = binary file containing all DayCent’s monthly output variables (do not include the .bin extension on the command line). Note: This file is not readable, it requires the List100 program DDcent_list100_vDec2016.exe to extract output.

<extend_file> = binary file from a previous simulation used to initialize the model for the next simulation (do not include the .bin extension on the command line)

<lis_file> = ASCII output file containing output extracted from binary file (do not include the .lis extension on the command line)

<txt_file> = text file that contains a list of variables to extract from the binary file output (for example, outvars.txt)

To run the DayCent model with command line arguments:

DDcent_vDec2016.exe -s <sch_file> -n <bin_file>
For instance: run spinup.sch and save to spinup.bin:

DDcent_vDec2016.exe -s spinup -n spinup

To run the DayCent model extending from a previous simulation:

DDcent_vDec2016.exe -s <sch_file> -n <bin_file> -e <extend_file>
For instance: run example1.sch by extending the simulation from spinup.bin and save to example1.bin
DDcent_vDec2016.exe -s example1 -n example1 –e spinup

To run the List100 without command line arguments:

DDcent_list100_vDec2016.exe

To run the List100 program using a list of output variables:

DDcent_list100_vDec2016.exe <bin_file> <lis_file> <txt_file>
For instance: read binary file example1.bin, save the variables listed in outvars.txt to ASCII file example1.lis

DDcent_list100_vDec2016.exe example1 example1 outvars.txt

Step by Step: A DayCent Tutorial

Prepared by Cindy Keough and Melannie Hartman (Colorado State University)

 

Step 1:  Collect your site data.

  1. Create a daily weather data file.
  2. Create soils.in file
  3. Update weather statistics in the <site>.100 file to correspond the weather file.
  4. Update other site-specific parameters in the <site>.100 file

 

Steps a– d above can be accomplished using the mksitesoil.exe utility.  The mksitesoil.exe utility will read a file named site_soil.txt and 1) update weather statistics in the <site>.100 file, 2) create a soils.in file, and 3) update several parameters in <site>.100 so they are consistent with soils.in.  The site_soil.txt file can be edited using any text editor such as Windows Notepad or Windows WordPad.

The value in site_soil.txt are:

  • First part of the weather and <site>.100 file names
  • latitude of site – SITLAT (decimal degrees)
  • longitude of site – SITLNG (decimal degrees)
  • fraction of sand in the soil – SAND (0.0 – 1.0)
  • fraction of silt in the soil – SILT (0.0 – 1.0)
  • fraction of clay in the soil – CLAY (0.0 – 1.0)
  • bulk density of soil – BULKD (g cm-3)
  • soil pH
  • number of CENTURY (not DayCent) soil layers to simulate – NLAYER (1 – 9)

 

Step 2: Create Site Specific Event Options

  1. When creating a new option in a *.100 file the first 5 characters of the abbreviation for the option are used for entering the event into a schedule file. These abbreviations must be unique for each option in the file.
  2. Modify the outfiles.in file to indicate the text output files (*.out *.csv) you want the model to produce.

 

Step 3:  Determine the order and types of events that you want to include in the schedule file for your simulation.

 

Modify example schedule files using a text editor.  See SchedulingEvents.docx for more information.

 

 

Step 4:  Run your simulation

 

  1. The command line for running the DDcent_vDec2016.exe model is:

DDcent_vDec2016.exe -s <sch_file> -n <bin_file>

  • where sch_file in the name of your schedule file without the .sch extension
  • bin_file is the name of the binary file of monthly output that will be created without the .bin extension.

 

For organizational sake it is easier to keep track of which schedule file and binary file go together if the same or similar file name is used for both files.  For example, to run the example.sch file to produce a binary output file named example.bin use the command line:

DDcent_vDec2016.exe -s example -n example

 

  1. DDcent_vDec2016.exe can also be run using information from the end of a previous simulation as a starting point for a new simulation. This option is used when the model has been run to simulate a site up to a specific time period and you wish to run the model forward in time using different options to examine how different management practices will affect the model output.  For example, traditional cropping until 2005 and then 4 simulations from 2006 to 2100 one with no-till, one with a reduced amount of fertilizer applied, one using a different crop rotation, and one where the site is allowed to go back to native conditions.

 

To run the DDcent_vDec2016.exe model extending from a previous simulation use the command line:

DDcent_vDec2016.exe -s <sch_file> -n <bin_file> -e <extend_file>

  • where sch_file in the name of your schedule file without the .sch extension,
  • bin_file is the name of the binary file of monthly output that will be created without the .bin extension, and
  •  extend_file is the name of the binary file that will be read as a starting point without the .bin extension.

Using the example above and extending from a file named historic.bin the command line is as follows:

DDcent_vDec2016.exe -s example -n example -e historic

 

Step 5.  Examine the model output

 

  1. It is important to check the net primary productivity (NPP) that the model is predicting for your site. If the NPP for your site is not correct then none of the other model output can be expected to be representative of the conditions at your site.

 

  1. If desired, use the DDcent_list100_vDec2016.exe utility to extract output variables from the *.bin file into an *.lis file in ASCII format. To run DDcent_list100_vDec2016.exe use the command line:

DDcent_list100_vDec2016.exe

 

and follow the on-screen prompts.  The DDcent_list100_vDec2016.exe utility can also be run using an input file containing a list of output variables that you wish to extract from the file.  This option can be useful when running the model using a batch file or script.

 

DDcent_list100_vDec2016.exe <bin_file> <lis_file> <txt_file>

  • where bin_file is the *.bin file from which you wish to extract data without the .bin extension,
  • lis_file is the output file that will be created by the exe utility without the .lis extension, and
  • txt_file is a text file with a list of output variables one per line.

 

For example, to extract information from the example.bin file to create an example.lis file with the output variables in the outvars.txt file use the command line:

 

DDcent_list100_vDec2016.exe example example outvars.txt

 

  1. For binary output file variable definitions (extracted into a .lis file with DDcent_list100_vDec2016.exe) see the following documentation:

 

Appendix_2.Model_Output_Variables.pdf

 

  1. The *.out and *.csv output files are text files. For descriptions of the output contained in these files see the following documentation:

 

Appendix_2.Model_Output_Variables.pdf