Skip to content

Commit

Permalink
Merge in changes and improve an error message, #245.
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-brown committed Oct 23, 2024
1 parent 9dc4643 commit 04e5947
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions wres-config/src/wres/config/yaml/DeclarationUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public static Set<TimeWindow> getTimeWindows( EvaluationDeclaration declaration
TimePools referenceDatesPools = declaration.referenceDatePools();
TimePools validDatesPools = declaration.validDatePools();

Set<TimeWindow> timeWindows;
Set<TimeWindow> timeWindows = Set.of(); // Default to none

// Add the time windows generated from a declared sequence
if ( Objects.nonNull( leadDurationPools )
Expand Down Expand Up @@ -179,8 +179,9 @@ else if ( Objects.nonNull( leadDurationPools ) )
timeWindows = DeclarationUtilities.getValidDatesTimeWindows( declaration );
}
}
// One big pool
else
// One big pool if no explicitly declared time windows
else if( declaration.timeWindows()
.isEmpty() )
{
LOGGER.debug( "Building one big time window." );

Expand Down
4 changes: 2 additions & 2 deletions wres-config/src/wres/config/yaml/DeclarationValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -2218,9 +2218,9 @@ private static List<EvaluationStatusEvent> timePoolsAreValid( EvaluationDeclarat
.setStatusLevel( StatusLevel.WARN )
.setEventMessage( "The declaration contained both an explicit list of "
+ "'time_pools' and an implicitly declared sequence of "
+ "pools ("
+ "pools: "
+ generated
+ "). This is allowed and the "
+ ". This is allowed, and the "
+ "resulting pools from all sources will be added "
+ "together. If this was not intended, please adjust "
+ "your declaration." )
Expand Down

0 comments on commit 04e5947

Please sign in to comment.