hydromt_wflow.WflowSbmModel.setup_agroforestry#
- WflowSbmModel.setup_agroforestry(agroforestry_fn: str | DataArray | GeoDataFrame, agroforestry_class: int | None = None, output_agroforestry_class: int | None = None, agroforestry_mapping_fn: str | Path | DataFrame | None = None, lulc_mapping_fn: str | Path | DataFrame | None = None, lulc_mix_classes: list[int] | None = None, lulc_mix_fractions: list[float] | None = None, lulcmap_name: str = 'meta_landuse', output_names_suffix: str | None = None)[source]#
Add agroforestry to landuse maps and parameters.
Agroforestry zones can be provided as a raster or vector dataset that will be reprojected / rasterized to the model resolution.
For parameter mapping, users have three options:
provide directly a mapping table for the agroforestry landuse class with agroforestry_mapping_fn
derive values based on a mix of existing landuse classes with lulc_mix_classes and lulc_mix_fractions and the original landuse mapping table lulc_mapping_fn.
If no mapping table is provided either via agroforestry_mapping_fn or lulc_mapping_fn, a default mapping table for agroforestry will be used.
Adds model layers:
- landuse map:
Landuse class [-]
- vegetation_kext map:
Extinction coefficient in the canopy gap fraction equation [-]
- vegetation_leaf_storage map:
Specific leaf storage [mm]
- vegetation_wood_storage map:
Fraction of wood in the vegetation/plant [-]
- vegetation_root_depth map:
Length of vegetation roots [mm]
- soil_compacted_fraction map:
The fraction of compacted or urban area per grid cell [-]
- land_water_fraction map:
The fraction of open water per grid cell [-]
- land_manning_n map:
Manning Roughness [-]
- vegetation_crop_factor map:
Crop coefficient [-]
- vegetation_feddes_alpha_h1 map:
Root water uptake reduction at soil water pressure head h1 (0 or 1) [-]
- vegetation_feddes_h1 map:
Soil water pressure head h1 at which root water uptake is reduced (Feddes) [cm]
- vegetation_feddes_h2 map:
Soil water pressure head h2 at which root water uptake is reduced (Feddes) [cm]
- vegetation_feddes_h3_high map:
Soil water pressure head h3 (high) at which root water uptake is reduced (Feddes) [cm]
- vegetation_feddes_h3_low map:
Soil water pressure head h3 (low) at which root water uptake is reduced (Feddes) [cm]
- vegetation_feddes_h4 map:
Soil water pressure head h4 at which root water uptake is reduced (Feddes) [cm]
Required setup methods: *
setup_lulcmaps()or equivalent- Parameters:
agroforestry_fn (str, xr.DataArray, gpd.GeoDataFrame) –
RasterDataArray, vector dataset or name in data catalog to the agroforestry data.
Optional column if vector: ‘agroforestry’ [-]
agroforestry_class (int, optional) – ID of the agroforestry class in agroforestry_fn. If None, agroforestry mask will be created for all non-nodata values.
output_agroforestry_class (int, optional) – Landuse class value for agroforestry fields in the output landuse map. If None (default), the agroforestry_class is used.
agroforestry_mapping_fn (str, Path, pd.DataFrame, optional) – Path to a mapping csv file from agroforestry to landuse parameter values.
lulc_mapping_fn (str, Path, pd.DataFrame, optional) – Path to a mapping csv file from landuse class to landuse parameter values.
lulc_mix_classes (list[int], optional) – List of landuse classes to mix for the agroforestry class, by default [].
lulc_mix_fractions (list[float], optional) – List of fractions for each landuse class in lulc_mix_classes to mix for the agroforestry class, by default [].
lulcmap_name (str) – Name of the landuse map layer in the wflow model staticmaps. By default ‘meta_landuse’. Please update if your landuse map has a different name (eg ‘meta_landuse_globcover’).
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 “agroforestry”, all variables in landuse_vars will be renamed to “landuse_agroforestry”, “vegetation_kext_agroforestry”, etc.