Skip to content

TUM-PIK-ESM/NeuralCrop.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

214 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeuralCrop.jl

🧑‍🌾 💧 ☀️ 🌾 🚀 Fast and flexible Julia framework for hybrid crop modelling across scales.

Docs Status Build Status Creative Commons License DOI

NeuralCrop is a differentiable global gridded crop model (GGCM) that combines the strengths of the state-of-the-art GGCM LPJmL with machine learning approaches. By implementing process-based components in a differentiable form for seamless integration with machine learning methods, NeuralCrop enables end-to-end 'online training', with machine learning components optimized in tandem with the physical model dynamics. NeuralCrop is a flexible Julia framework supporting both purely process-based and hybrid simulations across CPUs and GPUs. More details are available in our preprint paper: https://arxiv.org/abs/2512.20177

Note

NeuralCrop is under further development! Currently, NeuralCrop is unable to perform spin-up simulations to establish equilibrium soil states. The initial conditions for soil carbon, nitrogen, and water are derived from LPJmL.

The documentation is generated with assistance from Codex 🤖.

Installation

NeuralCrop is not yet registered as a Julia package. You can install it directly from the repository via the package manager (type ] in your Julia REPL):

pkg> add https://github.com/yunan-l/NeuralCrop.jl.git

or clone the repository to your machine:

git clone https://github.com/yunan-l/NeuralCrop.jl.git
cd NeuralCrop.jl

Then, in the Julia REPL, activate the project and instantiate the dependencies:

pkg> activate .
pkg> instantiate

This will resolve compatible package versions for your Julia installation. We recommend running NeuralCrop on Julia version 1.10.x.

Example use

NeuralCrop does not provide the climate and management data required to drive the model, as these datasets originate from third-party sources. The necessary input data can be obtained from the ISIMIP data repository (Inter-Sectoral Impact Model Intercomparison Project), and please cite the ISIMIP data appropriately when using it.

For a quick start, we provide a simplified demo in the examples/ directory, including 20-year forcing data (2000-2019) covering 10 grid cells. If a GPU is available and CUDA.jl is installed, we can accelerate the simulation on a GPU 🚀.

Usage

We warmly welcome the use of NeuralCrop.jl for academic research and educational purposes 🎓. You are encouraged to copy, modify, and build upon our code to advance scientific understanding of agricultural systems.

However, please note that this project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license. Any commercial application or redistribution for profit requires explicit prior authorization.

If you are interested in contributing or have any questions, please feel free to contact yunan.lin@tum.de.

Performance benchmarks

We compare the inference time between GPU-accelerated NeuralCrop and CPU-based LPJmL by running them on a $0.5^\circ \times 0.5^\circ$ spatial resolution with daily time steps over a 20-year simulation period (7300 days) at different grid cells. NeuralCrop achieves approximately 100x speedup 🚀🚀🚀.

Acknowledgements

NeuralCrop.jl is a research project developed with the support by the Earth System Modeling group at the Technical University of Munich (TUM) and FutureLab on Artificial Intelligence at the Potsdam Institute for Climate Impact Research (PIK). The author acknowledges funding from the program of the China Scholarship Council (grant agreement no.202303250017) and the Horizon Europe ClimTip project (grant agreement no.101137601).

Citation

If you use NeuralCrop.jl in research or other non-commercial activities 🏄, please mention NeuralCrop.jl and cite our paper:

Lin, Yunan, et al. "NeuralCrop: Combining physics and machine learning for improved crop yield projections." arXiv preprint arXiv:2512.20177 (2025).

The bibtex entry for the paper is:

@article{lin2025neuralcrop,
  title={NeuralCrop: Combining physics and machine learning for improved crop yield projections},
  author={Lin, Yunan and Bathiany, Sebastian and Badri, Maha and Gelbrecht, Maximilian and Hess, Philipp and Groenke, Brian and Heinke, Jens and M{\"u}ller, Christoph and Boers, Niklas},
  journal={arXiv preprint arXiv:2512.20177},
  year={2025}
}

About

A differentiable global gridded crop model combining physics with machine learning.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Julia 100.0%