hydromt.GridModel.setup_grid_from_constant#
- GridModel.setup_grid_from_constant(constant: int | float, name: str, dtype: str | None = 'float32', nodata: int | float | None = None, mask_name: str | None = 'mask') List[str] #
HYDROMT CORE METHOD: Adds a grid based on a constant value.
- Parameters:
name (
str
) – Name of grid.dtype (
str
, optional) – Data type of grid. By default ‘float32’.nodata (
int
,float
, optional) – Nodata value. By default infered from dtype.mask_name (
str
, optional) – Name of mask in self.grid to use for masking raster_fn. By default ‘mask’. Use None to disable masking.
- Returns:
Names of added model grid layer.
- Return type: