diff --git a/agrolib/snow/snowMaps.cpp b/agrolib/snow/snowMaps.cpp index f938fe7b9..050c1beab 100644 --- a/agrolib/snow/snowMaps.cpp +++ b/agrolib/snow/snowMaps.cpp @@ -105,7 +105,7 @@ void Crit3DSnowMaps::initializeSnowMaps(const gis::Crit3DRasterGrid &dtm, double } -void Crit3DSnowMaps::updateMap(Crit3DSnow &snowPoint, int row, int col) +void Crit3DSnowMaps::updateMapRowCol(Crit3DSnow &snowPoint, int row, int col) { _snowWaterEquivalentMap->value[row][col] = float(snowPoint.getSnowWaterEquivalent()); _iceContentMap->value[row][col] = float(snowPoint.getIceContent()); @@ -122,6 +122,23 @@ void Crit3DSnowMaps::updateMap(Crit3DSnow &snowPoint, int row, int col) } +void Crit3DSnowMaps::flagMapRowCol(int row, int col) +{ + _snowWaterEquivalentMap->value[row][col] = _snowWaterEquivalentMap->header->flag; + _iceContentMap->value[row][col] = _iceContentMap->header->flag; + _liquidWaterContentMap->value[row][col] = _liquidWaterContentMap->header->flag; + _internalEnergyMap->value[row][col] = _internalEnergyMap->header->flag; + _surfaceEnergyMap->value[row][col] = _surfaceEnergyMap->header->flag; + _snowSurfaceTempMap->value[row][col] = _snowSurfaceTempMap->header->flag; + _ageOfSnowMap->value[row][col] = _ageOfSnowMap->header->flag; + + _snowFallMap->value[row][col] = _snowFallMap->header->flag; + _snowMeltMap->value[row][col] = _snowMeltMap->header->flag; + _sensibleHeatMap->value[row][col] = _sensibleHeatMap->header->flag; + _latentHeatMap->value[row][col] = _latentHeatMap->header->flag; +} + + void Crit3DSnowMaps::updateRangeMaps() { gis::updateMinMaxRasterGrid(_snowWaterEquivalentMap); diff --git a/agrolib/snow/snowMaps.h b/agrolib/snow/snowMaps.h index 8696400d4..bcc5e729c 100644 --- a/agrolib/snow/snowMaps.h +++ b/agrolib/snow/snowMaps.h @@ -20,7 +20,9 @@ void initializeSnowMaps(const gis::Crit3DRasterGrid &dtm, double skinThickness); void resetSnowModel(double skinThickness); - void updateMap(Crit3DSnow &snowPoint, int row, int col); + void updateMapRowCol(Crit3DSnow &snowPoint, int row, int col); + void flagMapRowCol(int row, int col); + void setPoint(Crit3DSnow &snowPoint, int row, int col); void updateRangeMaps(); diff --git a/bin/CRITERIA3D/criteria3DProject.cpp b/bin/CRITERIA3D/criteria3DProject.cpp index b7c73a285..c425b4ef1 100644 --- a/bin/CRITERIA3D/criteria3DProject.cpp +++ b/bin/CRITERIA3D/criteria3DProject.cpp @@ -993,7 +993,7 @@ void Crit3DProject::computeSnowPoint(int row, int col) snowModel.computeSnowBrooksModel(); - snowMaps.updateMap(snowModel, row, col); + snowMaps.updateMapRowCol(snowModel, row, col); } @@ -1047,8 +1047,13 @@ bool Crit3DProject::computeSnowModel() { computeSnowPoint(row, col); } + else + { + snowMaps.flagMapRowCol(row, col); + } } } + snowMaps.updateRangeMaps(); }