hydromt.data_catalog.DataCatalog.export_data#
- DataCatalog.export_data(new_root: ~pathlib.Path | str, bbox: ~typing.Annotated[~typing.Tuple[float, float, float, float], <function _validate_bbox at 0x7f35298edd00>] | None = None, time_range: ~typing.Annotated[~typing.Tuple[~datetime.datetime, ~datetime.datetime], ~pydantic.functional_validators.BeforeValidator(func=~hydromt._typing.type_def._time_range_from_str), ~pydantic.functional_validators.AfterValidator(func=~hydromt._typing.type_def._time_range_validate)] | None = None, source_names: ~typing.List[str] | None = None, unit_conversion: bool = True, metadata: ~typing.Dict[str, ~typing.Any] | None = None, force_overwrite: bool = False, append: bool = False, handle_nodata: ~hydromt._typing.error.NoDataStrategy = NoDataStrategy.IGNORE) None [source]#
Export a data slice of each dataset and a data_catalog.yml file to disk.
- Parameters:
new_root (
str
,Path
) – Path to output folderbbox (
array-like
offloats
) – (xmin, ymin, xmax, ymax) bounding box of area of interest.time_range (
tuple
ofstr
,datetime
, optional) – Start and end date of period of interest. By default the entire time period of the dataset is returned.source_names (
list
, optional) – List of source names to export, by default None in which case all sources are exported. Specific variables can be selected by appending them to the source name in square brackets. For example, to export all variables of ‘source_name1’ and only ‘var1’ and ‘var2’ of ‘source_name’ use source_names=[‘source_name1’, ‘source_name2[var1,var2]’]unit_conversion (
boolean
, optional) – If False skip unit conversion when parsing data from file, by default True.meta (
dict
, optional) – key-value pairs to add to the data catalog meta section, such as ‘version’, by default empty.forced_overwrite (
bool
) – override any existing files if True. False by default.append (
bool
, optional) – If True, append to existing data catalog, by default False.