Learn R Programming

DSSAT

The purpose of this package is to provide a comprehensive R interface to the Decision Support System for Agrotechnology Transfer Cropping Systems Model (DSSAT-CSM). The package provides cross-platform functions to:

Implemented

  • Read input files:
    • File X
    • File T
    • File A
    • Crop parameter files (*.CUL,*.ECO)
    • Soil input files (*.SOL)
    • Weather input files (*.WTH)
    • Pest input files (*.PST)
    • DSSAT Batch file (DSSBatch.V*)
  • Write input files:
    • File X
    • File T
    • File A
    • Weather input files (*.WTH)
    • Soil input files (*.SOL)
    • DSSAT Batch file (DSSBatch.V*)
  • Run DSSAT-CSM in the following modes:
    • Batch
  • Read output files:
    • Daily
    • Seasonal

Awaiting implementation

  • Read input files:
    • Crop parameter files (*.SPE)
  • Write input files:
    • Pest input files (*.PST)
    • Crop parameter files (*.SPE)
  • Run DSSAT-CSM in the following modes:
    • Seasonal
    • Sequence

Copy Link

Version

Install

install.packages('DSSAT')

Monthly Downloads

315

Version

0.0.9

License

GPL (>= 3)

Maintainer

Phillip Alderman

Last Published

February 19th, 2024

Functions in DSSAT (0.0.9)

read_filea

Reads data from a single DSSAT file A
read_pest

Reads input data from a single DSSAT pest file (*.PST)
read_filex_multiple

Read multiple File X
run_dssat

Writes data from a single DSSAT data tier
splice_in_col_name

Splice column name into vector of column names
write_cul

Reads parameters from a single DSSAT cultivar parameter file (*.CUL)
write_tier

Writes data from a single DSSAT data tier
read_wth

Reads weather input data from a single DSSAT weather file (*.WTH)
write_sol

Writes soil parameters to a single DSSAT soil parameter file (*.SOL)
read_tier_data

Reads data from a single tier of a DSSAT output file
write_filet

Writes data to a single DSSAT file T
write_casupro_eco

Writes parameters to a single DSSAT CASUPRO ecotype parameter file (*.ECO)
read_sol

Reads soil parameters from a single DSSAT soil parameter file (*.SOL)
read_soil_profile

Reads a single DSSAT formatted soil profile from a raw character vector
read_dssbatch

Reads data from a single DSSAT batch file
read_tier

Reads and combines data and header information from a single tier of a DSSAT output file
read_output

Reads data from a single DSSAT output file
write_filex

Writes data to a single DSSAT FileX
write_dssbatch.default

Default method for write_dssbatch()
write_dssbatch.tbl_df

tbl_df method for write_dssbatch()
write_dssbatch.data.frame

tbl_df method for write_dssbatch()
write_eco

Reads parameters from a single DSSAT ecotype parameter file (*.ECO)
write_wth

Writes data to a single DSSAT weather file
write_filea

Writes data to a single DSSAT file A
write_dssbatch

Constructs and writes a DSSAT simulation batch file
header_to_fwf_position

Converts header line into a vector of column names
mutate_cond

Convenience function that allows mutating a subset of rows
as_DSSAT_tbl

Convert tibble to DSSAT_tbl
calc_TAV

Calculate long-term temperature average (TAV)
add_v_fmt

Adds variable format information to a tibble
calc_AMP

Calculate long-term temperature amplitude (AMP)
clear_output

Clear output files
read_filet

Reads time series data from a single DSSAT file T
read_eco

Reads parameters from a single DSSAT ecotype parameter file (*.ECO)
read_filex

Reads input data from a single DSSAT experiment file (*.*X)
read_cul

Reads parameters from a single DSSAT cultivar parameter file (*.CUL)
read_dssat

Reads data from a single DSSAT file
add_col_widths

Adds width as a attribute to each column from a list of tibbles
convert_to_date

Converts a column to POSIXct
combine_tiers

Efficiently combine data from two data tiers into one
read_casupro_eco

Reads parameters from a single DSSAT CASUPRO ecotype parameter file (*.ECO)
name_to_regex

Convert column names to a regex
process_dssat_output_header

Extracts run number, model code, experiment code, treatment number and data headline from DSSAT output header