Skip to content

Commit

Permalink
Merge branch 'main' into glacier_param
Browse files Browse the repository at this point in the history
  • Loading branch information
JoostBuitink committed Feb 13, 2025
2 parents e60d3ae + 20f5e87 commit 3ba2e12
Show file tree
Hide file tree
Showing 20 changed files with 683 additions and 57 deletions.
6 changes: 6 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Setup components
WflowModel.setup_reservoirs
WflowModel.setup_glaciers
WflowModel.setup_lulcmaps
WflowModel.setup_lulcmaps_from_vector
WflowModel.setup_lulcmaps_with_paddy
WflowModel.setup_laimaps
WflowModel.setup_laimaps_from_lulc_mapping
Expand All @@ -44,6 +45,7 @@ Setup components
WflowModel.setup_other_demand
WflowModel.setup_irrigation
WflowModel.setup_ksathorfrac
WflowModel.setup_ksatver_vegetation
WflowModel.setup_rootzoneclim
WflowModel.setup_soilmaps
WflowModel.setup_outlets
Expand Down Expand Up @@ -159,6 +161,7 @@ Setup components
WflowSedimentModel.setup_lakes
WflowSedimentModel.setup_reservoirs
WflowSedimentModel.setup_lulcmaps
WflowSedimentModel.setup_lulcmaps_from_vector
WflowSedimentModel.setup_laimaps
WflowSedimentModel.setup_laimaps_from_lulc_mapping
WflowSedimentModel.setup_canopymaps
Expand Down Expand Up @@ -258,11 +261,14 @@ Wflow workflows
workflows.river_bathymetry
workflows.pet
workflows.landuse
workflows.landuse_from_vector
workflows.lai
workflows.create_lulc_lai_mapping_table
workflows.lai_from_lulc_mapping
workflows.add_paddy_to_landuse
workflows.add_planted_forest_to_landuse
workflows.ksathorfrac
workflows.ksatver_vegetation
workflows.soilgrids
workflows.soilgrids_sediment
workflows.soilgrids_brooks_corey
Expand Down
17 changes: 17 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@ Fixed
-----
-

Deprecated
----------
-

v0.7.1 (29 January 2025)
========================
Officially drop support for python 3.9.

Added
-----
- **setup_ksatver_vegetation**: method to calculate KsatVer_vegetation to account for biologically-enhanced soil structure in KsatVer. PR #313
- **setup_lulcmaps_from_vector**: method to prepare LULC map and params from a vector input rather than raster. PR #320

Deprecated
----------
- Support for python 3.9 (already not supported in previous releases).

v0.7.0 (8 November 2024)
========================
This release adds support to create water demand and allocation related data (available since Wflow.jl version 0.8.0).
Expand Down
4 changes: 3 additions & 1 deletion docs/user_guide/sediment_model_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ a specific method see its documentation.
* - :py:func:`~WflowSedimentModel.setup_reservoirs`
- This component generates maps of lake areas and outlets as well as parameters with average reservoir area, demand, min and max target storage capacities and discharge capacity values.
* - :py:func:`~WflowSedimentModel.setup_lulcmaps`
- This component derives several wflow maps are derived based on landuse- landcover (LULC) data.
- This component derives several wflow maps based on landuse- landcover (LULC) raster data.
* - :py:func:`~WflowModel.setup_lulcmaps_from_vector`
- This component derives several wflow maps based on landuse- landcover (LULC) vector data.
* - :py:func:`~WflowSedimentModel.setup_laimaps`
- This component sets leaf area index (LAI) climatology maps per month.
* - :py:func:`~WflowSedimentModel.setup_laimaps_from_lulc_mapping`
Expand Down
8 changes: 6 additions & 2 deletions docs/user_guide/wflow_model_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ a specific method see its documentation.
* - :py:func:`~WflowModel.setup_glaciers`
- This component generates maps of glacier areas, area fraction and volume fraction, as well as tables with temperature threshold, melting factor and snow-to-ice conversion fraction.
* - :py:func:`~WflowModel.setup_lulcmaps`
- This component derives several wflow maps based on landuse- landcover (LULC) data.
- This component derives several wflow maps based on landuse- landcover (LULC) raster data.
* - :py:func:`~WflowModel.setup_lulcmaps_from_vector`
- This component derives several wflow maps based on landuse- landcover (LULC) vector data.
* - :py:func:`~WflowModel.setup_lulcmaps_with_paddy`
- This component derives several wflow maps based on landuse- landcover (LULC) data with paddy rice.
- This component derives several wflow maps based on landuse- landcover (LULC) raster data with paddy rice.
* - :py:func:`~WflowModel.setup_laimaps`
- This component sets leaf area index (LAI) climatology maps per month.
* - :py:func:`~WflowModel.setup_laimaps_from_lulc_mapping`
Expand All @@ -58,6 +60,8 @@ a specific method see its documentation.
- This component derives several (layered) soil parameters based on a database with physical soil properties using available point-scale (pedo)transfer functions (PTFs) from literature with upscaling rules to ensure flux matching across scales.
* - :py:func:`~WflowModel.setup_ksathorfrac`
- This component prepares ksathorfrac from existing ksathorfrac data.
* - :py:func:`~WflowModel.setup_ksatver_vegetation`
- This component prepares ksatver from soil and vegetation parameters.
* - :py:func:`~WflowModel.setup_rootzoneclim`
- This component derives an estimate of the rooting depth from hydroclimatic data (as an alternative from the look-up table). The method can be applied for current conditions and future climate change conditions.
* - :py:func:`~WflowModel.setup_outlets`
Expand Down
Binary file modified examples/linux64/wflow_piave_clip/staticmaps.nc
Binary file not shown.
Binary file modified examples/linux64/wflow_piave_subbasin/staticmaps.nc
Binary file not shown.
Binary file modified examples/linux64/wflow_sediment_piave_subbasin/staticmaps.nc
Binary file not shown.
Binary file modified examples/wflow_piave_clip/staticmaps.nc
Binary file not shown.
Binary file modified examples/wflow_piave_subbasin/staticmaps.nc
Binary file not shown.
Binary file modified examples/wflow_sediment_piave_subbasin/staticmaps.nc
Binary file not shown.
2 changes: 1 addition & 1 deletion hydromt_wflow/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""hydroMT plugin for wflow models."""

__version__ = "0.7.1dev0"
__version__ = "0.7.2.dev0"

from .naming import *
from .utils import *
Expand Down
9 changes: 5 additions & 4 deletions hydromt_wflow/pcrm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import tempfile
from os.path import basename, dirname, isdir, isfile, join
from pathlib import Path
from typing import Union

import numpy as np
import pandas as pd
Expand Down Expand Up @@ -187,7 +188,7 @@ def write_map(


def read_staticmaps_pcr(
root: Path | str, crs: int = 4326, obj: object = None, **kwargs
root: Union[Path, str], crs: int = 4326, obj: object = None, **kwargs
):
"""
Read pcraster staticmaps at <root/staticmaps> and parse to xarray.
Expand All @@ -196,7 +197,7 @@ def read_staticmaps_pcr(
Parameters
----------
root : Path | str
root : Path, str
Path to the root directory of the model. Assumes this folder contains a
staticmaps folder with the pcraster maps.
crs : int, optional
Expand Down Expand Up @@ -256,7 +257,7 @@ def read_staticmaps_pcr(

def write_staticmaps_pcr(
staticmaps: xr.Dataset,
root: Path | str,
root: Union[Path, str],
):
"""
Write staticmaps at <root/staticmaps> in PCRaster maps format.
Expand All @@ -265,7 +266,7 @@ def write_staticmaps_pcr(
----------
staticmaps : xr.Dataset
Dataset with the staticmaps.
root : Path | str
root : Path, str
Path to the root directory of the model. A staticmaps folder will be created
in this folder with the pcraster maps.
"""
Expand Down
Loading

0 comments on commit 3ba2e12

Please sign in to comment.