Hi Josh,
Its quite possible to alter the code to count water at an exit in the middleif for example it drains into nodata cells. This would require some hardcoding of the relevant parts to account for where these cells are. The issue with doing this in the past is where people want to know how much is flowing past a point – and then have that flow carrying on – eg a gauge mid way through a basin – this is harder.
At the end of erodedepo() is this bit of code that tots up the water going to the edge cells.
// work out water coming out..
// and zero water depths in edges..
//
// this doesnt actually zero water - sets it to the min water depth
// If this is not done, then zero'd water depth prevents material being moved to the edge cells and thus eroded fromthe catchment
// leading to buildups of sediment at the edge.
double temptot = 0;
for (y = 1; y <= ymax; y++)
{
if (water_depth[xmax, y] > water_depth_erosion_threshold)
{
temptot += (water_depth[xmax, y] - water_depth_erosion_threshold) * DX * DX / local_time_factor;
// and zero water depths at RH end
water_depth[xmax, y] = water_depth_erosion_threshold;
}
if (water_depth[1, y] > water_depth_erosion_threshold)
{
temptot += (water_depth[1, y] - water_depth_erosion_threshold) * DX * DX / local_time_factor;
// and zero water depths at RH end
water_depth[1, y] = water_depth_erosion_threshold;
}
}
for (int x = 1; x <= xmax; x++)
{
if (water_depth[x, 1] > water_depth_erosion_threshold)
{
temptot += (water_depth[x, 1] - water_depth_erosion_threshold) * DX * DX / local_time_factor;
// and zero water depths at RH end
water_depth[x, 1] = water_depth_erosion_threshold;
}
if (water_depth[x, ymax] > water_depth_erosion_threshold)
{
temptot += (water_depth[x, ymax] - water_depth_erosion_threshold) * DX * DX / local_time_factor;
// and zero water depths at RH end
water_depth[x, ymax] = water_depth_erosion_threshold;
}
}
waterOut = temptot;
If – for example, your drainage points are a cell (with an eleveation value – not nodata) are at 99,99 you could replace all of this with
double temptot = 0;
if (water_depth[99, 99] > water_depth_erosion_threshold)
{
temptot += (water_depth[99, 99] - water_depth_erosion_threshold) * DX * DX / local_time_factor;
// and zero water depths at RH end
water_depth[99, 99] = water_depth_erosion_threshold;
}
waterOut = temptot;
If you have more than one cell where water drains into you’d have to replicate this with similar statements for those cells
double temptot = 0;
if (water_depth[99, 99] > water_depth_erosion_threshold)
{
temptot += (water_depth[99, 99] - water_depth_erosion_threshold) * DX * DX / local_time_factor;
// and zero water depths at RH end
water_depth[99, 99] = water_depth_erosion_threshold;
}
if (water_depth[100, 99] > water_depth_erosion_threshold)
{
temptot += (water_depth[100, 99] - water_depth_erosion_threshold) * DX * DX / local_time_factor;
// and zero water depths at RH end
water_depth[100, 99] = water_depth_erosion_threshold;
}
waterOut = temptot;
--
You received this message because you are subscribed to the Google Groups "caesar-lisflood" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caesar-lisflo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caesar-lisflood/53ad0e72-6caf-4555-9f13-53fa5dade07bn%40googlegroups.com.