Cropbox
Cropbox is a framework for building and running crop models in Julia. Describe the variables and equations; Cropbox connects their dependencies, advances the model, and collects its output.
Start here
After installing Cropbox, choose a starting point:
- Build a logistic growth model. Write the growth equation, run it, and compare three growth rates in one figure.
- Run the garlic model. Start with a packaged cultivar and weather record. Run one growing season and see how dry mass changes in the leaves and bulb without writing any model equations.
A model in a few lines
A small growth model can be simulated and plotted in one call:
using Cropbox
@system LogisticGrowth(Controller) begin
r: growth_rate => 0.05 ~ preserve(parameter, u"d^-1")
Wf: final_biomass => 300 ~ preserve(parameter, u"g")
W0: initial_biomass => 0.25 ~ preserve(parameter, u"g")
W(W, r, Wf): biomass => r * W * (1 - W / Wf) ~ accumulate(init = W0, u"g")
end
visualize(LogisticGrowth, :time, :W; stop = 200u"d", xunit = u"d", kind = :line)Biomass starts small, grows more quickly, and approaches its final size. The same specification → simulation → visualization and evaluation workflow also applies to leaf gas exchange, whole-plant growth, soil water, and root architecture.
Here to look something up? The Reference covers syntax, arguments, examples, and results. Models and Resources links to published models, papers, and workshops.
Citation
When using Cropbox in your work, please cite the following paper:
Yun K, Kim S-H (2023) “Cropbox: a declarative crop modelling framework.” in silico Plants 5(1), diac021. doi:10.1093/insilicoplants/diac021
@article{Cropbox2023,
title = {Cropbox: a declarative crop modelling framework},
author = {Yun, Kyungdahm and Kim, Soo-Hyung},
journal = {in silico Plants},
volume = {5},
number = {1},
year = {2023},
doi = {10.1093/insilicoplants/diac021}
}The repository also keeps this entry in CITATION.bib.