Oklahoma State University

CMLS98B Program

Purpose | Processes and Assumptions | Installation | Use | Example | References | Acknowledgements
Program Structure | Platform Dependencies | File Structures


The following sections outline the steps involved in the CMLS98B software. More details about the algorithms used are provided on disk files with the computer code.

The main program in CMSL98B carries out the following steps:

  1. Get input file name from the command line and open input file; exit on error
  2. If a checkfile is specified
    1. Try to open checkfile for writing; if unable to do so print error message and exit
  3. While more General/System blocks of data exist in the input file do the following:
    1. Get input for current block, check for errors, and exit if errors are detected
    2. Prepare output file for results
    3. Perform simulations requested and store results in output file
  4. Close the output file
  5. Close the checkfile
  6. End

The simulate module carries out the following steps:

  1. Display the number of simulations to be made (for user information)
  2. For each simulation do the following:
    1. Select a planting date at random from the planting window
    2. Calculate the crop coefficient for each calendar day
    3. For each soil-chemical combination specified in system block do the following:
      1. Generate weather if necessary
      2. Determine reference ET by method specified by user and store in memory
      3. Store rain (or actual infiltration) in memory
      4. Read system information for next soil-chemical system. If resampling is to be used, compute necessary parameters
      5. Select the application date from the application window (and planting date if "Relative" was specified)
      6. Calculate movement of chemical in current soil-chemical system saving data requested by user
      7. Store results of interest in output file

The movement module carries out the following steps:

  1. Initialize working arrays and variables
  2. If curve number for soil is greater than zero calculate upper storage limit
  3. Calculate available water in each layer
  4. If amount is a desired output, calculate the degradation for a one-day time period; Otherwise set the degradation to zero
  5. Determine the day of year when simulation begins
  6. Calculate the initial depth of solute in mm
  7. Calculate the number of days between the beginning of simulation and the day the chemical is applied
  8. Calculate the maximum time and depth requested as output
  9. If actual irrigation is to be used, read the irrigation amount - time data into memory
  10. For each day to be simulated do the following:
    1. Determine if critical depth and time have been passed. If so, terminate simulation
    2. Determine irrigation for this day
    3. Update soil layers for ET on this day
    4. If infiltration is estimated from rainfall, calculate rainfall infiltration using SCS curve number
    5. Calculate total infiltration for this day as sum of rainfall infiltration and irrigation
    6. If the current day is before the day when the chemical was applied, replenish water in the soil with infiltrating water on this day, layer by layer from the top until all the water has been stored or passed through the profile;Otherwise
      1. Update water content of soil layers for infiltration on this day. Replenish soil water layer by layer from the top until all infiltrating water is stored or layers above the current depth of the chemical are refilled.
      2. While infiltrating water has not all been stored in the profile, do the following:
        1. Calculate the amount of water needed to move the chemical to the bottom of the next soil layer.
        2. If water available to move the chemical is sufficient to move the chemical to the bottom of the next soil layer
          1. Update water content in next soil layer and calculate excess water leaving that layer
          2. Update depth of chemical to the bottom of the next soil layer and calculate the amount of water still available to move the chemical
        3. Otherwise
          1. Calculate the new depth of the chemical within this next layer
          2. Update the water content in this layer and calculate excess water entering the next layer
          3. Recharge the layers below the new chemical depth until excess infiltrating water is stored or passes through the profile.
      3. If amount is to be calculated, calculate amount remaining on this day
      4. Save output information of interest
  11. Free memory allocated for actual irrigation
  12. End movement procedure

Document Actions