diff --git a/DATA/PROJECT/Montue/DATA/crop_Montue.db b/DATA/PROJECT/Montue/DATA/crop_Montue.db index 61d3d9085..f44f7f542 100644 Binary files a/DATA/PROJECT/Montue/DATA/crop_Montue.db and b/DATA/PROJECT/Montue/DATA/crop_Montue.db differ diff --git a/agrolib/gis/color.cpp b/agrolib/gis/color.cpp index d93682b65..ca8224ffd 100644 --- a/agrolib/gis/color.cpp +++ b/agrolib/gis/color.cpp @@ -177,6 +177,19 @@ bool setDTMScale(Crit3DColorScale* myScale) } +bool setLAIScale(Crit3DColorScale* myScale) +{ + myScale->initialize(4, 256); + + myScale->keyColor[0] = Crit3DColor(150, 75, 0); /*!< brown */ + myScale->keyColor[1] = Crit3DColor(200, 150, 0); /*!< yellow */ + myScale->keyColor[2] = Crit3DColor(32, 150, 32); /*!< dark green */ + myScale->keyColor[3] = Crit3DColor(0, 255, 0); /*!< green */ + + return(myScale->classify()); +} + + bool setTemperatureScale(Crit3DColorScale* myScale) { myScale->initialize(5, 256); diff --git a/agrolib/gis/color.h b/agrolib/gis/color.h index e10c3f0ac..65bfd5715 100644 --- a/agrolib/gis/color.h +++ b/agrolib/gis/color.h @@ -67,6 +67,7 @@ bool setGrayScale(Crit3DColorScale* myScale); bool setBlackScale(Crit3DColorScale* myScale); bool setSurfaceWaterScale(Crit3DColorScale* myScale); + bool setLAIScale(Crit3DColorScale* myScale); #endif // CRIT3DCOLOR_H diff --git a/agrolib/meteo/meteo.cpp b/agrolib/meteo/meteo.cpp index 4f40a872a..854aeba02 100644 --- a/agrolib/meteo/meteo.cpp +++ b/agrolib/meteo/meteo.cpp @@ -770,6 +770,7 @@ bool setColorScale(meteoVariable variable, Crit3DColorScale *colorScale) case dailyAirTemperatureMin: case dailyAirTemperatureRange: case airDewTemperature: case snowSurfaceTemperature: + case dailyHeatingDegreeDays: setTemperatureScale(colorScale); break; case elaboration: @@ -803,6 +804,9 @@ bool setColorScale(meteoVariable variable, Crit3DColorScale *colorScale) case atmPressure: setWindIntensityScale(colorScale); break; + case leafAreaIndex: + setLAIScale(colorScale); + break; case anomaly: setAnomalyScale(colorScale); break; @@ -912,6 +916,10 @@ std::string getVariableString(meteoVariable myVar) return "Sensible heat (kJ m-2)"; else if (myVar == latentHeat) return "Latent heat (kJ m-2)"; + else if (myVar == dailyHeatingDegreeDays) + return "Heating degree days (°D)"; + else if (myVar == leafAreaIndex) + return "Leaf area index (m2 m-2)"; else if (myVar == noMeteoTerrain) return "Elevation (m)"; diff --git a/agrolib/meteo/meteo.h b/agrolib/meteo/meteo.h index 3cadbda0c..433333b7e 100644 --- a/agrolib/meteo/meteo.h +++ b/agrolib/meteo/meteo.h @@ -100,7 +100,7 @@ dailyBIC, monthlyBIC, dailyHeatingDegreeDays, dailyCoolingDegreeDays, snowWaterEquivalent, snowFall, snowSurfaceTemperature, snowInternalEnergy, snowSurfaceEnergy, snowAge, snowLiquidWaterContent, snowMelt, sensibleHeat, latentHeat, - dailyWaterTableDepth, + dailyWaterTableDepth, leafAreaIndex, anomaly, elaboration, noMeteoTerrain, noMeteoVar}; diff --git a/bin/CRITERIA3D/mainwindow.cpp b/bin/CRITERIA3D/mainwindow.cpp index e64c11b9e..57a781ce8 100644 --- a/bin/CRITERIA3D/mainwindow.cpp +++ b/bin/CRITERIA3D/mainwindow.cpp @@ -1502,8 +1502,7 @@ void MainWindow::on_actiondegree_days_triggered() return; } - // TODO add variable - setOutputMeteoVariable(airTemperature, &(myProject.degreeDaysMap)); + setOutputMeteoVariable(dailyHeatingDegreeDays, &(myProject.degreeDaysMap)); } @@ -1515,8 +1514,7 @@ void MainWindow::on_actionView_Crop_LAI_triggered() return; } - // TODO add variable - setOutputMeteoVariable(airTemperature, &(myProject.laiMap)); + setOutputMeteoVariable(leafAreaIndex, &(myProject.laiMap)); }