Skip to main content

Crop-Water Quota Irrigation Model - ABM for Yellow River water allocation

Project description

CWatQIM: Crop-Water Quota Irrigation Model

Release DOI License: MIT CoMSES Python 3.11

An agent-based model (ABM) for simulating water quota allocation and irrigation decisions in China's Yellow River Basin.

Overview

CWatQIM (Crop-Water Quota Irrigation Model) is a agent-based model that simulates the coupled human-water system in the Yellow River Basin. The model investigates how water quota institutions shape irrigation water withdrawal decisions and their system-wide consequences, focusing on the mechanisms through which administrative water quotas influence water source composition (surface water versus groundwater), irrigation efficiency, and crop productivity.

Key Features

  • Multi-scale agents: Province-level and prefecture-level (city) agents representing water management agencies
  • Crop modeling integration: Built-in integration with AquaCrop for crop yield simulation
  • Social learning mechanisms: Implements Standing strategy (evolutionary game theory) for behavioral adaptation
  • Policy analysis: Enables counterfactual analysis to assess policy effects under different enforcement regimes

Installation

From GitHub (Recommended)

Clone the repository to get the full model with configurations:

git clone https://github.com/SongshGeoLab/CWatQIM.git
cd CWatQIM
pip install -e .

From PyPI

pip install cwatqim

Publication

This model is published on:

  • Zenodo: [DOI link will be added after first release]
  • CoMSES Net: [Link will be added after submission]

For citation and archival purposes, please use the Zenodo DOI.

Quick Start

After cloning the repository, run the model from the repository root:

# Run with default configuration
python -m cwatqim

# Override configuration parameters
python -m cwatqim exp.repeats=5 exp.num_process=4

# Use a different dataset configuration
python -m cwatqim ds=mac

Using Python API

from cwatqim import CWatQIModel
from hydra import compose, initialize

# Initialize configuration (from config/ directory in repository)
with initialize(config_path="config", version_base=None):
    cfg = compose(config_name="config")

    # Create and run model
    model = CWatQIModel(parameters=cfg)
    model.setup()

    # Run simulation
    for _ in range(10):
        model.step()

    model.end()

Configuration

The repository includes Hydra configurations in the config/ directory:

  • config/config.yaml: Main configuration with model parameters
  • config/ds/default.yaml: Default dataset paths (uses relative paths)
  • config/ds/mac.yaml: macOS-specific paths (for local development)
  • config/exp/test.yaml: Test experiment configuration
  • config/exp/exp.yaml: Full experiment configuration

You can override any configuration parameter via command line arguments or create your own configuration files.

Model Components

Agents

  • Province: Province-level agents managing water quota allocation
  • City: Prefecture-level agents making irrigation water withdrawal decisions
  • Farmer: Individual farmer agents (optional, for future extensions)

Core Modules

  • CWatQIModel: Main model class orchestrating the simulation
  • Algorithms: Optimization algorithms for water source portfolio decisions
  • Data Loaders: Utilities for loading climate, quota, and agricultural data
  • Payoff: Economic and social payoff calculations

Documentation

Requirements

Citation

If you use this model in your research, please cite:

@software{cwatqim2026,
  title = {CWatQIM: Crop-Water Quota Irrigation Model},
  author = {Song, Shuang},
  year = {2026},
  url = {https://github.com/SongshGeoLab/CWatQIM},
  doi = {10.5281/zenodo.XXXXXXX}
}

Note: Please replace XXXXXXX with the actual Zenodo DOI after the first release.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Supported by National Natural Science Foundation of China (No. 42041007, No. U2243601)
  • Built on the ABSESpy framework
  • Integrates with AquaCrop for crop modeling

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cwatqim-0.1.1.tar.gz (50.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cwatqim-0.1.1-py3-none-any.whl (53.6 kB view details)

Uploaded Python 3

File details

Details for the file cwatqim-0.1.1.tar.gz.

File metadata

  • Download URL: cwatqim-0.1.1.tar.gz
  • Upload date:
  • Size: 50.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for cwatqim-0.1.1.tar.gz
Algorithm Hash digest
SHA256 85b942d9c1f43be5fa1cb0ba96dae82383e089ff25cc42a02e5003de6b15820c
MD5 c1a867f2dfd1cbae8405479acd417ac3
BLAKE2b-256 8c766a37787e3a9d88b59b74d476f325f387ec981e8571e1f8a71355690fd532

See more details on using hashes here.

File details

Details for the file cwatqim-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cwatqim-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 53.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for cwatqim-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98e8fe1ba2daeb6a6d028c1874a70e05dbb1bb436bbf3c0854037a8d9973f04b
MD5 6cfa44111bfd25f448ddb06ae2c0c353
BLAKE2b-256 99d28019cc7d3c2e6a48b0b46f78d852480d4ab6dbe5ee79fef5226439015485

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page