Skip to main content

pycoupler: dynamic model coupling of LPJmL

DOI CI codecov PyPI version

An LPJmL-Python interface for operating LPJmL in a Python environment and coupling it with Python models, programmes or simple programming scripts. pycoupler was written to establish a coupled World-Earth modeling framework, copan:LPJmL, based on copan:CORE and LPJmL. Coupling with LPJmL is possible on an annual basis, i.e. for each year in which LPJmL is in coupling mode, the desired inputs must be passed via pycoupler. LPJmL simulates the corresponding year and returns the desired outputs at the end of the year. The coupled programme can use the output data to generate new inputs for the next year.

Overview

LPJmL Config ⚙ for handling LPJmL configurations

  • Read & write ✍ LPJmL configuration files as LPJmLConfig objects
  • Set options & parameters for spinup, transient and coupled simulations
  • regrid() 🌐 LPJmL output data for country-specific simulations
  • LPJmL can be checked check_lpjml() 🔍 and operated run_lpjml() ▶ submit_lpjml() 🚀 with written configuration files

LPJmL Coupler 🔌 to couple LPJmL with other models

  • LPJmLCoupler class to initiate bi-directional, annual coupling to LPJmL
  • 📥 Read output data (annual) from LPJmL
  • 📤 Send input data (annual) to LPJmL

LPJmL Data 💾 for reading and processing LPJmL data

  • xarray-based data classes
  • Read LPJmL netCDF files 🗺 as LPJmLData or LPJmLDataSetobjects
  • LPJmLMetaData for reading and handling LPJmL meta files or header data

Installation

pip install pycoupler

Prerequisites

Please clone and compile LPJmL in advance.
Make sure to also have set the working environment for LPJmL correctly if you are not working on the PIK HPC (with Slurm Workload Manager).

Questions / Problems

In case of questions please contact Jannes Breier jannesbr@pik-potsdam.de or open an issue.

Contributing

Merge requests are welcome, see CONTRIBUTING.md. For major changes, please open an issue first to discuss what you would like to change.

Metadata

Release files for pycoupler 1.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycoupler 1.7.0
File Size Uploaded
pycoupler-1.7.0.tar.gz 405.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pycoupler 1.7.0
File Interpreter ABI Platform
pycoupler-1.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 473.7 kB

Release files / pycoupler-1.7.0.tar.gz

Download URL pycoupler-1.7.0.tar.gz
Size 405.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d00f8b2c5d4edb0a107d750365d67aa02fec22ed72baf68bb2ac3086b069b174
BLAKE2b-256 checksum
How to use checksums
733f226818b89582f689d6cb798e4c10a65fc8530183aca5deebbd4878d30c7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / pycoupler-1.7.0-py3-none-any.whl

Download URL pycoupler-1.7.0-py3-none-any.whl
Size 68.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
348e2a28d6344655e17ba0559c3ece97b78e0bba878f18d5afc5da1da8567105
BLAKE2b-256 checksum
How to use checksums
cc14eb9009b192db92a27a6ec3fb48ca6005f5fbd2c4e3063d4e72a0bac4a5d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page