Skip to content

Commit

Permalink
update 3D
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomei committed Jul 30, 2024
1 parent cd58fa2 commit e2ecde6
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 24 deletions.
Binary file modified DATA/PROJECT/VINE3D_test/DATA/crop_test.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ time_zone=1
is_utc=true

[project]
name=vine3d_test
name=Monteleone
dem=./DEM/DEM_test.flt
meteo_points=./METEOPOINT/test_meteopoints.db
soil_db=./SOIL/test_soil.db
soil_map=./GEO/soil_map.flt
landuse_map=./GEO/land_units.flt
db_vine3d=./DATA/fields.db

# VINE3D
vine3d_db=./DATA/fields.db
# CRITERIA3D
crop_db=./DATA/crop_test.db

[settings]
parameters_file=./SETTINGS/parameters.ini
log_file=./log/test.txt

soil_depth=1.0
compute_diseases=false
29 changes: 14 additions & 15 deletions bin/CRITERIA3D/CRITERIA3D.pro
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,22 @@ CONFIG(debug, debug|release) {
}


HEADERS += \
shared/project3D.h \
shared/dialogWaterFluxesSettings.h \
dialogModelProcesses.h \
mainwindow.h \
criteria3DProject.h \
dialogLoadState.h \
dialogSnowSettings.h \
geometry.h \
glWidget.h \
viewer3D.h

SOURCES += \
dialogModelProcesses.cpp \
dialogWaterFluxesSettings.cpp \
shared/project3D.cpp \
shared/dialogWaterFluxesSettings.cpp \
dialogModelProcesses.cpp \
mainwindow.cpp \
criteria3DProject.cpp \
dialogLoadState.cpp \
Expand All @@ -98,19 +110,6 @@ SOURCES += \
viewer3D.cpp


HEADERS += \
dialogModelProcesses.h \
dialogWaterFluxesSettings.h \
shared/project3D.h \
mainwindow.h \
criteria3DProject.h \
dialogLoadState.h \
dialogSnowSettings.h \
geometry.h \
glWidget.h \
viewer3D.h


FORMS += mainwindow.ui

DISTFILES += \
Expand Down
3 changes: 3 additions & 0 deletions bin/CRITERIA3D/criteria3DProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ bool Crit3DProject::runModelHour(const QString& hourlyOutputPath, bool isRestart
{
if (! interpolateAndSaveHourlyMeteo(globalIrradiance, myDateTime, hourlyOutputPath, isSaveOutputRaster()))
return false;

qApp->processEvents();
}

Expand Down Expand Up @@ -1044,6 +1045,8 @@ bool Crit3DProject::runModelHour(const QString& hourlyOutputPath, bool isRestart
}

runWaterFluxes3DModel(3600, isRestart);

qApp->processEvents();
}

// soil heat
Expand Down
File renamed without changes.
7 changes: 4 additions & 3 deletions bin/CRITERIA3D/shared/project3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,10 @@ bool Project3D::loadProject3DSettings()

projectSettings->endGroup();

// OUTPUT VARIABLES (optional)
QList<QString> depthList;
// output variables (optional)
projectSettings->beginGroup("output");

depthList = projectSettings->value("waterContent").toStringList();
QList<QString> depthList = projectSettings->value("waterContent").toStringList();
if (! setVariableDepth(depthList, waterContentDepth))
{
errorString = "Wrong water content depth in the settings file: " + projectSettings->fileName();
Expand All @@ -285,6 +284,8 @@ bool Project3D::loadProject3DSettings()
errorString = "Wrong factor of safety depth in the settings file: " + projectSettings->fileName();
}

projectSettings->endGroup();

return true;
}

Expand Down
7 changes: 7 additions & 0 deletions bin/VINE3D/mainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -729,3 +729,10 @@ void MainWindow::on_actionShow_model_cases_map_triggered()
}
}



void MainWindow::on_actionCriteria3D_settings_triggered()
{

}

2 changes: 2 additions & 0 deletions bin/VINE3D/mainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@

void on_actionShow_model_cases_map_triggered();

void on_actionCriteria3D_settings_triggered();

protected:
/*!
* \brief mouseReleaseEvent call moveCenter
Expand Down
4 changes: 2 additions & 2 deletions bin/VINE3D/mainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,7 @@
<second>0</second>
<year>1752</year>
<month>10</month>
<day>13</day>
<day>12</day>
</datetime>
</property>
<property name="maximumDate">
Expand Down Expand Up @@ -2507,7 +2507,7 @@
</action>
<action name="actionVine3D_InitializeWaterBalance">
<property name="text">
<string>Initialize 3D</string>
<string>Initialize</string>
</property>
</action>
<action name="actionShow_boundary">
Expand Down
4 changes: 2 additions & 2 deletions bin/VINE3D/vine3DProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void Vine3DProject::loadVine3DSettings()
{
projectSettings->beginGroup("project");

dbVine3DFileName = projectSettings->value("db_vine3d").toString();
dbVine3DFileName = projectSettings->value("vine3d_db").toString();

projectSettings->endGroup();

Expand All @@ -94,7 +94,7 @@ bool Vine3DProject::openVine3DDatabase(QString fileName)
{
if (fileName == "")
{
errorString = "VINE3D database fileName missing.\nSet the 'db_vine3d' field in the .ini settings file.";
errorString = "VINE3D database fileName missing.\nSet the 'vine3d_db' field in the .ini settings file.";
return false;
}

Expand Down

0 comments on commit e2ecde6

Please sign in to comment.