hydromt_delft3dfm.DFlowFMModel.setup_maps_from_rasterdataset#
- DFlowFMModel.setup_maps_from_rasterdataset(raster_fn: str, variables: list | None = None, fill_method: str | None = None, reproject_method: str | None = 'nearest', interpolation_method: str | None = 'triangulation', locationtype: str | None = '2d', name: str | None = None, split_dataset: bool | None = True) None [source]#
Add data variable(s) from
raster_fn
to maps object.If raster is a dataset, all variables will be added unless
variables
list is specified.Adds model layers:
raster.name maps: data from raster_fn
- Parameters:
raster_fn (str) – Source name of raster data in data_catalog.
variables (list, optional) – List of variables to add to maps from raster_fn. By default all. Available variables: [‘elevtn’, ‘waterlevel’, ‘waterdepth’, ‘pet’, ‘infiltcap’, ‘roughness_chezy’, ‘roughness_manning’, ‘roughness_walllawnikuradse’, ‘roughness_whitecolebrook’]
fill_method (str, optional) – If specified, fills no data values using fill_nodata method. Available methods are [‘linear’, ‘nearest’, ‘cubic’, ‘rio_idw’].
reproject_method (str, optional) – CRS reprojection method from rasterio.enums.Resampling. By default nearest. Available methods: [ ‘nearest’, ‘bilinear’, ‘cubic’, ‘cubic_spline’, ‘lanczos’, ‘average’, ‘mode’, ‘gauss’, ‘max’, ‘min’, ‘med’, ‘q1’, ‘q3’, ‘sum’, ‘rms’]
interpolation_method (str, optional) – Interpolation method for DFlow-FM. By default triangulation. Except for waterlevel and waterdepth then the default is mean. When methods other than ‘triangulation’, the relative search cell size will be estimated based on resolution of the raster. Available methods: [‘triangulation’, ‘mean’, ‘nearestNb’, ‘max’, ‘min’, ‘invDist’, ‘minAbs’, ‘median’]
locationtype (str, optional) – LocationType in initial fields. Either 2d (default), 1d or all.
name (str, optional) – Variable name, only in case data is of type DataArray or if a Dataset is added as is (split_dataset=False).
split_dataset (bool, optional) – If data is a xarray.Dataset, either add it as is to maps or split it into several xarray.DataArrays. Default to True.