WSL/SLF GitLab Repository

Commit e95001fc authored by Mathias Bavay's avatar Mathias Bavay
Browse files

In the precipSnow spatial algorithm, one of the original steps was missing:...

In the precipSnow spatial algorithm, one of the original steps was missing: setting the mean back to its original level.
parent 26f720a0
......@@ -1011,7 +1011,13 @@ void SnowHNWInterpolation::calculate(const DEMObject& dem, Grid2DObject& grid)
mi.interpolate(date, dem, MeteoData::TA, ta);
//slope/curvature correction for solid precipitation
const double orig_mean = grid.grid2D.getMean();
Interpol2D::PrecipSnow(dem, ta, grid);
//HACK: correction for precipitation sum over the whole domain
//this is a cheap/crappy way of compensating for the spatial redistribution of snow on the slopes
const double new_mean = grid.grid2D.getMean();
if(new_mean!=0.) grid *= orig_mean/new_mean;
//Interpol2D::SteepSlopeRedistribution(dem, ta, grid);
//Interpol2D::CurvatureCorrection(dem, ta, grid);
}
......
Markdown is supported
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