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.
- 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 operatedrun_lpjml()
▶submit_lpjml()
🚀 with written configuration files
LPJmLCoupler
class to initiate bi-directional, annual coupling to LPJmL- 📥 Read output data (annual) from LPJmL
- 📤 Send input data (annual) to LPJmL
- xarray-based data classes
- Read LPJmL netCDF files 🗺 as
LPJmLData
orLPJmLDataSet
objects LPJmLMetaData
for reading and handling LPJmL meta files or header data
Use the package manager pip to install pycoupler.
pip install .
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).
See scripts for examples on how to use the package.
In case of questions please contact Jannes Breier [email protected] or open an issue.
Merge requests are welcome, see CONTRIBUTING.md. For major changes, please open an issue first to discuss what you would like to change.