Skip to content
forked from pydata/xarray

Commit

Permalink
Update concat.py (pydata#8538)
Browse files Browse the repository at this point in the history
  • Loading branch information
Illviljan authored Dec 13, 2023
1 parent 0bf38c2 commit c53c400
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xarray/core/concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,10 @@ def _dataset_concat(
result_encoding = datasets[0].encoding

# check that global attributes are fixed across all datasets if necessary
for ds in datasets[1:]:
if compat == "identical" and not utils.dict_equiv(ds.attrs, result_attrs):
raise ValueError("Dataset global attributes not equal.")
if compat == "identical":
for ds in datasets[1:]:
if not utils.dict_equiv(ds.attrs, result_attrs):
raise ValueError("Dataset global attributes not equal.")

# we've already verified everything is consistent; now, calculate
# shared dimension sizes so we can expand the necessary variables
Expand Down

0 comments on commit c53c400

Please sign in to comment.