Change weather data representation
`Weather` is now a type that stores the complete simulation data (previously it just stored the weather data for a single day). Weather data storage is now a struct-of-arrays, previously it was a dict-of-structs. Weather data can be accessed with functions such as `sunshine(weather, date)`. Missing weather input data for temperature (min/max/mean), precipitation, and evapotranspiration is now an error. In the future, missing values could perhaps be imputed. `AgricultureModel` and `Weather` are now defined with `@kwdef`, allowing their constructors to be called with keyword arguments.
Showing
- CHANGELOG.md 16 additions, 0 deletionsCHANGELOG.md
- src/core/simulation.jl 40 additions, 24 deletionssrc/core/simulation.jl
- src/world/weather.jl 121 additions, 70 deletionssrc/world/weather.jl
- test/io_tests.jl 2 additions, 2 deletionstest/io_tests.jl
- test/landscape_tests.jl 1 addition, 1 deletiontest/landscape_tests.jl
- test/runtests.jl 6 additions, 14 deletionstest/runtests.jl
Loading
Please register or sign in to comment