From June 06th, all CI Jobs will run on federated Helmholtz infrastructure by default. If you need UFZ-internal resources, add the tag "ufz-internal" to your CI configuration or use a custom GitLab Runner (e.g. EVE). If you have any questions, feel free to contact us!

Curious to learn more about GitLab CI? Join this free course on 14-16 June. Register now

Commit b5c15fdf authored by Johannes Leins's avatar Johannes Leins
Browse files

fixed distance calc for clim interpol: distances >= size returned 0 resulting...

fixed distance calc for clim interpol: distances >= size returned 0 resulting in zero weight as well
parent 1caaba59
Pipeline #22292 passed with stage
in 27 seconds
......@@ -259,9 +259,9 @@ CSVHandlerGrassland::CSVHandlerGrassland(string filename, bool climInterpolate,
* Constants::STRAIN_FACTOR_GRASSLAND_Y
- Constants::OFFSET_GRASSLAND_Y;
float distGrasslandToX = abs(xCoord.second - centerInterpolClimX);
distGrasslandToX = distGrasslandToX > sizeX ? sizeX : distGrasslandToX;
distGrasslandToX = distGrasslandToX >= sizeX ? sizeX - 1 : distGrasslandToX;
float distGrasslandToY = abs(yCoord.second - centerInterpolClimY);
distGrasslandToY = distGrasslandToY > sizeY ? sizeY : distGrasslandToY;
distGrasslandToY = distGrasslandToY >= sizeY ? sizeY - 1 : distGrasslandToY;
float area = (sizeX - distGrasslandToX) * (sizeY - distGrasslandToY);
interpolFactByClimCoord[pairClimCoordInterpolRatio.first] = area;
totalArea += area;
......
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