hydromt.data_catalog.DataCatalog.get_source_time_range#
- DataCatalog.get_source_time_range(source: str, provider: str | None = None, version: str | None = None, detect: bool = True, strict: bool = False) Tuple[datetime, datetime] | None [source]#
Detect the temporal range of the dataset.
- Parameters:
source (
str,
) – the name of the data source.provider (
Optional[str]
) – the provider of the source to detect the time range of, if None, the last one added will be used.version (
Optional[str]
) – the version of the source to detect the time range of, if None, the last one added will be used.detect (
bool
) – Whether to detect the time range of the source if it is not set.strict (
bool
) – Raise an error if the adapter does not support time range detection (such as dataframes). In that case, a warning will be logged instead.
- Returns:
range – A tuple containing the start and end of the time dimension. Range is inclusive on both sides.
- Return type:
Tuple[np.datetime64
,np.datetime64]