Skip to content
Snippets Groups Projects

Ny server 2019

Merged Tor-Einar Skog requested to merge Ny_server_2019 into develop
9 files
+ 46
50
Compare changes
  • Side-by-side
  • Inline
Files
9
@@ -19,8 +19,6 @@
@@ -19,8 +19,6 @@
package no.nibio.vips.model.deliaradicummodel;
package no.nibio.vips.model.deliaradicummodel;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.io.IOException;
import java.text.DecimalFormat;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.ArrayList;
@@ -288,9 +286,7 @@ public class DeliaRadicumModel extends I18nImpl implements Model{
@@ -288,9 +286,7 @@ public class DeliaRadicumModel extends I18nImpl implements Model{
this.TJM10 = new ArrayList<>();
this.TJM10 = new ArrayList<>();
// Init data matrix
// Init data matrix
this.dataMatrix = new DeliaRadicumModelDataMatrix();
this.dataMatrix = new DeliaRadicumModelDataMatrix();
ObjectMapper mapper = new ObjectMapper();
// Setting timezone
// Setting timezone
this.timeZone = TimeZone.getTimeZone((String) config.getConfigParameter("timeZone"));
this.timeZone = TimeZone.getTimeZone((String) config.getConfigParameter("timeZone"));
//System.out.println("TimeZone=" + this.timeZone);
//System.out.println("TimeZone=" + this.timeZone);
@@ -298,7 +294,7 @@ public class DeliaRadicumModel extends I18nImpl implements Model{
@@ -298,7 +294,7 @@ public class DeliaRadicumModel 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())
Loading