diff --git a/doc/release_notes.rst b/doc/release_notes.rst index dcd165bd..aa05eda8 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -9,6 +9,7 @@ Upcoming Version * Improved constraint equality check in `linopy.testing.assert_conequal` to less strict optionally * Minor bugfix for multiplying variables with numpy type constants * Harmonize dtypes before concatenation in lp file writing to avoid dtype mismatch errors. This error occurred when creating and storing models in netcdf format using windows machines and loading and solving them on linux machines. +* Fix expression merge to explicitly use outer join when combining expressions with disjoint coordinates for consistent behavior across xarray versions Version 0.5.6 -------------- diff --git a/linopy/expressions.py b/linopy/expressions.py index 1078a080..cff9b0cd 100644 --- a/linopy/expressions.py +++ b/linopy/expressions.py @@ -1999,6 +1999,8 @@ def merge( if override: kwargs["join"] = "override" + else: + kwargs.setdefault("join", "outer") if dim == TERM_DIM: ds = xr.concat([d[["coeffs", "vars"]] for d in data], dim, **kwargs)