diff --git a/CHANGELOG.md b/CHANGELOG.md index 3710dc618c5fce5a8a7ce0b3f26c3cb358270efa..c7601682cfe86a9acd633c848ca5a2ddd60a1818 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,12 +23,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.5.3] - unreleased -*Plan: code restructuring to allow multiple crop models (#70)* +**Switchable crop models (#70)** ### Added +- Support for switchable crop models (#70), crop models can be set + with the `cropmodel` setting in the `[crop]` section of + `parameters.toml`. + +- New submodules `ALMaSS` for the ALMaSS crop model, and `SimpleCrop` + for testing switchable crop models. + ### Changed +- All functionality specific to the ALMaSS crop model has been moved + to the submodule `ALMaSS`. + +- Due to switchable crop models, some types are now parametric: + `AgricultureModel{Tcroptype,Tcropstate}` and `FarmPlot{Tcropstate}`. + +- `FarmPlot{Tcropstate}` now only stores basic information about which + pixels are part of the farm plot, all crop-specific information is + now stored in the field `cropstate`. Many functions acting on a + `FarmPlot` now mostly forward to functions of the same name acting + on the `cropstate` field of a `FarmPlot`. + +- The type of `height` in `ALMaSS.CropState` and + `ALMaSS.CropCurveParams` is now a unitful number `::Length{Float64}`. + +- Both crop models `ALMaSS` and `SimpleCrop` now also support the + functions `cropcover` and `cropyield` in addition to `croptype`, + `cropname`, `cropheight`. + +- `cropheight` now returns a unitful number `::Length{Float64}`, and + returns height `0cm` if the landscape at that position is not a + `FarmPlot`. + ### Deprecated ### Removed