Skip to main content

Module 6: cropping systems, simulating crop rotations

The sixth day of the course covers cropping systems: simulating crop rotations, and creating the experiment file for a rotation (sequence) analysis. The course’s own material for that day is not available here, so this module is built from DSSAT’s sequence examples in dssat-csm-data, the engine’s source code and Bowen et al. (1998) on simulating cropping sequences with DSSAT.

  1. The anatomy of a sequence experiment file (.SQX).
  2. How the engine runs a sequence (mode Q).
  3. Two examples: soybean or dry bean followed by fallow at Gainesville (UFGA7803.SQX), and soybean, chickpea and fallow at Hyderabad (ITHY7501.SQX).
  4. Creating a sequence experiment: the Hyderabad rotation without the chickpea, written in code, compared with the full rotation over 25 years.
engine   : C:\TEMP\dsn\dssat\dscsm048.exe
csm-data : C:\Users\benny\OneDrive\Documents\Github\dssat-csm-data @ 99c95b34

1. A sequence experiment file

A sequence file has the sections of any experiment file. What differs is the treatment table. In an ordinary experiment each line is a treatment; in a sequence each line is one component of a rotation, and the columns before the name say where it belongs:

  • N: the sequence (treatment) the component belongs to;
  • R: the rotation component number, the order in which the crops follow each other;
  • O: rotation option and C: crop component (both 0 in the examples here).

The engine’s reader shows the difference: in sequence mode N and R are read as two-digit numbers (ipexp.for:865-866, formats 55 and 56). Only the first component has initial conditions (IC level 1); the later ones have IC 0 and start from the soil the previous crop left. A fallow is a component too, with crop code FA, ended by a harvest date. Every component has its own simulation-control level (SM): its own planting rule, water and nitrogen switches, and harvest.

*EXP.DETAILS: UFGA7803SQ SEQUENCE ANALYSIS, SIMPLE MULTI-TREAT FILE, 5 YEARS; 30 REPS
*TREATMENTS                        -------------FACTOR LEVELS------------
@N R O C TNAME.................... CU FL SA IC MP MI MF MR MC MT ME MH SM
 1 1 1 0 Soybean treatment 1        1  1  0  1  1  1  0  0  0  0  0  0  1
 1 2 1 0 Fallow treatment 1         2  1  0  0  0  0  0  0  0  0  0  1  2
 2 1 1 0 Dry bean treatment 2       3  1  0  1  1  1  0  0  0  0  0  0  1
 2 2 1 0 Fallow treatment 2         2  1  0  0  0  0  0  0  0  0  0  1  2
*CULTIVARS
@C CR INGENO CNAME
 1 SB IB0001 BRAGG
 2 FA IB0001 -99
 3 BN IB0001 PORILLO SINTETICO

*EXP.DETAILS: ITHY7501SQ SOYBEAN-CHICKPEA ROTATION; 25 YEARS, 15 REPS
*TREATMENTS                        -------------FACTOR LEVELS------------
@N R O C TNAME.................... CU FL SA IC MP MI MF MR MC MT ME MH SM
 1 1 0 0 SOYBEAN                    1  1  0  1  1  0  1  0  0  0  0  0  1
 1 2 0 0 CHICKPEA                   2  1  0  0  2  0  0  0  0  0  0  0  2
 1 3 0 0 FALLOW                     3  1  0  0  0  0  0  0  0  0  0  1  3
*CULTIVARS
@C CR INGENO CNAME
 1 SB IB0051 PK-472
 2 CH IB0001 ANNIGERI
 3 FA    -99 -99

 1 GE             25    15     S 75152  2150 SOYBEAN
 1 MA              R     N     R     N     M
 1 PL          75169 75183    40   100    30    40    10
 1 HA              0 96176   100     0
 2 GE             25    15     S 75152  2150 CHICKPEA
 2 MA              A     N     R     N     M
 2 PL          75280 75330    40   100    30    40    10
 2 HA              0 96176   100     0
 3 GE             25    15     S 75152  2150 FA
 3 MA              R     N     N     N     R
 3 PL          75169 75183    40   100    30    40    10
 3 HA              0 96176   100     0
WindowsPath('C:/Users/benny/OneDrive/Documents/Github/xdssat/docs/learn/data/module6/sqx_controls.csv')

2. Running a sequence

The engine runs a sequence in mode Q from a batch file that lists the components in order: the file name in the first 92 columns, then the treatment, replicate and sequence (component) numbers as 1X,I6 fields (CSM_Main/CSM.for, the batch reader). It runs one line per crop season and starts again from the first line for the next year, carrying the soil water, mineral and organic nitrogen, carbon and residues from one crop to the next. learnlib.run_sequence writes the batch file and runs one sequence; two sequences in one batch would be chained into each other, so each gets its own run.

NYERS sets the number of years and NREPS the number of replicates. Both example files generate their weather (WTHER = W, from the climate files UFGA.CLI and ITHY.CLI), so each replicate is a different draw of the same climate.

UFGA7803: 660 crop seasons in 80 s
HWAM NFXM NLCM
sequence crop
Gainesville: dry bean - fallow dry bean 1128.0 103.0 13.0
fallow 0.0 0.0 40.0
Gainesville: soybean - fallow fallow 0.0 0.0 33.0
soybean 3396.0 331.0 24.0

3. Soybean, chickpea and fallow at Hyderabad

ITHY7501.SQX grows soybean (PK-472) in the rainy season, chickpea (Annigeri) after it, and a fallow until the next soybean, for 25 years with 15 weather replicates.

ITHY7501: 1125 crop seasons in 99 s
HWAM NFXM NLCM PRCM
crop
chickpea 339.0 16.0 0.0 39.0
fallow 0.0 0.0 0.0 156.0
soybean 3270.0 205.0 13.0 668.0

4. Creating a sequence experiment: the rotation without chickpea

To see what the chickpea does for the system, write a second sequence in the same file: soybean followed directly by the fallow. In the treatment table that is two more lines, treatment 2, with the soybean and fallow components of treatment 1 renumbered as rotation components 1 and 2. Nothing else changes: the fallow still ends on its harvest date, before the next soybean.

*TREATMENTS                        -------------FACTOR LEVELS------------
@N R O C TNAME.................... CU FL SA IC MP MI MF MR MC MT ME MH SM
 1 1 0 0 SOYBEAN                    1  1  0  1  1  0  1  0  0  0  0  0  1
 1 2 0 0 CHICKPEA                   2  1  0  0  2  0  0  0  0  0  0  0  2
 1 3 0 0 FALLOW                     3  1  0  0  0  0  0  0  0  0  0  1  3
 2 1 0 0 SOYBEAN                    1  1  0  1  1  0  1  0  0  0  0  0  1
 2 2 0 0 FALLOW                     3  1  0  0  0  0  0  0  0  0  0  1  3
750 crop seasons in 72 s
HWAM NFXM NLCM NUCM
sequence crop
Hyderabad: soybean - chickpea - fallow chickpea 339.0 16.0 0.0 25.0
fallow 0.0 0.0 0.0 0.0
soybean 3270.0 205.0 13.0 91.0
Hyderabad: soybean - fallow fallow 0.0 0.0 0.0 0.0
soybean 3317.0 190.0 28.0 112.0
first last
sequence
Gainesville: dry bean - fallow 38697.0 37310.5
Gainesville: soybean - fallow 38834.5 37847.0
Hyderabad: soybean - chickpea - fallow 91733.0 69048.0
Hyderabad: soybean - fallow 91535.0 62551.0

5. Things to try

  • Give the chickpea irrigation at planting (an irrigation level for component 2) and compare the system.
  • Remove the residue that the soybean leaves (a residue management level), and watch the soil carbon.
  • Replace generated weather by measured Hyderabad weather (WTHER = M; dssat-csm-data has ITHY7501 to ITHY9901): does the ranking of the two sequences hold for the actual years?
0
engine C:\TEMP\dsn\dssat\dscsm048.exe
csm_data_commit 99c95b340acb9515c2d0a8ab582f5fbbf076f345
csm_os_commit 25c93b9a2f73f8ec45bf441b198dac5fb7b22849
run_on 2026-11-07 00:04
Back to top