xarray.Dataset.pr.merge#
- Dataset.pr.merge(ds_merge: Dataset, tolerance: float = 0.01, error_on_discrepancy: bool = True, combine_attrs: Literal['drop', 'identical', 'no_conflicts', 'drop_conflicts', 'override'] | Callable[[...], Any] = 'drop_conflicts') Dataset #
Merge two Datasets with a tolerance for discrepancies in values present in both Datasets.
If values from the data to merge are already present in the calling object they are treated as equal if the relative difference is below the tolerance threshold. The result will use the values of the calling object.
- Parameters:
- ds_merge: xr.Dataset
data to merge to the calling object
- tolerance: float (optional), default = 0.01
The tolerance to use when comparing data. Tolerance is relative to values in the calling Dataset. Thus, by default a 1% deviation of values in da_merge from the calling Dataset is tolerated.
- error_on_discrepancy: (optional), default = True
If true throw an exception if false a warning and return values from the calling object in cases of conflict.
- combine_attrs: (optional), default = “drop_conflicts”
Governs how to combine conflicting attrs. Is passed on to the xr merge functions.
- Returns:
- merged
Dataset with data from da_merge merged into the calling object