You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the manual:
"Error of the numerical solution can be analyzed using the error raster map (the resulting water depth is an average, and err is its RMSE)."
In effect, error is identical to water depth for one simulation block and error is larger than water depth for more simulation blocks. According to the code, water depth does not seem to be some average and error is no root mean square error (RMSE). Unfortunately, there is not a lot of documentation in the code to understand what the purpose of this error map should be.
To reproduce
Run rsim.water with a small number of walkers to make sure only one simulation block is needed, then increase the number of walkers such that several simulation blocks are needed. Compare water depth to water error for the two different settings and the error maps of the two different settings.
Expected behavior
The error map supposedly being an RMSE should in most cases be smaller than the water depth. With more simulation blocks, RMSE should become smaller, not larger.
Describe the bug
From the manual:
"Error of the numerical solution can be analyzed using the error raster map (the resulting water depth is an average, and err is its RMSE)."
However, water depth is
pow(gama[i][j], 3. / 5.);
at https://github.com/OSGeo/grass/blob/main/raster/r.sim/simlib/output.c#L218 withgama[i][j]
being the sum of walker weights over a simulation block.The error output is
gammas[i][j]
at https://github.com/OSGeo/grass/blob/main/raster/r.sim/simlib/output.c#L246 withgamma
being the sum of reduced water depths (walker weights) per simulation block:gammas[k][l] += pow(gama[k][l] * (double)conn, 3. / 5.);
at https://github.com/OSGeo/grass/blob/main/raster/r.sim/simlib/hydro.c#L482In effect, error is identical to water depth for one simulation block and error is larger than water depth for more simulation blocks. According to the code, water depth does not seem to be some average and error is no root mean square error (RMSE). Unfortunately, there is not a lot of documentation in the code to understand what the purpose of this error map should be.
To reproduce
Run
rsim.water
with a small number of walkers to make sure only one simulation block is needed, then increase the number of walkers such that several simulation blocks are needed. Compare water depth to water error for the two different settings and the error maps of the two different settings.Expected behavior
The error map supposedly being an RMSE should in most cases be smaller than the water depth. With more simulation blocks, RMSE should become smaller, not larger.
Screenshots
System description
The text was updated successfully, but these errors were encountered: