hydromt_wflow.workflows.grid.grid_from_geodataset#
- grid_from_geodataset(da: DataArray, ds_like: Dataset, fill_value: float | int | None = None, nodata_value: float | int = -9999, mask: str | None = None, freq: str = 'D', resample_time_kwargs: dict | None = None) tuple[DataArray, str][source]#
Regrid a geodataset dataarray to the grid of the staticmaps dataset.
- Parameters:
da (xr.DataArray) – Data array from geodataset with vector geometry.
ds_like (xr.Dataset) – Dataset with the grid to reproject to.
fill_value (float | int, optional) – Fill value for the other grid cells. If not provided, the same value as the nodata value is used. By default None.
nodata_value (float | int, optional) – No data value for the grid cells if not defined in the geodataset. By default -9999.
mask (str, optional) – Name of the mask to apply on the grid. Should be a layer already present in ds_like. If None, the basin mask will be used.
freq (str, optional) – Resampling frequency for time dimension, by default “D”. Only used if da is of type forcing.
resample_time_kwargs (dict, optional) – Additional keyword arguments for resample_time function, by default None. Only used if da is of type forcing.