diff --git a/docs/api.rst b/docs/api.rst index 661329a5..29b8692c 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -39,7 +39,7 @@ Setup components WflowModel.setup_laimaps WflowModel.setup_laimaps_from_lulc_mapping WflowModel.setup_allocation_areas - WflowModel.setup_surfacewaterfrac + WflowModel.setup_allocation_surfacewaterfrac WflowModel.setup_domestic_demand WflowModel.setup_other_demand WflowModel.setup_irrigation diff --git a/docs/user_guide/wflow_model_setup.rst b/docs/user_guide/wflow_model_setup.rst index f7fb39bf..e71c99c4 100644 --- a/docs/user_guide/wflow_model_setup.rst +++ b/docs/user_guide/wflow_model_setup.rst @@ -78,8 +78,8 @@ a specific method see its documentation. - Setup constant parameter maps for all active model cells. * - :py:func:`~WflowModel.setup_allocation_areas` - Create water demand allocation areas. - * - :py:func:`~WflowModel.setup_surfacewaterfrac` - - Create water demand surface water consumption fraction. + * - :py:func:`~WflowModel.setup_allocation_surfacewaterfrac` + - Create fraction of surface water used for allocation of the water demands. * - :py:func:`~WflowModel.setup_domestic_demand` - Create domestic water demand. * - :py:func:`~WflowModel.setup_other_demand` diff --git a/hydromt_wflow/wflow.py b/hydromt_wflow/wflow.py index 64fac811..3877c8ab 100644 --- a/hydromt_wflow/wflow.py +++ b/hydromt_wflow/wflow.py @@ -2165,6 +2165,7 @@ def setup_lulcmaps_with_paddy( "h4", ], paddy_waterlevels: Dict = {"h_min": 20, "h_opt": 50, "h_max": 80}, + save_high_resolution_lulc: bool = False, ): """Set up landuse maps and parameters including for paddy fields. @@ -2270,6 +2271,9 @@ def setup_lulcmaps_with_paddy( 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. """ self.logger.info("Preparing LULC parameter maps including paddies.") # Check if soil data is available @@ -2315,6 +2319,13 @@ def setup_lulcmaps_with_paddy( df_paddy_mapping=df_paddy_mapping, ) + if save_high_resolution_lulc: + output_dir = join(self.root, "maps") + if not os.path.exists(output_dir): + os.path.makedirs(output_dir) + landuse.raster.to_raster(join(output_dir, "landuse_with_paddy.tif")) + df_mapping.to_csv(join(output_dir, "landuse_with_paddy_mapping.csv")) + # Prepare landuse parameters landuse_maps = workflows.landuse( da=landuse,