Notebook for sediment post-treatment: mass balance
I would like to propose a new notebook for post-treatment of TELEMAC-2D and GAIA results.
It aims at performing mass balance (input flux, output flux and bed evolution) into a polygon for suspended load and bedload. It compares the masses deduced from CUMUL BED EVOL (GAIA result) and from the integral of the fluxes at the polygon boundaries using either NCOH SEDIMENT (suspended sediment from T2D result) or SOLID DISCH (bedload sediment from GAIA result). The notebook relies on the existing test case (HYPPODROME or YEN) and uses the existing function flux_2d().
Remark: it seems that there is a mistake of unit in the notebook solid_discharge.ipynb, since it should be in kg/s and not in m3/s as SOLID DISCH is in kg/s/m and not in m3/s/m as it was in Sisyphe.
This notebook allows to show that in these cases the mass balance is not ok as it has been already mentioned in other tickets.
In particular, the HYPPODROME case with suspended load 1NCOs leads to a significant mass vanishing (-4200057 kg in the whole domain as already shown in the logfile) when integrating CUMUL BED EVOL in space while it is a closed loop (there is no problem with the bedload case 1NCOb). When looking in a polygon that covers the bump, the integral of the incoming and outgoing suspended sediment fluxes at the boundaries of the polygon leads to an excess of 1874 kg against a deficit of -4043925 kg from the CUMUL BED EVOL. With the case of bedload transport 1NCOb, there is some difference (+7195 kg from fluxes and -2043 kg from bed evolution) but the results have the same order of magnitude. Perhaps, I am wrong in my computation or in my reasoning.
In YEN case (bedload), the volume computation from CUMUL BED EVOL gives the same result in the whole domain that Bluekenue. When integrating the fluxes from SOLID DISCH XY, the results are quite different (~factor 2): 61 kg from CUMUL BED EVOL against 135 kg from SOLID DISCH XY (flux_2d) in the polygon of interest. Bluekenue gives 61 kg too by doing Integrate along a line of SOLID DISCH XY then Time series>compute integral. Contrary to previous case, the masses have the same order of magnitude.