API reference#

The copan:LPJmL World-Earth Modeling (WEM) framework.

copan:LPJmL Component#

The copan:LPJmL model component offers the integration of the LPJmL model instance with copan:CORE at the model level.

pycopanlpjml.Component([config_file, lpjml, ...])

An LPJmL-integrating mixin model component to build copan:LPJmL models.

Entities#

World and Cell entities to integrate the LPJmL simulation space (World) and the smallest spatial unit (Cell) with the copan:CORE entities.

pycopanlpjml.World(*args, **kwargs)

An LPJmL-integrating world entity.

pycopanlpjml.Cell(*args, **kwargs)

An LPJmL-integrating cell entity.

Data handling#

Data array and meta data formats as well as reading functions to handle LPJmL data.

pycoupler.LPJmLData(*args, **kwargs)

Class for single LPJmL data arrays (input, output, etc.) with meta data and defined dimensions (cell, band, time).

pycoupler.LPJmLDataSet(*args, **kwargs)

Class for LPJmL data sets.

pycoupler.read_data(file_name[, var_name, ...])

Read netcdf file and return data as numpy array or xarray.DataArray.

pycoupler.LPJmLMetaData(meta_dict)

LPJmL meta data class that can be easily accessed, converted to a dictionary or written as a json file.

pycoupler.read_meta(file_name)

Read meta data from json file and return as LPJmLMetaData object.

pycoupler.read_header(filename[, to_dict, ...])

Read header (any version) from LPJmL input/output file

Configure simulations#

Configure LPJmL simulations to run standalone or integrated with copan:CORE.

pycoupler.LpjmlConfig(sub_config)

LPJmL config class for easy access, conversion to a dictionary, or writing as a JSON file.

pycoupler.CoupledConfig(config_dict)

Class to handle coupled model configurations.

pycoupler.read_config(file_name[, ...])

Read LPJmL configuration files and return as LpjmlConfig object or dict.

Run simulations#

Run LPJmL standalone and integrated copan:LPJmL simulations locally or on HPC clusters.

pycoupler.run_lpjml(config_file[, std_to_file])

Run LPJmL using a generated (class LpjmlConfig) config file.

pycoupler.submit_lpjml(config_file[, group, ...])

Submit LPJmL run to Slurm using lpjsubmit and a generated (class LpjmlConfig) config file.

pycoupler.check_lpjml(config_file)

Check if config file is set correctly.