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.3.tar.gz (50.2 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.3-py3-none-any.whl (53.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cwatqim-0.1.3.tar.gz
  • Upload date:
  • Size: 50.2 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.3.tar.gz
Algorithm Hash digest
SHA256 4842fb8e68c1d6b91518e203bab00c47ebec2d07da9b96a72fd7e203aaadea2f
MD5 0b781664ccfa6749180ab6e8e8b85ead
BLAKE2b-256 1dd6a0008e26d076fa109b0ce847aabf809fe318539c059cacb77c8187143211

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cwatqim-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f5fb9d5e318c620d73bd953b14950441b092c2c042669ec57a4955581849e89b
MD5 b5eeddeb022e27b4ed2c56f2d24704b2
BLAKE2b-256 05ca084fbe96b0d1ff3b12f66a7318cd1c4672c31bb5daf935f11e3aa1d3d033

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