pypam.utils.merge_ds

pypam.utils.merge_ds(ds, new_ds, attrs_to_vars)[source]

Merges de new_ds into the ds, the attributes that are file depending are converted to another coordinate depending on datetime.

Parameters:
ds: xarray Dataset

Already existing dataset

new_dsxarray Dataset

New dataset to merge

attrs_to_vars: list or None

List of all the attributes to convert to coordinates (not dimensions)

Returns:
dsmerged dataset