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

Merge branch 'DOWNCASTMO_shorttime_forecast' into 'develop'

Use only short time forecasts for DOWNCASTMO

See merge request !180
parents f65a710c 22a46456
No related branches found
No related tags found
1 merge request!180Use only short time forecasts for DOWNCASTMO
......@@ -24,6 +24,9 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.stream.Collectors;
import com.ibm.icu.util.Calendar;
import no.nibio.vips.entity.ModelConfiguration;
import no.nibio.vips.entity.WeatherObservation;
import no.nibio.vips.logic.entity.ForecastConfiguration;
......@@ -38,7 +41,7 @@ import no.nibio.vips.util.weather.WeatherDataSourceException;
import no.nibio.vips.util.weather.WeatherDataSourceUtil;
/**
* @copyright 2016 <a href="http://www.nibio.no/">NIBIO</a>
* @copyright 2016-2024 <a href="http://www.nibio.no/">NIBIO</a>
* @author Tor-Einar Skog <tor-einar.skog@nibio.no>
*/
public class DOWNCASTModelPreprocessor extends ModelRunPreprocessor{
......@@ -49,6 +52,14 @@ public class DOWNCASTModelPreprocessor extends ModelRunPreprocessor{
PointOfInterestWeatherStation weatherStation = (PointOfInterestWeatherStation) configuration.getWeatherStationPointOfInterestId();
WeatherDataSourceUtil wdsUtil = new WeatherDataSourceUtil();
WeatherUtil wUtil = new WeatherUtil();
// We use only short-time forecasts, as the model is very sensitive
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DATE,3);
if(cal.getTime().before(configuration.getDateEnd()))
{
configuration.setDateEnd(cal.getTime());
}
List<WeatherObservation> observations;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment