Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomei committed Mar 20, 2024
1 parent 851caf9 commit 13f26be
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
3 changes: 2 additions & 1 deletion bin/CRITERIA3D/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1010,10 +1010,11 @@ void MainWindow::redrawMeteoPoints(visualizationType myType, bool updateColorSCa

this->ui->actionView_PointsCurrentVariable->setChecked(true);
// quality control
std::string errorStdStr;
checkData(myProject.quality, currentVar,
myProject.meteoPoints, myProject.nrMeteoPoints, myProject.getCrit3DCurrentTime(),
&(myProject.qualityInterpolationSettings), myProject.meteoSettings,
&(myProject.climateParameters), myProject.checkSpatialQuality);
&(myProject.climateParameters), myProject.checkSpatialQuality, errorStdStr);

if (updateColorSCale)
{
Expand Down
30 changes: 18 additions & 12 deletions bin/VINE3D/atmosphere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,30 +216,36 @@ bool vine3DInterpolationDemRadiation(Vine3DProject* myProject, const Crit3DTime&
return false;
}

std::string errorStdStr;
if (! checkAndPassDataToInterpolation(&(myProject->qualityParameters), atmTransmissivity, myProject->meteoPoints, myProject->nrMeteoPoints, myCrit3DTime,
&(myProject->qualityInterpolationSettings), &(myProject->interpolationSettings),
myProject->meteoSettings, &(myProject->climateParameters),
interpolationPoints, true))
interpolationPoints, true, errorStdStr))
{
myProject->errorString = "Function vine3DInterpolationDemRadiation: no transmissivity data available";
myProject->errorString = "Function vine3DInterpolationDemRadiation: missing transmissivity data.";
return false;
}

if (preInterpolation(interpolationPoints, &(myProject->interpolationSettings),
if (! preInterpolation(interpolationPoints, &(myProject->interpolationSettings),
myProject->meteoSettings, &(myProject->climateParameters),
myProject->meteoPoints, myProject->nrMeteoPoints, atmTransmissivity, myCrit3DTime))
if (! interpolationRaster(interpolationPoints, &(myProject->interpolationSettings),
myProject->meteoSettings, myProject->radiationMaps->transmissivityMap,
myProject->DEM, atmTransmissivity))
{
myProject->errorString = "Function vine3DInterpolationDemRadiation: error interpolating transmissivity";
return false;
}
myProject->meteoPoints, myProject->nrMeteoPoints, atmTransmissivity, myCrit3DTime, errorStdStr))
{
myProject->errorString = "error in preInterpolation:" + QString::fromStdString(errorStdStr);
return false;
}

if (! interpolationRaster(interpolationPoints, &(myProject->interpolationSettings),
myProject->meteoSettings, myProject->radiationMaps->transmissivityMap,
myProject->DEM, atmTransmissivity))
{
myProject->errorString = "Error in interpolating transmissivity.";
return false;
}

if (radiation::computeRadiationDEM(&(myProject->radSettings), myProject->DEM, myProject->radiationMaps, myCrit3DTime))
myResult = setRadiationScale(myProject->radiationMaps->globalRadiationMap->colorScale);
else
myProject->errorString = "Function vine3DInterpolationDemRadiation: error computing irradiance";
myProject->errorString = "Error in computing irradiance.";

return myResult;
}
Expand Down
3 changes: 2 additions & 1 deletion bin/VINE3D/mainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,11 @@ void MainWindow::redrawMeteoPoints(visualizationType myType, bool updateColorSCa
this->ui->actionShowPointsVariable->setChecked(true);

// quality control
std::string errorStdStr;
checkData(myProject.quality, myProject.getCurrentVariable(),
myProject.meteoPoints, myProject.nrMeteoPoints, myProject.getCrit3DCurrentTime(),
&myProject.qualityInterpolationSettings, myProject.meteoSettings,
&(myProject.climateParameters), myProject.checkSpatialQuality);
&(myProject.climateParameters), myProject.checkSpatialQuality, errorStdStr);

if (updateColorSCale)
{
Expand Down

0 comments on commit 13f26be

Please sign in to comment.