Cotton2K is a cotton simulation model specially adapted for irrigated cotton production in arid regions. It was originally written by Prof. Avishalom Marani and distributed under GPL, and rewrite in Rust by Tang Ziya.
These packages are distributed under GPL 3.0 or later. This version has been upgraded to run on modern OS.
I use TOML
as input file format and CSV
as output file format. Documents coming soon.
I wrote a Python version before this. It works, but I have serious performance issues, it toke about 2min one single simulation, compared with 3s in C++ version. I tried to improve, but it is too difficult for me.
I provided Python API via PyO3! see bindings
directory in the root of this repository.
C++ compiler (clang and msvc tested), Rust toolchain (nightly tested), FORTRAN compiler and Meson build.
Additionally, you need to notice that LIBCLANG_PATH
should be satisfied. This dependency will be eventually removed after C++ codes are all refactored into Rust.
cargo build