apsimNGpy: The Next-Generation Agro-ecosystem Simulation Library

License: Apache-2.0 Documentation PyPI version Total PyPI downloads Join Discussions Ask Teams APSIM Next Generation version

Introduction

apsimNGpy is a cutting-edge, open-source Python framework designed for advanced modeling with APSIM process-based model. Built on object-oriented principles. apsimNGpy extends and augments APSIM Next Generation functionalities within the Python scientific ecosystem, turning GUI-centric workflows into scriptable, reproducible, and scalable pipelines. apsimNGpy functionalities include, but not limited to the following:

Scalable performance. Run large experiment sets efficiently via multiprocessing/multithreading (e.g., factorials, ensembles, calibrations) using a clean, high-level API.

Spatial & data integration. Leverage Python’s geospatial stack and built-in helpers to fetch and manage soil/weather inputs, enabling landscape-scale analyses.

Optimization & calibration. Access multi-objective optimization and sensitivity analysis to quantify trade-offs (e.g., yield vs. nitrate loss/GHG) and calibrate parameters.

Reproducible automation. Run APSIM using Jupyter/CLI/scripts; outputs land in pandas DataFrames for downstream analysis, plotting, and reporting.

Full model manipulation. A modular, object-oriented design supports inspection, editing, experiments, and custom reports without manual GUI interface.

Version resilience. rather than tying apsimNGpy to a fixed APSIM version, apsimNGpy is developed with forward- and backward-compatibility in mind and is actively synchronized with upstream APSIM.

Open and extensible. Apache-2.0 licensing, clear abstractions, and a plug-friendly architecture make it easy to extend and integrate into existing research pipelines.

Diverse model evaluation metrics. Built-in model prediction evaluation metrics: RMSE, RRMSE, Willmott’s Index of Agreement (WIA), Bias, MAE, Lin’s CCC, and R2

Discussion and Community Support

Users who wish to ask questions, report issues, request new features, or engage in general discussion about apsimNGpy are encouraged to visit the project’s official GitHub Discussions page.

This forum serves as the preferred place for:

  • Troubleshooting and “how-to” questions

  • Sharing workflows or examples

  • Feature proposals and use-case discussions

  • Clarification on model editing, optimization, and calibration

  • Community-driven enhancements

  • Collaboration with other APSIM users

If your question is not answered in the documentation, feel free to start a new discussion thread and tag it appropriately.

For reporting reproducible bugs or contributing code, please use the GitHub Issues tracker.

Table of Contents