hydromt_wflow.WflowSedimentModel.setup_grid_from_raster#

WflowSedimentModel.setup_grid_from_raster(raster_fn: str | Dataset, reproject_method: str, variables: List[str] | None = None, wflow_variables: List[str] | None = None, fill_method: str | None = None) List[str]#

Add data variable(s) from raster_fn to grid object.

If raster is a dataset, all variables will be added unless variables list is specified. The config toml can also be updated to include the new maps using wflow_variables.

Adds model layers:

  • raster.name or variables grid: data from raster_fn

Parameters:
  • raster_fn (str) – Source name of RasterDataset in data_catalog.

  • reproject_method (str) – Reprojection method from rasterio.enums.Resampling. Available methods: [‘nearest’, ‘bilinear’, ‘cubic’, ‘cubic_spline’, ‘lanczos’, ‘average’, ‘mode’, ‘gauss’, ‘max’, ‘min’, ‘med’, ‘q1’, ‘q3’, ‘sum’, ‘rms’]

  • variables (list, optional) – List of variables to add to grid from raster_fn. By default all.

  • wflow_variables (list, optional) – List of corresponding wflow variables to update the config toml (e.g: [“input.vertical.altitude”]). Should match the variables list. variables list should be provided unless raster_fn contains a single variable (len 1).

  • fill_method (str, optional) – If specified, fills nodata values using fill_nodata method. Available methods are {‘linear’, ‘nearest’, ‘cubic’, ‘rio_idw’}.

Returns:

Names of added model staticmap layers.

Return type:

list