hydromt_wflow.workflows.add_paddy_to_landuse#

hydromt_wflow.workflows.add_paddy_to_landuse(landuse: DataArray, paddy: DataArray, paddy_class: int, df_mapping: DataFrame, df_paddy_mapping: DataFrame, output_paddy_class: int | None = None) Tuple[DataArray, DataFrame][source]#

Burn paddy fields into landuse map and update mapping table.

The resulting paddy class in the landuse map will have ID output_paddy_class if provided and paddy_class otherwise. The mapping table will be updated with the values from the df_paddy_mapping table.

Parameters:
  • landuse (xr.DataArray) – Landuse map.

  • paddy (xr.DataArray) – Paddy fields map.

  • paddy_class (int) – ID of the paddy class in the paddy map.

  • df_mapping (pd.DataFrame) – Mapping table with landuse values.

  • df_paddy_mapping (pd.DataFrame) – Mapping table with paddy values.

  • output_paddy_class (int, optional) – ID of the paddy class in the output landuse map. If not provided, the paddy_class will be used.

Returns:

  • landuse (xr.DataArray) – Updated landuse map.

  • df_mapping (pd.DataFrame) – Updated mapping table.