Convert a downloaded collection into analysis-ready objects.
Assembler starts from a Result returned by Fetcher.download. By default, it keeps source identity explicit by prefixing variables, coordinates, and dimensions with the configured source name. This avoids collisions when a collection contains several products for the same physical quantity, such as multiple wind sources. Non-native grid policies interpolate NetCDF and GRIB2 sources onto a common overlapping latitude/longitude grid while keeping variable names source-prefixed or explicitly aliased.
Open downloaded dataset files as one xarray dataset.
Parameters
Name
Type
Description
Default
aliases
Mapping[str, str] | None
Optional explicit mapping from default assembled variable names, such as cmems_glorys__uo, to user-facing names.
None
grid
GridPolicy
Spatial grid policy. "native" keeps each source on its own grid. "lowest_resolution" and "highest_resolution" interpolate sources onto the coarsest or finest overlapping source grid. "custom" interpolates to target_grid.
'native'
spatial_method
SpatialMethod
xarray interpolation method used when grid is not "native". Supported values are "linear" and "nearest".
'linear'
target_grid
TargetGrid | None
Required when grid="custom". Mapping with latitude/longitude or lat/lon arrays.
None
time
TimePolicy
Temporal alignment policy. "native" keeps each source on its own time coordinate. "lowest_resolution" and "highest_resolution" align sources onto the coarsest or finest source timestamps. "custom" aligns to target_time.
'native'
temporal_method
TemporalMethod
Temporal method used when time is not "native". "nearest" uses nearest-neighbour selection with time_tolerance; "linear" uses xarray interpolation; "mean", "max", and "min" aggregate with xarray resampling before aligning to the target timestamps.
'nearest'
target_time
TargetTime | None
Required when time="custom". Iterable of target datetimes, ISO datetime strings, or NumPy datetime64 values.
None
time_tolerance
str | timedelta | None
Maximum nearest-neighbour temporal distance. Use values such as "30min", "1h", or a datetime.timedelta. Set to None to allow unbounded nearest-neighbour selection.
'1h'
Returns
Name
Type
Description
Any
An xarray.Dataset containing all dataset variables that could be
Any
opened from downloaded or reused NetCDF/GRIB2 source files.
Raises
Name
Type
Description
ValueError
If no readable dataset files are available, aliases collide, or a requested grid cannot be built.