Skip to content
Open
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
12 changes: 10 additions & 2 deletions echopype/convert/set_groups_ek60.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,12 @@ def set_platform(self) -> xr.Dataset:
)

# Merge with NMEA data
ds = xr.merge([ds, ds_plat], combine_attrs="override")
ds = xr.merge(
[ds, ds_plat],
compat="no_conflicts",
join="outer",
combine_attrs="override",
)
ds = ds.assign_attrs(platform_dict)

# If `.IDX` file exists and `.IDX` data is parsed
Expand Down Expand Up @@ -707,7 +712,10 @@ def set_beam(self) -> List[xr.Dataset]:

# Merge data from all channels
ds = xr.merge(
[ds, xr.concat(ds_backscatter, dim="channel")], combine_attrs="override"
[ds, xr.concat(ds_backscatter, dim="channel", join="outer")],
compat="no_conflicts",
join="outer",
combine_attrs="override",
) # override keeps the Dataset attributes

# Manipulate some Dataset dimensions to adhere to convention
Expand Down
20 changes: 14 additions & 6 deletions echopype/convert/set_groups_ek80.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ def _add_freq_start_end_ds(self, ds_tmp: xr.Dataset, ch: str) -> xr.Dataset:
)

ds_tmp = xr.merge(
[ds_tmp, ds_f_start_end], combine_attrs="override"
[ds_tmp, ds_f_start_end], compat="no_conflicts", join="outer", combine_attrs="override"
) # override keeps the Dataset attributes

return ds_tmp
Expand Down Expand Up @@ -1068,8 +1068,11 @@ def merge_save(ds_combine: List[xr.Dataset], ds_invariant: xr.Dataset) -> xr.Dat
ds_combine = xr.concat(ds_combine, dim="channel", join="outer")

ds_combine = xr.merge(
[ds_invariant, ds_combine], combine_attrs="override", join="outer"
) # override keeps the Dataset attributes
[ds_invariant, ds_combine],
compat="no_conflicts",
join="outer",
combine_attrs="override",
)
return set_time_encodings(ds_combine)

def _attach_vars_to_ds_data(self, ds_data: xr.Dataset, ch: str, rs_size: int) -> xr.Dataset:
Expand All @@ -1093,7 +1096,12 @@ def _attach_vars_to_ds_data(self, ds_data: xr.Dataset, ch: str, rs_size: int) ->

ds_common = self._assemble_ds_common(ch, rs_size)

ds_data = xr.merge([ds_data, ds_common], combine_attrs="override")
ds_data = xr.merge(
[ds_data, ds_common],
compat="no_conflicts",
join="outer",
combine_attrs="override",
)

# Attach channel dimension/coordinate
ds_data = ds_data.expand_dims(
Expand Down Expand Up @@ -1342,7 +1350,7 @@ def set_vendor(self) -> xr.Dataset:
"long_name"
] = "ID of channels containing broadband calibration information"
ds_cal.append(ds_ch)
ds_cal = xr.merge(ds_cal, join="outer")
ds_cal = xr.merge(ds_cal, compat="no_conflicts", join="outer")

if "impedance" in ds_cal:
ds_cal = ds_cal.rename_vars({"impedance": "impedance_transducer"})
Expand Down Expand Up @@ -1374,7 +1382,7 @@ def set_vendor(self) -> xr.Dataset:
coeffs_and_decimation[param][DECIMATION].append(val_deci)

# Assemble everything into a Dataset
ds = xr.merge([ds_table, ds_cal])
ds = xr.merge([ds_table, ds_cal], compat="no_conflicts", join="outer")

# Add the coeffs and decimation
ds = ds.pipe(self._add_filter_params, coeffs_and_decimation)
Expand Down
Loading