apsimNGpy: A comprehensive Python framework for interactive, reproducible, and scalable simulations of the APSIM Next Generation model
• apsimNGpy is a Pythonic object-oriented implementation of the APSIM model • Integrates seamlessly with Python data analysis and visualization tools • Supports parallel processing for fast computation and scaling up spatial simulations • Unlimited optimization algorithms for parameter estimation and trade-off analysis We present apsimNGpy, an open-source Python Application Programming Interface (API) for the Agricultural Production Systems sIMulator (APSIM) Next Generation (NG) process-based agroecosystem model. Specifically, the package provides a comprehensive Python API that extends and augments APSIM NG functionalities by integrating it with Python’s scientific computing libraries to facilitate integration of soil and climate data and support spatially explicit simulations over broad spatial extents. apsimNGpy speeds up computations through multiprocessing and multithreading, and provides a flexible, modular, and object-oriented framework that allows for customization with minimal code configuration. It furthermore provides a comprehensive suite of optimization algorithms for examining trade-offs between agricultural production and environmental outcomes, as well as for calibrating model parameters to enhance predictive performance. By embedding APSIM NG into the Python environment, apsimNGpy facilitates reproducible, scalable, and automatable research workflows for assessing agricultural best management practices and yield forecasting. In doing so, apsimNGpy expands the potential user base and application of the APSIM agroecosystem model, empowering users to test and extend the model to a wider range of research and application contexts.
Authors
- Richard Magala (ORCID: https://orcid.org/0000-0002-6642-598X)
- Lisa A. Schulte (ORCID: https://orcid.org/0000-0003-4433-5008)
Institutions
- Iowa State University (US)
Publication Details
- Journal
- SoftwareX
- Published
- 2026-01-13
- DOI
- https://doi.org/10.1016/j.softx.2025.102496
- Primary Topic
- Climate change impacts on agriculture
- Type
- article
- Field-Weighted Citation Impact
- 0.00