WSL/SLF GitLab Repository

Commit 61df964f authored by Mathias Bavay's avatar Mathias Bavay
Browse files

When using Winstral with precipitation AND exclusively positive temperatures,...

When using Winstral with precipitation AND exclusively positive temperatures, the deposition mass was zero and was leading to an arithmetic error
parent eaad9300
......@@ -745,7 +745,10 @@ void Interpol2D::Winstral(const DEMObject& dem, const Grid2DObject& TA, const do
sum_deposition += deposited;
}
}
//no cells can take the eroded mass or no cells even got freezing temperatures
if (sum_deposition==0 || sum_erosion==0) return;
//deposition: garantee mass balance conservation
//-> we now have the proper scaling factor so we can deposit in individual cells
const double ratio = sum_erosion/sum_deposition;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment