Skip to main content

traDSSAT

TraDSSAT is a library to easily read and write DSSAT input and output files.

Status

Client Python codecov Documentation Status

Installation

poetry add tradssat or pip install tradssat

Full docs

Read the full thing here.

Citation

If you use traDSSAT, please consider citing this repository until we write a real publication about traDSSAT.

Quick examples

Parse and edit any DSSAT file directly:

from tradssat import SoilFile, WTHFile, ExpFile, set_dssat_dir
from tradssat import GeneticMgr, CULFile, ECOFile

# Read, edit and write soil files
soil = SoilFile('path/to/my/file.SOL')

# Read and write weather files as well
wth = WTHFile('path/to/my/WTHR0001.WTH')

# ...and experiment files!
exp = ExpFile('path/to/my/experiment.EXP')


# Access genetic coefficients by cultivar file or ecotype file
cul = CULFile('path/to/my/MZIXM.CUL')
eco = ECOFile('path/to/my/MZIXM.ECO')

cul.get_value('P1')  # returns array of all varieties' P1
eco.get_value('TOPT')  # returns array of all ecotypes' TOPT

# ...or automagically!
set_dssat_dir('C:/DSSAT47')
gen = GeneticMgr(crop='MZIXM', cult='PC0001')
gen.get_value('P1')  # Returns P1 for MZIXM cultivar PC0001
gen.get_value('TOPT')  # Returns ecotype variable TOPT for cultivar PC0001

Read, edit and write experiments, with automatic access to referenced external soil, genetic and weather files:

from tradssat import DSSATRun

run = DSSATRun('path/to/my/experiment.EXP')
run.get_trt_val('INGENO', trt=1)  # Get cultivar for treatment 1
run.set_trt_factor_level(trt=1, factor='CULTIVARS', level=2)  # Change level of treatment factor
run.set_factor_level_val('INGENO', 'IB0067', level=1)  # Change value of a factor level (in this case cultivar type)

Access output from a run:

from tradssat import DSSATResults

out = DSSATResults('path/to/my/output/dir')
out.get_value('FWAD', trt=1)

# Get results at specific time (day of year, days after planting or days after start)
out.get_value('FWAD', trt=1, t=13, at='DAS')  # Get result at 13 days after start
out.get_value('FWAD', trt=1, t=13, at='DAP')  # Get result at 13 days after planting
out.get_value('FWAD', trt=1, t='1989 123', at='DOY')  # Get result at 123th day of year 1989

Contributing

Don't forget to add your name to the authors list in the docs/source/acknow.rst file!

Licensing

MIT License

Metadata

Release files for tradssat 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tradssat 0.1.10
File Size Uploaded Provenance
tradssat-0.1.10.tar.gz 4.2 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tradssat 0.1.10
File Interpreter ABI Platform
tradssat-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 4.3 MB

Release files / tradssat-0.1.10.tar.gz

Download URL tradssat-0.1.10.tar.gz
Size 4.2 MB
Tags Source
SHA-256 checksum
How to use checksums
56b9ca49e591029699fc6db4337fbcbe70f66ebe3dc8c5d59d51452badde6cd3
BLAKE2b-256 checksum
How to use checksums
73a431075903db40fa34044e74654ff336820e716d36da82adde7205e7da58f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.11.2 CPython/3.10.3

Release files / tradssat-0.1.10-py3-none-any.whl

Download URL tradssat-0.1.10-py3-none-any.whl
Size 78.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f9046de3ef2a98e050fe4bedfa773a626b26158b842cad1737161a47407b7e8
BLAKE2b-256 checksum
How to use checksums
d034e6d3331cef112239986daa2b1f066d219ea69995fafbeea6e1b54a0b9695
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.11.2 CPython/3.10.3

Security for tradssat 0.1.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page