Skip to content
Snippets Groups Projects
Commit de80edda authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Modernizing weather data extraction

parent 85c88813
No related branches found
No related tags found
No related merge requests found
...@@ -250,7 +250,7 @@ public class MamestraBrassicaeModel extends I18nImpl implements Model{ ...@@ -250,7 +250,7 @@ public class MamestraBrassicaeModel extends I18nImpl implements Model{
// Importing weather data, creating collections // Importing weather data, creating collections
// Can accept both hourly and daily data // Can accept both hourly and daily data
WeatherUtil wUtil = new WeatherUtil(); WeatherUtil wUtil = new WeatherUtil();
List<WeatherObservation> observations = mapper.convertValue(config.getConfigParameter("observations"), new TypeReference<List<WeatherObservation>>(){}); List<WeatherObservation> observations = this.modelUtil.extractWeatherObservationList(config.getConfigParameter("observations"));
for(WeatherObservation o:observations) for(WeatherObservation o:observations)
{ {
switch(o.getElementMeasurementTypeId()) switch(o.getElementMeasurementTypeId())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment