diff --git a/.flake8 b/.flake8 index 0f2c19d..0b1e0fd 100644 --- a/.flake8 +++ b/.flake8 @@ -1,4 +1,7 @@ [flake8] max-line-length = 88 -extend-exclude = pycoupler/_version.py -ignore = F841,F541,W503,E226 \ No newline at end of file +extend-exclude = + pycoupler/_version.py + .venv + build +ignore = F841,F541,W503,E226,E501,E266 \ No newline at end of file diff --git a/CITATION.cff b/CITATION.cff index 717cc8c..baa6a3b 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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. @@ -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 diff --git a/pycoupler/data.py b/pycoupler/data.py index f7aad26..786399f 100644 --- a/pycoupler/data.py +++ b/pycoupler/data.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 57fe1d8..7ebe5a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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]