Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[flake8]
max-line-length = 88
extend-exclude = pycoupler/_version.py
ignore = F841,F541,W503,E226
extend-exclude =
pycoupler/_version.py
.venv
build
ignore = F841,F541,W503,E226,E501,E266
6 changes: 5 additions & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'pycoupler: dynamic model coupling of LPJmL'
version: 1.6.5
version: 1.7.0
date-released: '2025-09-22'
abstract: An LPJmL-Python interface for operating LPJmL in a Python environment
and coupling it with Python models, programmes or simple programming scripts.
Expand All @@ -21,6 +21,10 @@ authors:
given-names: Werner
email: bloh@pik-potsdam.de
orcid: 0000-0002-7399-2704
- family-names: Sieben
given-names: Lorenz
email: sieben@gea.mpg.de
orcid: 0009-0006-5307-9391

license: AGPL-3.0
repository-code: https://github.com/PIK-LPJmL/pycoupler
Expand Down
5 changes: 3 additions & 2 deletions pycoupler/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,10 @@ def read_data(file_name, var_name=None, multiple_bands=False):

if var_name:
data = data[var_name]
data = LPJmLData(data)
data = LPJmLData(data, attrs=data.attrs, coords=data.coords)
else:
data = LPJmLDataSet(data)
# Copying needs to be explicit in xarray: https://github.com/pydata/xarray/issues/11095
data = LPJmLDataSet(data.data_vars, attrs=data.attrs, coords=data.coords)

return data

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ addopts = "--strict-markers"
[tool.black]
line-length = 88
target-version = ['py37', 'py38', 'py39', 'py310']
exclude = "pycoupler/_version.py"
extend-exclude = "pycoupler/_version.py"


# [project.scripts]
Expand Down
Loading