hydromt.data_catalog.sources.RasterDatasetSource.get_time_range#
- RasterDatasetSource.get_time_range(detect: bool = True) Annotated[Tuple[datetime, datetime], BeforeValidator(func=_time_range_from_str, json_schema_input_type=PydanticUndefined), AfterValidator(func=_time_range_validate)] [source]#
Detect the time range of the dataset.
if the time range is not set and detect is True,
hydromt.RasterdatasetAdapter.detect_time_range()
will be used to detect it.- Parameters:
detect (
bool
,Optional
) – whether to detect the time range if it is not set. If False, and it’s not set None will be returned.- 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]