hydromt_wflow.WflowSedimentModel.setup_basemaps#

WflowSedimentModel.setup_basemaps(region: Dict, hydrography_fn: str | Dataset, basin_index_fn: str | Dataset = None, res: float | int = 0.008333333333333333, upscale_method: str = 'ihu')#

Build the DEM and flow direction for a Wflow model.

Setup basemaps sets the region of interest and res (resolution in degrees) of the model. All DEM and flow direction related maps are then build.

E.g. of region argument for a subbasin based on a point and snapped using upstream area threshold in hydrography_fn, where the maximum boundary box of the output subbasin is known: region = {‘subbasin’: [x,y], ‘uparea’: 10, ‘bounds’: [xmin, ymin, xmax, ymax]}

(Sub)Basin delination is done using hydromt.workflows.get_basin_geometry method. Because the delineation is computed from the flow direction data in memory, to avoid memory error when using large datasets in hydrography_fn, the user can either supply ‘bounds’ in region or a basin index dataset in basin_index_fn to limit the flow direction data to the region of interest. The basin index dataset is a GeoDataframe containing either basins polygons or bounding boxes of basin boundaries. To select the correct basins, basin ID ‘basins’ in hydrography_fn and basin_index_fn should match.

If the model resolution is larger than the source data resolution, the flow direction is upscaled using the upscale_method, by default the Iterative Hydrography Upscaling (IHU).

The default hydrography_fn is “merit_hydro” (MERIT hydro at 3 arcsec resolution). Alternative sources include “merit_hydro_1k” at 30 arcsec resolution. Users can also supply their own elevation and flow direction data in any CRS and not only EPSG:4326.

Note that in order to define the region, using points or bounding box, the coordinates of the points / bounding box should be in the same CRS than the hydrography data. The wflow model will then also be in the same CRS than the hydrography data in order to avoid assumptions and reprojection errors. If the user wishes to use a different CRS, we recommend first to reproject the hydrography data seperately, before calling hydromt build. You can find examples on how to reproject or prepare hydrography data in the prepare flow directions example notebok.

Adds model layers:

  • wflow_ldd map: flow direction in LDD format [-]

  • wflow_subcatch map: basin ID map [-]

  • wflow_uparea map: upstream area [km2]

  • wflow_streamorder map: Strahler stream order [-]

  • wflow_dem map: average elevation [m+REF]

  • dem_subgrid map: subgrid outlet elevation [m+REF]

  • Slope map: average land surface slope [m/m]

  • basins geom: basins boundary vector

  • region geom: region boundary vector

Parameters:
  • region (dict) – Dictionary describing region of interest. See hydromt.workflows.basin_mask.parse_region() for all options

  • hydrography_fn (str, xarray.Dataset) –

    Name of RasterDataset source for basemap parameters.

    • Required variables: ‘flwdir’ [LLD or D8 or NEXTXY], ‘elevtn’ [m+REF]

    • Required variables if used with basin_index_fn: ‘basins’ [-]

    • Required variables if used for snapping in region: ‘uparea’ [km2],

      ’strord’ [-]

    • Optional variables: ‘lndslp’ [m/m], ‘mask’ [bool]

  • basin_index_fn (str, geopandas.GeoDataFrame, optional) –

    Name of GeoDataFrame source for basin_index data linked to hydrography_fn.

    • Required variables: ‘basid’ [-]

  • res (float, optional) – Output model resolution

  • upscale_method ({'ihu', 'eam', 'dmm'}, optional) – Upscaling method for flow direction data, by default ‘ihu’.

See also

hydromt.workflows.parse_region, hydromt.workflows.get_basin_geometry, workflows.hydrography, workflows.topography