Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
b38854c
Update lisfloodSettings_reference.xml for TWS output
JensenLaura Mar 13, 2025
920e179
Update Lisflood_initial.py for TWS output
JensenLaura Mar 13, 2025
e8e031c
Update Lisflood_dynamic.py for TWS output
JensenLaura Mar 13, 2025
df9dd96
Update default_options.py for TWS output
JensenLaura Mar 13, 2025
f085ec9
Update routing.py for computing river flow momentum
JensenLaura Mar 13, 2025
3c4c82f
Update evapowater.py to deal with modified LakeMask
JensenLaura Mar 13, 2025
1e524b7
Add waterstorage.py for TWS computation
JensenLaura Mar 13, 2025
6c12856
Update waterstorage.py (soil storage computation)
JensenLaura Mar 27, 2025
2d91d8f
Merge pull request #203 from JensenLaura/GFZ/feature/tws
doc78 Jul 16, 2025
a9714d5
Fix to LakeMask in evapowater and to xml files for the TWS feature
doc78 Jul 18, 2025
94eb00e
Updated temporary version number
doc78 Jul 18, 2025
8259eef
Merge branch 'development' into feature/dev_tws
doc78 Jul 18, 2025
ead07d7
Merge pull request #215 from ec-jrc/development
doc78 Mar 11, 2026
c0e1df6
Delete src/lisflood/hydrological_modules/waterstorage.py
JensenLaura May 20, 2026
c62968e
Add files via upload
JensenLaura May 20, 2026
73e2d61
Add files via upload
JensenLaura May 20, 2026
09db0ce
Delete tests/test_results.py
JensenLaura May 20, 2026
9ac656f
Add files via upload
JensenLaura May 20, 2026
7f4edbb
Delete tests/data/LF_ETRS89_UseCase/settings/base.xml
JensenLaura May 20, 2026
7c909e9
Add files via upload
JensenLaura May 20, 2026
048c257
Delete tests/data/LF_ETRS89_UseCase/reference/output_reference_daily/…
JensenLaura May 20, 2026
540f782
Add files via upload
JensenLaura May 20, 2026
6c170cc
Delete tests/data/LF_ETRS89_UseCase/reference/output_reference_6h/tws.nc
JensenLaura May 20, 2026
17bac72
Add files via upload
JensenLaura May 20, 2026
60be2bb
Add files via upload
JensenLaura May 20, 2026
4df76a1
Add files via upload
JensenLaura May 20, 2026
5e65365
Add files via upload
JensenLaura May 20, 2026
91f0a81
Add files via upload
JensenLaura May 20, 2026
822dda7
Delete tests/test_utils.py
JensenLaura May 20, 2026
d5bfdb0
Add files via upload
JensenLaura May 20, 2026
11a5eb7
Merge pull request #220 from JensenLaura/feature/dev_tws
doc78 May 20, 2026
174a835
TWS merge
fuchsiger Jul 29, 2026
bd78ac8
Merge TWS computation into LISFLOODv5
fuchsiger Jul 29, 2026
97de718
Fix Typo
fuchsiger Jul 30, 2026
d505222
Load Lakes and Res Extent Maps only when active
fuchsiger Jul 30, 2026
4bf2c31
Update Doc
fuchsiger Jul 30, 2026
47e241a
Update Docs
fuchsiger Jul 30, 2026
75e37d0
print also TWS tss via repStateUpsGauges
fuchsiger Jul 30, 2026
bca2ed9
Update invalid res/lakes
fuchsiger Aug 6, 2026
a28ed71
Updated TWS output filename to TotalWS to avoid confusion with old on…
doc78 Sep 1, 2026
fe56453
fix to waterstorage and result test
doc78 Sep 3, 2026
249c1a8
Added LakeExtent and ReservoirExtent in reference xml file
doc78 Sep 3, 2026
48136f7
Fix UT ReportedTSS
doc78 Sep 3, 2026
e3483f2
added computation of repTWS option from repStorage and repTWSMaps, to…
doc78 Sep 4, 2026
b2dc46c
Removed leftover lines from old TWS implementation.
doc78 Sep 8, 2026
957d33c
Removed unused scalar import
doc78 Sep 8, 2026
f3aaf4e
Merge branch 'development' into feature/tws_merge
doc78 Sep 8, 2026
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ lisflood_model.egg-info
.vscode/
*.ipynb
.ipynb_checkpoints/
tws_integration_master_diff.md
implementation_guide_scale_offset_packing.md
lisflood_optimization_report.md
lisflood_optimization_report_v2.md
# version file auto-generated by setuptools_scm (do not track)
src/lisflood/_version.py
src/lisflood/_version.py
34 changes: 32 additions & 2 deletions docs/4_Static-Maps_reservoirs-lakes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Lakes and reservoirs can be defined as a significant volume of water, which occu

The modelling of lakes and reservoirs requires three maps and a set of txt files.

For the generation of total water storage output (option `repTWSMaps`), two additional maps are needed to distribute the storage mass over the extent of the lakes/reservoirs (see [Lake and reservoir extent maps](#lake-and-reservoir-extent-maps) below).


## Lake mask map

Expand All @@ -20,7 +22,7 @@ The lake mask map represents the area covered by lakes and reservoirs, it is use
| :---| :--- | :--- | :--- |
|Global Lakes and Wetlands Database (GLWD): <br>Large Lake Polygons (Level 1) |[GLWD leve1](https://www.worldwildlife.org/publications/global-lakes-and-wetlands-database-large-lake-polygons-level-1)|2004|Global, 1:1 to 1:3 million resolution|
|Global Lakes and Wetlands Database (GLWD): <br>Small Lake Polygons (Level 2) |[GLWD leve1](https://www.worldwildlife.org/publications/global-lakes-and-wetlands-database-large-lake-polygons-level-2)|2004|Global, 1:1 to 1:3 million resolution|
|Fraction of inland water| It can be prepared by using<br> the methodology explained [here](../4_Static-Maps_land-use#land-use)|NA|Global|
|Fraction of inland water| It can be prepared by using<br> the methodology explained [here](../4_Static-Maps_land-use#land-use/index.md)|NA|Global|

### Methodology

Expand Down Expand Up @@ -146,4 +148,32 @@ Finally, lake average inflow can be retrieved from observed time series (where a
Lake maps and tables of the European 1arcmin domain and global 3arcmin domain are based on information from [HydroLAKES](https://www.hydrosheds.org/products/hydrolakes): waterbodies classified in HydroLakes as natural lake were considered for inclusion into the lakes dataset.
Lakes included in the European 1arcmin domain had a minimum volume of 10 hm3, a minimum lake surface area of 5 km2, a minimum upstream catchment area of 50 km2.
Lakes included in the global 3arcmin domain had a minimum volume of 100 hm3, a minimum lake surface area of 50 km2, a minimum upstream catchment area of 250 km2.
Lake outlet width was generally measured with GIS tools; lake average inflow was computed using OS LISFLOOD CEMS EFAS and CEMS GloFAS discharge reanalysis (GloFASv4 reanalysis for GloFASv5 tables; EFASv5 naturalized flow for EFASv6 tables).
Lake outlet width was generally measured with GIS tools; lake average inflow was computed using OS LISFLOOD CEMS EFAS and CEMS GloFAS discharge reanalysis (GloFASv4 reanalysis for GloFASv5 tables; EFASv5 naturalized flow for EFASv6 tables).


## Lake and reservoir extent maps

The lake and reservoir modules output lake/reservoir levels at the outlet locations (output files `lakeh.nc` for locations in `lakes.nc` and `res.nc`). For the generation of total water storage maps (option `repTWSMaps`), these levels have to be converted to mass changes and spatially distributed over the extent of the lakes/reservoirs. For this, two additional maps are needed that contain the lake/reservoir ID for each pixel belonging to the area covered by the respective lake/reservoir.

### General map information

| Map/table name | File name; type | Units; range | Description |
| :--- | :--- | :--- | :--- |
| Lake extent | lake_extent.nc; <br>Type: Float32 | Units: -; <br>Range: integer ID number to identify each lake | Lake ID (ID of outflow location) for each pixel belonging to the surface extent of the lake |
| Reservoir extent | res_extent.nc; <br>Type: Float32 | Units: -; <br>Range: integer ID number to identify each reservoir | Reservoir ID (ID of outflow location) for each pixel belonging to the surface extent of the reservoir |

### Methodology

The creation of the lake extent map requires:

1. Lake outflow location with unique lake identifier (e.g., `lakes.nc`)
2. External local or global dataset containing the vectorized polygons of the lake outlines (e.g., in shapefile format), such as [HydroLAKES](https://www.hydrosheds.org/products/hydrolakes), as well as the surface area of the lake
3. Table relating the unique lake identifier of OS LISFLOOD to the lake identifier in the external data set

The creation of a raster file fulfilling the criteria for a consistent lake extent map (e.g., lakes with an area smaller than the grid cell size must not be neglected; lakes assigned to only one grid cell must not be overwritten by other lakes) is not straight forward, thus a standard rasterize command is not appropriate. A dedicated script should loop over each lake defined in the outlet location file and perform the following actions:

- If the total lake area is too small in comparison to the grid cell area (e.g., smaller than 5% of the cell area), the outlet location pixel is set as the lake extent.
- Otherwise, the corresponding polygon from the shapefile is intersected with the grid cells and each grid cell containing a fraction of the lake extent is checked. If the lake covers a sufficiently large fraction (e.g., more than 7%) of the grid cell, it is assigned the lake ID, else it is neglected.
- If no intersection fraction is large enough (e.g., if the lake is very thin but long), the outlet location pixel is set as the lake extent.

The creation of the reservoir extent map can be done analogously to the lake extent map using the same methodology.
9 changes: 6 additions & 3 deletions docs/5_annex_output-files/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ To speed up the pre-run and to prevent that results are taken from the pre-run,
| storage in lower groundwater zone | repLZMaps | $mm$ | LZMaps | lz |
| number of days since last rain | repDSLRMaps | $days$ | DSLRMaps <br> DSLRForestMaps | dslr <br> dslF |
| frost index | repFrostIndexMaps | $\frac{°C}{days}$ | FrostIndexMaps | frost |
| Total Water Storage | repTotalWaterStorageMaps | $mm$ | TotalWaterStorageMaps | tws |
| Total Water Storage | repTWSMaps | $m$ | TWSMaps | TotalWS |
| Individual Water Storage Compartments | repStorageMaps | $m$ | LakeSMaps <br> RiverSMaps <br> SoilSMaps <br> GWSMaps <br> SnowSMaps <br> CumSMaps | Lakestor <br> Riverstor <br> Soilstor <br> GWstor <br> Snowstor <br> Cumstor |
| Flow Momentum | repFlowMomMaps | $\frac{kgm}{s}$ | FlowMomMaps | FlowMomentum |
| **RATE VARIABLES** | | | | |
| rain (excluding snow) | repRainMaps | $\frac{mm}{timestep}$ | RainMaps | rain |
| snow | repSnowMaps | $\frac{mm}{timestep}$ | SnowMaps | snow |
Expand Down Expand Up @@ -181,8 +183,9 @@ The users should be aware that some state maps are generated only if the relevan

**Note**

Some cumulative storages and volumes are computed internally by LISFLOOD. Some relevant example is described below:
- Total Water Storage is the total water volume stored in channels, lakes, reservoirs, snow cover, sealed surfaces depressions, surface runoff, canopy interception, upper and lower groundwater zones.
Some cumulative storages and volumes are computed internally by LISFLOOD. Some relevant examples are described below:
- Total Water Storage is the total water mass (expressed in equivalent water height) stored in channels, lakes, reservoirs, all soil layers, snow cover, sealed surfaces depressions, surface runoff, canopy interception, uppper and lower groundwater zones. Using the option "repStorageMaps" outputs the individual storage compartments (Rivers, Lakes/Reservoirs, Soil, Groundwater, Snow, Interception storage) which add up to TWS ("repTWSMaps"). For the computation of mass stored in lakes and reservoirs (i.e. "simulateLakes" and/or "simulateReservoirs" is set to 1), the initial LISFLOOD output of lake levels centered at the outlet location are distributed over the actual extents of the lakes/reservoirs, which requires two additional input maps when using the options "repTWSMaps" and "repStorageMaps" (see [Reservoirs and lakes](../4_Static-Maps_reservoirs-lakes/)).
- Flow Momentum is the product of flow velocity and river mass, which is needed for special applications, e.g. the computation of Earth rotation excitation functions.
- Surface runoff is the sum of direct runoff (from sealed and water fractions) and runoff generated by the pervious land cover fractions (forest, irrigation, other).
- Total runoff is the sum of surface runoff and sub-surface runoff. Sub-surface runoff is the outflow from upper and lower groundwater zones.

Expand Down
4 changes: 4 additions & 0 deletions src/lisflood/Lisflood_dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ def splitlanduse(array1, array2=None, array3=None):
# Calculate water level
self.waterlevel_module.dynamic()

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Calculate water storage
self.waterstorage_module.dynamic()

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

# ************************************************************
Expand Down
3 changes: 3 additions & 0 deletions src/lisflood/Lisflood_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
from .hydrological_modules.opensealed import opensealed
from .hydrological_modules.waterbalance import waterbalance
from .hydrological_modules.waterlevel import waterlevel
from .hydrological_modules.waterstorage import waterstorage
from .hydrological_modules.structures import structures

from .global_modules.output import outputTssMap
Expand Down Expand Up @@ -150,6 +151,7 @@ def __init__(self):
self.opensealed_module = opensealed(self)
self.waterbalance_module = waterbalance(self)
self.waterlevel_module = waterlevel(self)
self.waterstorage_module = waterstorage(self)
self.structures_module = structures(self)

self.prescribed_vegetation = self.epic_settings.prescribed_vegetation
Expand Down Expand Up @@ -208,6 +210,7 @@ def __init__(self):
self.reservoir_module.initial()
self.lakes_module.initial()
self.polder_module.initial()
self.waterstorage_module.initial()

self.transmission_module.initial()

Expand Down
Loading
Loading