hydromt_wflow.WflowModel.setup_lulcmaps_with_paddy#
- WflowModel.setup_lulcmaps_with_paddy(lulc_fn: str | Path | DataArray, paddy_class: int, output_paddy_class: int | None = None, lulc_mapping_fn: str | Path | DataFrame = None, paddy_fn: str | Path | DataArray | None = None, paddy_mapping_fn: str | Path | DataFrame | None = None, soil_fn: str | Path | DataArray = 'soilgrids', wflow_thicknesslayers: List[int] = [50, 100, 50, 200, 800], target_conductivity: List[None | int | float] = [None, None, 5, None, None], lulc_vars: List = ['landuse', 'Kext', 'N', 'PathFrac', 'RootingDepth', 'Sl', 'Swood', 'WaterFrac', 'kc', 'alpha_h1', 'h1', 'h2', 'h3_high', 'h3_low', 'h4'], paddy_waterlevels: Dict = {'h_max': 80, 'h_min': 20, 'h_opt': 50}, save_high_resolution_lulc: bool = False)[source]#
Set up landuse maps and parameters including for paddy fields.
THIS FUNCTION SHOULD BE RUN AFTER setup_soilmaps.
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.
If paddies are present either directly as a class in the landuse_fn or in a separate paddy_fn, the paddy class is used to derive the paddy parameters.
To allow for water to pool on the surface (for paddy/rice fields), the layers in the model can be updated to new depths, such that we can allow a thin layer with limited vertical conductivity. These updated layers means that the
c
parameter needs to be calculated again. Next, the kvfrac layer corrects the vertical conductivity (by multiplying) such that the bottom of the layer corresponds to thetarget_conductivity
for that layer. This currently assumes the wflow models to have an exponential declining vertical conductivity (using thef
parameter). If no target_conductivity is specified for a layer (None
), the kvfrac value is set to 1.The different values for the minimum/optimal/maximum water levels for paddy fields will be added as constant values in the toml file, through the
vertical.paddy.h_min.value = 20
interface.Adds model layers:
landuse map: Landuse class [-]
Kext map: Extinction coefficient in the canopy gap fraction equation [-]
Sl map: Specific leaf storage [mm]
Swood map: Fraction of wood in the vegetation/plant [-]
RootingDepth map: Length of vegetation roots [mm]
PathFrac map: The fraction of compacted or urban area per grid cell [-]
WaterFrac map: The fraction of open water per grid cell [-]
N map: Manning Roughness [-]
kc map: Crop coefficient [-]
alpha_h1 map: Root water uptake reduction at soil water pressure head h1 (0 or 1) [-]
h1 map: Soil water pressure head h1 at which root water uptake is reduced (Feddes) [cm]
h2 map: Soil water pressure head h2 at which root water uptake is reduced (Feddes) [cm]
h3_high map: Soil water pressure head h3 at which root water uptake is reduced (Feddes) [cm]
h3_low map: Soil water pressure head h3 at which root water uptake is reduced (Feddes) [cm]
h4 map: Soil water pressure head h4 at which root water uptake is reduced (Feddes) [cm]
h_min map: Minimum required water depth for paddy fields [mm]
h_opt map: Optimal water depth for paddy fields [mm]
h_max map: Maximum water depth for paddy fields [mm]
kvfrac: Map with a multiplication factor for the vertical conductivity [-]
Updates model layers:
c: Brooks Corey coefficients [-] based on pore size distribution, a map for each of the wflow_sbm soil layers (updated based on the newly specified layers)
- Parameters:
lulc_fn (str, Path, xr.DataArray) – RasterDataset or name in data catalog / path to landuse map.
paddy_class (int) – Landuse class value for paddy fields either in landuse_fn or paddy_fn if provided.
output_paddy_class (int, optional) – Landuse class value for paddy fields in the output landuse map. If None, the
paddy_class
is used, by default None. This can be useful when merging paddy location frompaddy_fn
intolanduse_fn
.lulc_mapping_fn (str, Path, pd.DataFrame, optional) – 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.
paddy_fn (str, Path, xr.DataArray, optional) – RasterDataset or name in data catalog / path to paddy map.
paddy_mapping_fn (str, Path, pd.DataFrame, optional) – Path to a mapping csv file from paddy in source name to parameter values in lulc_vars. A default mapping table for rice parameters is used if not provided.
soil_fn (str, Path, xr.DataArray, optional) –
Soil data to be used to recalculate the Brooks-Corey coefficients (c parameter), based on the provided
wflow_thicknesslayers
, by default “soilgrids”, but should ideally be equal to the data used insetup_soilmaps()
Required variables: ‘bd_sl*’ [g/cm3], ‘clyppt_sl*’ [%], ‘sltppt_sl*’ [%], ‘ph_sl*’ [-].
wflow_thicknesslayers (list) – List of soil thickness per layer [mm], by default [50, 100, 50, 200, 800, ]
target_conductivity (list) – List of target vertical conductivities [mm/day] for each layer in
wflow_thicknesslayers
. Set value to None if no specific value is required, by default [None, None, 5, None, None].lulc_vars (list) – List of landuse parameters to prepare. By default [“landuse”,”Kext”,”N”,”PathFrac”,”RootingDepth”,”Sl”,”Swood”, “WaterFrac”]
paddy_waterlevels (dict) – Dictionary with the minimum, optimal and maximum water levels for paddy fields [mm]. By default {“h_min”: 20, “h_opt”: 50, “h_max”: 80}
save_high_resolution_lulc (bool) – Save the high resolution landuse map merged with the paddies to the static folder. By default False.