Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSLogic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
VIPSLogic
Commits
824afa22
Commit
824afa22
authored
7 years ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Making sure Leaf W and wind speed values are within correct period
parent
c8307c64
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/NaerstadModelPreprocessor.java
+18
-12
18 additions, 12 deletions
...eduling/model/preprocessor/NaerstadModelPreprocessor.java
with
18 additions
and
12 deletions
src/main/java/no/nibio/vips/logic/scheduling/model/preprocessor/NaerstadModelPreprocessor.java
+
18
−
12
View file @
824afa22
...
@@ -191,18 +191,21 @@ public class NaerstadModelPreprocessor extends ModelRunPreprocessor{
...
@@ -191,18 +191,21 @@ public class NaerstadModelPreprocessor extends ModelRunPreprocessor{
List
<
WeatherObservation
>
FM2
=
new
ArrayList
<>();
List
<
WeatherObservation
>
FM2
=
new
ArrayList
<>();
for
(
WeatherObservation
o:
observations
)
for
(
WeatherObservation
o:
observations
)
{
{
switch
(
o
.
getElementMeasurementTypeId
()
)
if
(
o
.
getTimeMeasured
().
compareTo
(
firstTimestamp
)
>=
0
)
{
{
case
WeatherElements
.
LEAF_WETNESS
:
switch
(
o
.
getElementMeasurementTypeId
())
BT
.
add
(
o
);
{
break
;
case
WeatherElements
.
LEAF_WETNESS
:
BT
.
add
(
o
);
case
WeatherElements
.
WIND_SPEED_2M
:
break
;
FM2
.
add
(
o
);
break
;
case
WeatherElements
.
WIND_SPEED_2M
:
default
:
FM2
.
add
(
o
);
// Let it pass in silence
break
;
break
;
default
:
// Let it pass in silence
break
;
}
}
}
}
}
...
@@ -253,7 +256,10 @@ public class NaerstadModelPreprocessor extends ModelRunPreprocessor{
...
@@ -253,7 +256,10 @@ public class NaerstadModelPreprocessor extends ModelRunPreprocessor{
}
}
else
else
{
{
throw
new
ConfigValidationException
(
"Incorrect number of weather data. TM.size() = "
+
TM
.
size
()
+
", BT.size()="
+
BT
.
size
()
+
", RR.size()="
+
RR
.
size
()
);
throw
new
ConfigValidationException
(
"Incorrect number of weather data. "
+
"TM.size() = "
+
TM
.
size
()
+
" (first/last at "
+
TM
.
get
(
0
).
getTimeMeasured
()
+
"/"
+
TM
.
get
(
TM
.
size
()-
1
).
getTimeMeasured
()
+
"), "
+
"BT.size()="
+
BT
.
size
()
+
" (first/last at "
+
BT
.
get
(
0
).
getTimeMeasured
()
+
"/"
+
BT
.
get
(
BT
.
size
()-
1
).
getTimeMeasured
()
+
", "
+
"RR.size()="
+
RR
.
size
()
+
" (first/last at "
+
RR
.
get
(
0
).
getTimeMeasured
()
+
"/"
+
RR
.
get
(
RR
.
size
()-
1
).
getTimeMeasured
()
+
")"
);
}
}
}
}
List
<
WeatherObservation
>
retVal
=
new
ArrayList
<>();
List
<
WeatherObservation
>
retVal
=
new
ArrayList
<>();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment