Skip to content

Commit

Permalink
Merge commit '45d4102d1db0a578efb8fa2d921e9b13fefbd5c2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomei committed Feb 5, 2024
2 parents 507fcb7 + 45d4102 commit 9cb699f
Showing 1 changed file with 2 additions and 48 deletions.
50 changes: 2 additions & 48 deletions agrolib/homogeneityWidget/homogeneityWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ void Crit3DHomogeneityWidget::plotAnnualSeries()
QDate endDate(QDate(lastYear, 12, 31));
int numberOfDays = meteoPointsNearDistanceList[0].obsDataD[0].date.daysTo(getCrit3DDate(endDate))+1;
meteoPointTemp.initializeObsDataD(numberOfDays, meteoPointsNearDistanceList[0].obsDataD[0].date);
meteoPointTemp.initializeObsDataDFromMp(meteoPointsNearDistanceList[0].nrObsDataDaysD, meteoPointsNearDistanceList[0].obsDataD[0].date, meteoPointsNearDistanceList[0]);
meteoPointTemp.initializeObsDataDFromMp(numberOfDays, meteoPointsNearDistanceList[0].obsDataD[0].date, meteoPointsNearDistanceList[0]);

if (idPointsJointed.size() != 1 && (lastDateCopyed < lastDate || yearsMissing))
{
// mancano dei dati, controllare joint stations
Expand Down Expand Up @@ -425,53 +426,6 @@ void Crit3DHomogeneityWidget::plotAnnualSeries()
validYears = computeAnnualSeriesOnPointFromDaily(&myError, meteoPointsDbHandler, nullptr,
&meteoPointTemp, &clima, false, isAnomaly, meteoSettings, myAnnualSeries, vectorYears, dataAlreadyLoaded);
}


/*
if (idPointsJointed.size() == 1 || lastDateCopyed >= lastDate)
{
// no joint station inside date interval
// meteoPointTemp should be init
meteoPointTemp.nrObsDataDaysD = 0;
dataAlreadyLoaded = false;
}
else
{
QDate endDate(QDate(lastYear, 12, 31));
int numberOfDays = meteoPointsNearDistanceList[0].obsDataD[0].date.daysTo(getCrit3DDate(endDate))+1;
meteoPointTemp.initializeObsDataD(numberOfDays, meteoPointsNearDistanceList[0].obsDataD[0].date);
meteoPointTemp.initializeObsDataDFromMp(meteoPointsNearDistanceList[0].nrObsDataDaysD, meteoPointsNearDistanceList[0].obsDataD[0].date, meteoPointsNearDistanceList[0]);
if (lastDateCopyed < lastDate)
{
for (int i = 1; i<idPointsJointed.size(); i++)
{
QDate lastDateNew = meteoPointsDbHandler->getLastDate(daily, idPointsJointed[i]).date();
if (lastDateNew > lastDateCopyed)
{
int indexMp;
for (int j = 0; j<meteoPointsNearDistanceList.size(); j++)
{
if (meteoPointsNearDistanceList[j].id == idPointsJointed[i])
{
indexMp = j;
break;
}
}
for (QDate myDate=lastDateCopyed.addDays(1); myDate<=lastDateNew; myDate=myDate.addDays(1))
{
setMpValues(meteoPointsNearDistanceList[indexMp], &meteoPointTemp, myDate, myVar, meteoSettings);
}
}
lastDateCopyed = lastDateNew;
}
}
dataAlreadyLoaded = true;
}
std::vector<int> vectorYears;
int validYears = computeAnnualSeriesOnPointFromDaily(&myError, meteoPointsDbHandler, nullptr,
&meteoPointTemp, &clima, false, isAnomaly, meteoSettings, myAnnualSeries, vectorYears, dataAlreadyLoaded);
*/
formInfo.close();

if (validYears > 0)
Expand Down

0 comments on commit 9cb699f

Please sign in to comment.