Simulation of Agricultural Production and Climate Change

Jump to: navigation, search

Title: Simulation of Agricultural Production and Climate Change

Author: Josef Vyskočil

Method: Agent-based model

Tool: NetLogo

Introduction and problem definition

Climate change poses a critical threat to agriculture, affecting farmers, food security, and economies globally. The Simulation of Agricultural Production and Climate Change (SAPCC) project employs NetLogo for agent-based modeling to address this challenge. Its primary aim is to assist farmers, scientists, and policymakers in understanding and preparing for the impact of climate change on agriculture.

SAPCC focuses on modeling how climate variables, such as temperature, precipitation, and soil conditions, influence crop yields and soil fertility over time. Users can explore various climate scenarios and assess adaptation strategies within the simulation. By analyzing real-world data on crop types, soil conditions, precipitation patterns, temperature fluctuations, and irrigation methods, SAPCC provides insights into how climate changes affect crop cultivation and agriculture's long-term sustainability. This project aims to offer actionable insights for sustainable food production in a changing climate.


This simulation creates a dynamic model reflecting the intricate balance between climate change and agricultural productivity. At its core, the simulation analyzes the interplay between soil fertility, crop yield, and irrigation methods under varying climatic conditions.


Crops: A variety of crops including grains, vegetables, and fruits are modeled to evaluate their growth and yield under different environmental conditions.

Soil Conditions: Soil fertility is a fluctuating factor, influenced by temperature, precipitation, and agricultural practices, represented by a spectrum of values that can be visualized in real-time.

Climate Factors: Both temperature and rainfall are variable factors in the model, changing over time to simulate the effects of climate change.

Irrigation Methods: Several irrigation strategies, from traditional to adaptive techniques, are assessed for their efficiency and impact on soil and crop yield.

Simulation Controls

Temperature: Starting at a base of 9°C, with an increase of 1.5°C per 100 years, alongside a variability factor.

Rainfall: Set at a baseline of 600mm, with a variability of 20mm to simulate precipitation changes.

Soil pH: A crucial factor for crop growth, starting at 6.5 with a variability of 0.2.

Humidity: Set at 75% with a 1% variability to model different levels of atmospheric moisture.


Fields: The core components of this agricultural simulation are the fields, each endowed with distinct characteristics that determine their crop production capacity. These attributes include soil fertility, crop yield, and the type of crop being cultivated. Each field agent serves as a unique microcosm within the simulation, reflecting the diverse conditions and challenges of real-world agriculture.

The update-fields procedure is pivotal in simulating the dynamic nature of soil fertility as it is influenced by climatic conditions and irrigation practices. Within this subroutine, each field agent assesses and adjusts its soil fertility based on a set of environmental factors and agricultural techniques.

 ask fields [
   let temp-effect 0
   let rain-effect 0
   let pH-effect 0
   let humidity-effect 0
   let watering-effect 1
   ifelse watering_method = "no" [
     set watering-effect 0.9 
   ] [
     ifelse watering_method = "adaptive" [
       set watering-effect 1.2 
     ] [
       ifelse watering_method = "floating" [
         set watering-effect 1.1
       ] [
         ifelse watering_method = "drip" [
           set watering-effect 1.15 
         ] [
           if watering_method = "sprinkled" [
             set watering-effect 1 
   if temperature > 30 [
     set temp-effect -5
   if temperature < 30 [
     set temp-effect 0.1
   if rainfall > 800 [
     set rain-effect -10 
   if rainfall < 800 [
     set rain-effect 0.1
   if pH > 8 or pH < 5 [
     set pH-effect -10 
   if humidity < 30 or humidity > 85 [
     set humidity-effect -5 
   let total-effect (temp-effect + rain-effect + pH-effect + humidity-effect) * (watering-effect * 2)
   set soil-fertility soil-fertility + total-effect
   if soil-fertility < 0 [ set soil-fertility 0 ]
   if soil-fertility > 100 [ set soil-fertility 100 ]
   set pcolor scale-color green soil-fertility 0 100

Possible future improvements

Refinement of Variability Parameters: A significant enhancement to the simulation would be the bifurcation of variability parameters into 'upward' and 'downward' components. This would allow for more nuanced modeling of climate impacts, reflecting the asymmetrical nature of environmental changes. For example, temperature increases may have a different rate of change compared to temperature decreases due to phenomena such as global warming.

Predefined Fertility and Yield Settings: To reduce randomness and improve predictability, establishing preset values for soil fertility and crop yield could be considered. These presets would be based on historical data and agronomic studies, ensuring that each type of crop begins the simulation with realistic and research-based conditions that more accurately reflect their natural growth patterns.

Detailed Crop-Specific Soil Impact: Delving deeper into agronomic science, the simulation could benefit from detailing the precise effects of different crop types on soil conditions. Each plant species could have tailor-made parameters that affect soil fertility, moisture retention, pH changes, and nutrient uptake. This would mimic real-life agricultural systems where crop rotation and plant diversity have significant and varying impacts on soil health.

Reduction of Randomness: By leveraging actual climate forecasts and agricultural data, the simulation can reduce the reliance on random factors when modeling environmental conditions. Introducing algorithms that utilize predictive modeling based on real-world trends could offer a more accurate representation of future scenarios, allowing users to test agricultural strategies against potential climate developments.

Integration of Actual Climate Estimates: Incorporating climate models and forecasts into the simulation parameters could provide a more realistic assessment of long-term agricultural prospects. This could include the use of predictive analytics to simulate future climate scenarios, offering a powerful tool for strategic planning in agriculture and policy-making.

These improvements aim to transform the simulation into a more robust tool, capable of providing actionable insights and aiding in the development of resilient, forward-looking agricultural practices in the face of global climate change.


The simulation's architecture, designed to mimic the complexities of agricultural ecosystems under the influence of climate variability, allows for the extrapolation of critical insights into the potential futures of crop production. The outcomes hinge on the initial conditions set by the user, reflecting the sensitive balance of agricultural systems to environmental factors.

Impact of Parameter Adjustments: A nuanced feature of the model is its sensitivity to parameter adjustments. Small changes in soil fertility or climate variables can cascade into significant differences in yield outcomes. This sensitivity highlights the importance of precision in agricultural management and the potential consequences of climate change.

Slow Simulation for Strategic Planning: Running the simulation at a slower pace provides the user with the opportunity to observe the incremental effects of their adjustments. This deliberate pacing is beneficial for educational purposes, allowing users to understand the cause-and-effect relationships between various factors and crop yields.

Observation and Adaptation: As the simulation progresses, users can observe the unfolding impacts of their decisions and the evolving climate conditions. This offers a powerful opportunity to test different adaptation strategies in real-time, such as altering irrigation methods or switching crop types, to counteract adverse climate impacts.

Insightful Findings and Images: The simulation generates a range of outputs that illustrate the intricate dynamics of agricultural production. Images captured from various simulation states can serve as compelling evidence of the model's capabilities and the scenarios it can depict, offering a visual representation of data that can be used for analysis or presentation.

Beyond the Simulation: While the simulation provides valuable foresight into potential agricultural outcomes, its true utility lies in its adaptability and the scope for further refinement. Enhancements like integrating more detailed crop models or advanced climate algorithms could transform it into an even more sophisticated tool. Such improvements would increase its applicability to real-world farming and policy planning, making it an indispensable asset in the quest for sustainable agriculture in an era of climate change.

In conclusion, the simulation serves as a provocative tool that not only forecasts potential futures but also provides a platform for testing and developing adaptive agricultural strategies. It underscores the need for agility in agricultural planning and the importance of considering a range of possible future scenarios in the face of climate uncertainty.

Nejlepší scénář.png
Pokles výnosnosti.png
Pokles fertility.png

NetLogo File