UU-Hydro / PCR-GLOBWB_model

PCR-GLOBWB (PCRaster Global Water Balance) is a large-scale hydrological model intended for global to regional studies and developed at the Department of Physical Geography, Utrecht University (Netherlands). Contact: Edwin Sutanudjaja (E.H.Sutanudjaja@uu.nl).
GNU General Public License v3.0
116 stars 79 forks source link

Waterbody discharge reporting bugfix #27

Closed BramDr closed 8 months ago

BramDr commented 8 months ago

There is a bug in the reporting of the waterbody discharge in PCR-GLOBWB.

PCR-GLOBWB currently reports the waterbody discharge as the maximum discharge over the waterbody (see routing.py line 1188). However, during the routing, waterbody outflow is actually spread over the whole waterbody area (see routing.py line 1161). For larger waterbodies this means that the waterbody outflow may not actually leave the waterbody and is instead outflow transported within the waterbody. This also means this water never actually leaves the waterbody, but is assimilated into the waterbody storage the next timestep (see routing.py line 1120).

While it might be considered to change this in the future (as it is incorrect), this also means that taking the maximum discharge over the waterbody is not indicative of the waterbody outflow. Especially in cases where the ldd converges inside a large waterbody. Therefore: waterbody_inflow - waterbody_outflow != waterbody_storage_change (I have calculated this). Note this is only the case in the PCR-GLOBWB output, internally waterbody discharge is fine.

The change that I made now only reports the discharge at the waterbody outflow point as the waterbody discharge, and a simple water-balance check confirmed that now waterbody_inflow - waterbody_outflow == waterbody_storage_change.