Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Water demand #226

Open
wants to merge 90 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
8358da0
First static demand stuff
dalmijn Nov 28, 2023
a396d35
Scaling of domestic demand; add config stuff
dalmijn Dec 8, 2023
7e4bbcc
Allocation progress
dalmijn Dec 13, 2023
e7c536e
Working allocation
dalmijn Dec 14, 2023
74806a0
Fix in allocation burn
dalmijn Dec 14, 2023
d384e3d
Update docs; mute methods
dalmijn Dec 15, 2023
55e09f3
Make admin level more flexible
dalmijn Dec 20, 2023
aa5a113
Merge branch 'main' into demand
dalmijn Dec 21, 2023
549a28f
Added version for non irigation data
dalmijn Dec 21, 2023
2533bfb
Added extra logic for handling cyclic demand maps
dalmijn Jan 12, 2024
bdf17b6
Merge branch 'main' into demand
dalmijn Jan 15, 2024
a5fc679
first version irrigation maps
JoostBuitink Jan 17, 2024
37f13b4
precommit fix
JoostBuitink Jan 17, 2024
353bcf8
precommit fix; add logging message
JoostBuitink Jan 18, 2024
04d8ee4
add support for crop_factor maps
JoostBuitink Jan 18, 2024
e4c0305
Merge branch 'main' into demand
JoostBuitink Mar 21, 2024
03d89fb
Merge branch 'main' into demand
JoostBuitink Mar 21, 2024
b578d62
include `kvfrac`, updated `c`, and `irrigation_trigger`
JoostBuitink Mar 22, 2024
c908394
Merge branch 'main' into demand
JoostBuitink Mar 22, 2024
6ea8279
separate `irrigation_trigger` for paddy and nonpaddy
JoostBuitink Apr 9, 2024
82adf41
fix cyclic names; add irri_trigger to cyclic
JoostBuitink Apr 9, 2024
1e54efd
remove dependency on `dem_subgrid`
JoostBuitink Apr 15, 2024
695d378
add allocation_areas also to geoms
JoostBuitink Apr 16, 2024
249812b
fix allocation_map name
JoostBuitink Apr 17, 2024
6cd825e
Merge branch 'main' into demand
dalmijn Apr 18, 2024
829aaf2
add example notebook
JoostBuitink Apr 19, 2024
c253e06
remove example files (committed by accident)
JoostBuitink Apr 19, 2024
ec3380f
Comments update
dalmijn Apr 19, 2024
51556cb
Merge branch 'demand' of https://github.com/Deltares/hydromt_wflow in…
dalmijn Apr 19, 2024
bee017b
Updated notebook and yaml
dalmijn Apr 19, 2024
3644316
UTM crs usage
dalmijn Apr 19, 2024
1c97eaf
supercharge 'set_grid'
dalmijn Apr 19, 2024
77ed235
Docstrings
dalmijn Apr 19, 2024
575d333
Updated docs
dalmijn Apr 22, 2024
9472ab6
Added tests based on wflow artifact data
dalmijn Apr 22, 2024
3ead783
Merge branch 'main' into demand
dalmijn Apr 23, 2024
1d7059e
added config flags; add note in example
JoostBuitink Apr 23, 2024
a175dad
Updated notebook with artifact data
dalmijn Apr 23, 2024
98b1fd4
Merge branch 'demand' of https://github.com/Deltares/hydromt_wflow in…
dalmijn Apr 23, 2024
f55c5f6
small api (older) fix
dalmijn Apr 23, 2024
7d0b659
Updated old docstring
dalmijn Apr 23, 2024
0d70610
fix basin model in demand notebook
JoostBuitink Apr 23, 2024
96a1306
update docstrings
JoostBuitink Apr 24, 2024
524d9b3
precommit fixes
JoostBuitink Apr 24, 2024
c5c33cc
added tests for setup_irrigation
JoostBuitink Apr 30, 2024
69cf45b
Merge branch 'main' into demand
dalmijn May 16, 2024
800e997
Adjust int value due to new basins
dalmijn May 16, 2024
51da860
adding support for `alpha_h1` and GLCNMO data
JoostBuitink May 16, 2024
20072fa
add support for paddy related parameters
JoostBuitink May 16, 2024
be5d78a
fix typo
JoostBuitink May 16, 2024
5642d08
fix wflow_sediment tests
JoostBuitink May 16, 2024
7a8e76c
removed entries of some sediment parameters
JoostBuitink May 16, 2024
762f0fd
fix test
JoostBuitink May 16, 2024
89f65a7
revert alpha_h1 and glcnmo changes (move to a new PR)
JoostBuitink May 17, 2024
dcd8d31
Allocation solving based on raster operations; faster
dalmijn May 17, 2024
f895ae3
Merge branch 'demand' of https://github.com/Deltares/hydromt_wflow in…
dalmijn May 17, 2024
7590e3c
Remove redundant line
dalmijn May 17, 2024
49a175f
Update test
dalmijn May 17, 2024
f121e43
Direct vs diagonal check
dalmijn May 21, 2024
bf3b7c8
Adjust test alloc id's
dalmijn May 21, 2024
8602bea
Merge branch 'main' into demand
JoostBuitink May 28, 2024
5241ce6
update example with new landuse dataset
JoostBuitink May 28, 2024
c8edb34
add h_paddy state; docs format fixes
JoostBuitink May 28, 2024
f1598d0
doc format update
JoostBuitink May 28, 2024
a5c6901
add flags for paddy and nonpaddy; separated tests
JoostBuitink May 29, 2024
aa77c25
precommit fixes
JoostBuitink May 29, 2024
d667974
surfrac progress
dalmijn May 31, 2024
f371ed5
Merge branch 'demand' of https://github.com/Deltares/hydromt_wflow in…
dalmijn May 31, 2024
3cf4cc4
Working surfacewater frac method
dalmijn May 31, 2024
d0552a5
fix name to allocation for now
dalmijn May 31, 2024
9708f40
Adding some logging
dalmijn May 31, 2024
aa0509f
logging error fix
dalmijn May 31, 2024
0d36ce6
Surface water frac improvements
dalmijn Jun 3, 2024
e09953e
typo
dalmijn Jun 3, 2024
29222e0
Merge branch 'main' into demand
dalmijn Jun 6, 2024
9f624ca
Merge branch 'main' into demand
dalmijn Jun 7, 2024
57145a7
Merge branch 'main' into demand
dalmijn Jun 7, 2024
b607c98
Merge branch 'main' into demand
dalmijn Jun 7, 2024
04acdd0
Add transform function
dalmijn Jun 10, 2024
0d1cb97
Support local data better for non-irrigation
dalmijn Jun 12, 2024
4d4e737
Updated test with extra arguments
dalmijn Jun 12, 2024
221e20f
Updated with custom full function
dalmijn Jul 3, 2024
f06a89e
Small update docstring
dalmijn Jul 11, 2024
6be61e6
Update examples/update_model_water_demand.ipynb
JoostBuitink Jul 17, 2024
fc9d7df
Update examples/update_model_water_demand.ipynb
JoostBuitink Jul 17, 2024
40a723d
Update examples/update_model_water_demand.ipynb
JoostBuitink Jul 17, 2024
2c65702
update set_grid function
JoostBuitink Jul 18, 2024
7720625
Added extra comments
dalmijn Sep 23, 2024
021f0f5
review of setup_non_irrigation and setup_irrigation
hboisgon Oct 15, 2024
78a602e
Merge branch 'main' into demand
hboisgon Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ examples/wflow_test_clip
examples/wflow_piave_corine
examples/wflow_piave_forcing
examples/wflow_piave_gauges
examples/wflow_piave_water_demand
examples/wflow_test_sediment
examples/wflow_test_extend_sediment
examples/hydro_data
Expand Down
9 changes: 9 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ Setup components
WflowModel.setup_reservoirs
WflowModel.setup_glaciers
WflowModel.setup_lulcmaps
WflowModel.setup_lulcmaps_with_paddy
WflowModel.setup_laimaps
WflowModel.setup_laimaps_from_lulc_mapping
WflowModel.setup_allocation_areas
WflowModel.setup_surfacewaterfrac
WflowModel.setup_domestic_demand
WflowModel.setup_other_demand
WflowModel.setup_irrigation
WflowModel.setup_ksathorfrac
WflowModel.setup_rootzoneclim
WflowModel.setup_soilmaps
Expand Down Expand Up @@ -241,6 +247,9 @@ Wflow workflows
.. autosummary::
:toctree: _generated

workflows.allocation_areas
workflows.surfacewaterfrac
workflows.non_irrigation
workflows.hydrography
workflows.topography
workflows.river
Expand Down
10 changes: 6 additions & 4 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,19 @@ Added
- If applicable, basins geometry based on the higher resolution DEM is stored seperately under **basins_highres** `PR #266 <https://github.com/Deltares/hydromt_wflow/pull/266>`_
- New function **setup_1dmodel_connection** to connect wflow to 1D river model (eg Delft3D FM 1D, HEC-RAS, etc.) `PR #210 <https://github.com/Deltares/hydromt_wflow/pull/210>`_
- New setup method for the **KsatHorFrac** parameter **setup_ksathorfarc** to up-downscale existing ksathorfrac maps. `PR #255 <https://github.com/Deltares/hydromt_wflow/pull/255>`_
- new function **setup_pet_forcing** to reproject existing pet data rather than computing from other meteo data. PR #257
- New function **setup_pet_forcing** to reproject existing pet data rather than computing from other meteo data. PR #257
- Workflow to compute brooks corey c for the wflow layers based on soilgrids data, soilgrids_brooks_corey. PR #242
- Better support for WflowModel states with new methods: **read_states**, **write_states** and **clip_states**. PR #252
- **setup_lulcmaps** for wflow_sediment: if planted forest data is available, it can be used to update the values of the USLE C parameter. PR #234
- better support for WflowModel states with new methods: **read_states**, **write_states** and **clip_states**. PR #252
- new function **setup_cold_states** to prepare cold states for WflowModel. PR #252
- new utils method **get_grid_from_config** to get the right wflow staticmaps variable based on the TOML configuration (e.g. detects name in netcdf, value, scale and offset). Only applied now to prepare cold states (e.g. not yet in read_grid). PR #252
- New function **setup_cold_states** to prepare cold states for WflowModel. PR #252
- New utils method **get_grid_from_config** to get the right wflow staticmaps variable based on the TOML configuration (e.g. detects name in netcdf, value, scale and offset). Only applied now to prepare cold states (e.g. not yet in read_grid). PR #252
- New functions (properly) for setting up water demand: **setup_allocation_areas**, **setup_surfacewaterfrac**, **setup_non_irrigation** and **setup_irrigation**. `PR #226 <https://github.com/Deltares/hydromt_wflow/pull/226>`
- Added support for the "GLCNMO" land-use dataset, with a default parameter mapping table (similar to the existing tables). PR #272
- Added the `alpha_h1` parameter (based on land use maps). This parameter represents whether root water uptake reduction at soil water pressure head h1 occurs or not. By default, it is set to 0.0 for all "non-natural" vegetation (crops) and to 1.0 for all "natural vegetation" PR #272
- Parameter for output filename in **write_grid** (`fn_out`). PR #278
- New function **setup_laimaps_from_lulc_mapping** to set leaf area index (LAI) climatology maps per month based on landuse mapping. PR #273


Changed
-------
- Basins geometry (**basins**) is now based on the actual wflow model resolution basins, instead of based on the supplied DEM `PR #266 <https://github.com/Deltares/hydromt_wflow/pull/266>`
Expand Down
14 changes: 13 additions & 1 deletion docs/user_guide/wflow_model_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ 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 are derived based on landuse- landcover (LULC) data.
- This component derives several wflow maps based on landuse- landcover (LULC) data.
* - :py:func:`~WflowModel.setup_lulcmaps_with_paddy`
- This component derives several wflow maps based on landuse- landcover (LULC) 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 @@ -74,6 +76,16 @@ a specific method see its documentation.
- Setup gridded reference evapotranspiration forcing at model resolution.
* - :py:func:`~WflowModel.setup_constant_pars`
- 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_domestic_demand`
- Create domestic water demand.
* - :py:func:`~WflowModel.setup_other_demand`
- Create other water demand (eg industry, livestock).
* - :py:func:`~WflowModel.setup_irrigation`
- Create irrigation areas and trigger for paddy and nonpaddy crops.
* - :py:func:`~WflowModel.setup_1dmodel_connection`
- Setup subbasins and gauges to save results from wflow to be used in 1D river models.
* - :py:func:`~WflowModel.setup_grid_from_raster`
Expand Down
1 change: 1 addition & 0 deletions docs/user_guide/wflow_update.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ To add or change one or more components of an existing Wflow model the ``update`
Example: Update Wflow model (landuse) <../_examples/update_model_landuse.ipynb>
Example: Update Wflow model (forcing) <../_examples/update_model_forcing.ipynb>
Example: Update Wflow model (gauges) <../_examples/update_model_gauges.ipynb>
Example: Update Wflow model with water demand <../_examples/update_model_water_demand.ipynb>
Example: Connect Wflow to a 1D river model <../_examples/connect_to_1d_model.ipynb>
Loading
Loading