hydromt.io.open_geodataset#

hydromt.io.open_geodataset(fn_locs, fn_data=None, var_name=None, index_dim=None, chunks=None, crs=None, bbox=None, geom=None, logger=<Logger hydromt.io (WARNING)>, **kwargs)[source]#

Open and combine geometry location GIS file and timeseries file in a xr.Dataset.

Parameters:
  • fn_locs (path, str) – Path to geometry location file, see geopandas.read_file() for options. For point location, the file can also be a csv, parquet, xls(x) or xy file, see hydromt.io.open_vector_from_table() for options.

  • fn_data (path, str) – Path to data file of which the index dimension which should match the geospatial coordinates index. This can either be a csv, or parquet with datetime in the first column and the location index in the header row, or a netcdf with a time and index dimensions.

  • var_name (str, optional) – Name of the variable in case of a csv, or parquet fn_data file. By default, None and infered from basename.

  • crs (str, pyproj.CRS, or dict) – Source coordinate reference system, ignored for files with a native crs.

  • bbox (array of float, default None) – Filter features by given bounding box described by [xmin, ymin, xmax, ymax] Cannot be used with geom.

  • index_dim – The dimension to index on.

  • chunks – The dimensions of the chunks to store the underlying data in.

  • geom (GeoDataFrame or GeoSeries | shapely Geometry, default None) – Filter for features that intersect with the geom. CRS mis-matches are resolved if given a GeoSeries or GeoDataFrame. Cannot be used with bbox.

  • **kwargs – Key-word argument

  • logger (logger object, optional) – The logger object used for logging messages. If not provided, the default logger will be used.

Returns:

ds – Dataset with geospatial coordinates.

Return type:

xarray.Dataset