hydromt_wflow.WflowSedimentModel.setup_lulcmaps_from_vector#

WflowSedimentModel.setup_lulcmaps_from_vector(lulc_fn: str | GeoDataFrame, lulc_mapping_fn: str | Path | DataFrame | None = None, planted_forest_fn: str | Path | GeoDataFrame | None = None, lulc_vars: Dict = {'erosion_usle_c': 'soil_erosion__usle_c_factor', 'land_water_fraction': 'land~water-covered__area_fraction', 'landuse': None, 'soil_compacted_fraction': 'soil~compacted__area_fraction'}, lulc_res: float | int | None = None, all_touched: bool = False, buffer: int = 1000, save_raster_lulc: bool = False, planted_forest_c: float = 0.0881, orchard_name: str = 'Orchard', orchard_c: float = 0.2188, output_names_suffix: str | None = None)[source]#

Derive several wflow maps based on vector landuse-landcover (LULC) data.

The vector lulc data is first rasterized to a raster map at the model resolution or at a higher resolution specified in lulc_res (recommended).

Lookup table lulc_mapping_fn columns are converted to lulc classes model parameters based on literature. The data is remapped at its original resolution and then resampled to the model resolution using the average value, unless noted differently.

The USLE C factor map can be refined for planted forests using the planted forest data source. The planted forest data source is a polygon layer with planted forest polygons and optionally a column with the forest type to identify orchards. The default value for orchards is 0.2188, the default value for other planted forests is 0.0881.

Adds model layers:

  • landuse map: Landuse class [-]

    Original source dependent LULC class, resampled using nearest neighbour.

  • erosion_usle_c map: Cover management factor from the USLE equation [-]

  • soil_compacted_fraction map: The fraction of compacted or urban area per grid cell [-]

  • land_water_fraction map: The fraction of water covered area per grid cell [-]

Parameters:
  • lulc_fn (str, gpd.GeoDataFrame) –

    GeoDataFrame or name in data catalog / path to (vector) landuse map.

    • Required columns: ‘landuse’ [-]

  • lulc_mapping_fn (str, Path, pd.DataFrame) – Path to a mapping csv file from landuse in source name to parameter values in lulc_vars. If lulc_fn is one of {“globcover”, “vito”, “corine”, “esa_worldcover”, “glmnco”}, a default mapping is used and this argument becomes optional.

  • planted_forest_fn (str, Path, gpd.GeoDataFrame) –

    GeoDataFrame source with polygons of planted forests.

    • Optional variable: [“forest_type”]

  • lulc_vars (Dict) – Dictionary of landuse parameters to prepare. The names are the the columns of the mapping file and the values are the corresponding Wflow.jl variables.

  • all_touched (bool, optional) – If True, all pixels touched by the vector will be burned in the raster, by default False.

  • buffer (int, optional) – Buffer around the bounding box of the vector data to ensure that all landuse classes are included in the rasterized map, by default 1000.

  • save_raster_lulc (bool, optional) – If True, the high resolution rasterized landuse map will be saved to maps/landuse_raster.tif, by default False.

  • planted_forest_c (float, optional) – Value of USLE C factor for planted forest, by default 0.0881.

  • orchard_name (str, optional) – Name of orchard landuse class in the “forest_type” column of planted_forest_fn, by default “Orchard”.

  • orchard_c (float, optional) – Value of USLE C factor for orchards, by default 0.2188.

  • output_names_suffix (str, optional) – Suffix to be added to the output names to avoid having to rename all the columns of the mapping tables. For example if the suffix is “vito”, all variables in lulc_vars will be renamed to “landuse_vito”, “erosion_usle_c_vito”, etc.

See also

workflows.setup_lulcmaps_from_vector, workflows.add_planted_forest_to_landuse