From d7be3df8cdb8403bd8c4367d26892ec350b17279 Mon Sep 17 00:00:00 2001 From: James Brown <64858662+james-d-brown@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:27:08 +0000 Subject: [PATCH] Add the earliest lead duration to the name of each netcdf blob, #245. --- .../test/java/wres/systests/Scenario512.java | 2 +- .../test/java/wres/systests/Scenario650.java | 36 +++---- .../test/java/wres/systests/Scenario651.java | 18 ++-- .../test/java/wres/systests/Scenario652.java | 96 +++++++++---------- .../test/java/wres/systests/Scenario653.java | 2 +- .../test/java/wres/systests/Scenario703.java | 48 +++++----- .../writing/netcdf/NetcdfOutputWriter.java | 23 +++-- 7 files changed, 118 insertions(+), 107 deletions(-) diff --git a/systests/dist/src/test/java/wres/systests/Scenario512.java b/systests/dist/src/test/java/wres/systests/Scenario512.java index 1de1d19e2d..4d0fd0a213 100755 --- a/systests/dist/src/test/java/wres/systests/Scenario512.java +++ b/systests/dist/src/test/java/wres/systests/Scenario512.java @@ -27,7 +27,7 @@ public class Scenario512 */ private static final Set EXPECTED_FILE_NAMES = - Set.of( Path.of( "10800_SECONDS.nc" ), + Set.of( Path.of( "0-10800_SECONDS.nc" ), Path.of( "evaluation.csv.gz" ), Path.of( "evaluation.csvt" ), Path.of( "pairs.csv.gz" ), diff --git a/systests/dist/src/test/java/wres/systests/Scenario650.java b/systests/dist/src/test/java/wres/systests/Scenario650.java index 1dc9835b78..44b8f1453c 100755 --- a/systests/dist/src/test/java/wres/systests/Scenario650.java +++ b/systests/dist/src/test/java/wres/systests/Scenario650.java @@ -99,24 +99,24 @@ public class Scenario650 Path.of( "76.822586W_39.230167N_NWM_Short_Range_PEARSON_CORRELATION_COEFFICIENT.csv" ), Path.of( "76.822586W_39.230167N_NWM_Short_Range_SAMPLE_SIZE.csv" ), Path.of( "pairs.csv.gz" ), - Path.of( "NWM_Short_Range_10800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_14400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_18000_SECONDS.nc" ), - Path.of( "NWM_Short_Range_21600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_25200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_28800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_32400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_3600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_36000_SECONDS.nc" ), - Path.of( "NWM_Short_Range_39600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_43200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_46800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_50400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_54000_SECONDS.nc" ), - Path.of( "NWM_Short_Range_57600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_61200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_7200_SECONDS.nc" ) ); + Path.of( "NWM_Short_Range_10800-10800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_14400-14400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_18000-18000_SECONDS.nc" ), + Path.of( "NWM_Short_Range_21600-21600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_25200-25200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_28800-28800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_32400-32400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_3600-3600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_36000-36000_SECONDS.nc" ), + Path.of( "NWM_Short_Range_39600-39600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_43200-43200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_46800-46800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_50400-50400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_54000-54000_SECONDS.nc" ), + Path.of( "NWM_Short_Range_57600-57600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_61200-61200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_64800-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_7200-7200_SECONDS.nc" ) ); private ScenarioInformation scenarioInfo; diff --git a/systests/dist/src/test/java/wres/systests/Scenario651.java b/systests/dist/src/test/java/wres/systests/Scenario651.java index 2a3ae82fe8..031922120f 100755 --- a/systests/dist/src/test/java/wres/systests/Scenario651.java +++ b/systests/dist/src/test/java/wres/systests/Scenario651.java @@ -73,15 +73,15 @@ public class Scenario651 Path.of( "124.768875W_50.54845N_NWM_Short_Range_PEARSON_CORRELATION_COEFFICIENT.csv" ), Path.of( "124.768875W_50.54845N_NWM_Short_Range_SAMPLE_SIZE.csv" ), Path.of( "pairs.csv.gz" ), - Path.of( "NWM_Short_Range_14400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_50400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_21600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_57600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_28800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_36000_SECONDS.nc" ), - Path.of( "NWM_Short_Range_7200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_43200_SECONDS.nc" ) ); + Path.of( "NWM_Short_Range_14400-14400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_50400-50400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_21600-21600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_57600-57600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_28800-28800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_64800-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_36000-36000_SECONDS.nc" ), + Path.of( "NWM_Short_Range_7200-7200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_43200-43200_SECONDS.nc" ) ); private ScenarioInformation scenarioInfo; diff --git a/systests/dist/src/test/java/wres/systests/Scenario652.java b/systests/dist/src/test/java/wres/systests/Scenario652.java index 33c9530f4f..8e501d93d3 100755 --- a/systests/dist/src/test/java/wres/systests/Scenario652.java +++ b/systests/dist/src/test/java/wres/systests/Scenario652.java @@ -73,54 +73,54 @@ public class Scenario652 Path.of( "124.768875W_50.54845N_NWM_Short_Range_PEARSON_CORRELATION_COEFFICIENT.csv" ), Path.of( "124.768875W_50.54845N_NWM_Short_Range_SAMPLE_SIZE.csv" ), Path.of( "pairs.csv.gz" ), - Path.of( "NWM_Short_Range_20180526T040000Z_10800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T040000Z_14400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T040000Z_3600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T040000Z_7200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T080000Z_10800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T080000Z_14400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T080000Z_3600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T080000Z_7200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T120000Z_10800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T120000Z_14400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T120000Z_3600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T120000Z_7200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T160000Z_10800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T160000Z_14400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T160000Z_3600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T160000Z_7200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T200000Z_10800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T200000Z_14400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T200000Z_3600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180526T200000Z_7200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T000000Z_10800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T000000Z_14400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T000000Z_3600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T000000Z_7200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T040000Z_10800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T040000Z_14400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T040000Z_3600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T040000Z_7200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T080000Z_10800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T080000Z_14400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T080000Z_3600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T080000Z_7200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T120000Z_10800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T120000Z_14400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T120000Z_3600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T120000Z_7200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T160000Z_10800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T160000Z_14400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T160000Z_3600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T160000Z_7200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T200000Z_10800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T200000Z_14400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T200000Z_3600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180527T200000Z_7200_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180528T000000Z_10800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180528T000000Z_14400_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180528T000000Z_3600_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20180528T000000Z_7200_SECONDS.nc" ) ); + Path.of( "NWM_Short_Range_20180526T040000Z_10800-10800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T040000Z_14400-14400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T040000Z_3600-3600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T040000Z_7200-7200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T080000Z_10800-10800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T080000Z_14400-14400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T080000Z_3600-3600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T080000Z_7200-7200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T120000Z_10800-10800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T120000Z_14400-14400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T120000Z_3600-3600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T120000Z_7200-7200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T160000Z_10800-10800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T160000Z_14400-14400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T160000Z_3600-3600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T160000Z_7200-7200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T200000Z_10800-10800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T200000Z_14400-14400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T200000Z_3600-3600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180526T200000Z_7200-7200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T000000Z_10800-10800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T000000Z_14400-14400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T000000Z_3600-3600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T000000Z_7200-7200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T040000Z_10800-10800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T040000Z_14400-14400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T040000Z_3600-3600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T040000Z_7200-7200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T080000Z_10800-10800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T080000Z_14400-14400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T080000Z_3600-3600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T080000Z_7200-7200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T120000Z_10800-10800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T120000Z_14400-14400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T120000Z_3600-3600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T120000Z_7200-7200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T160000Z_10800-10800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T160000Z_14400-14400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T160000Z_3600-3600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T160000Z_7200-7200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T200000Z_10800-10800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T200000Z_14400-14400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T200000Z_3600-3600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180527T200000Z_7200-7200_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180528T000000Z_10800-10800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180528T000000Z_14400-14400_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180528T000000Z_3600-3600_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20180528T000000Z_7200-7200_SECONDS.nc" ) ); private ScenarioInformation scenarioInfo; diff --git a/systests/dist/src/test/java/wres/systests/Scenario653.java b/systests/dist/src/test/java/wres/systests/Scenario653.java index ae63d75543..7b6f4b8c45 100755 --- a/systests/dist/src/test/java/wres/systests/Scenario653.java +++ b/systests/dist/src/test/java/wres/systests/Scenario653.java @@ -97,7 +97,7 @@ public class Scenario653 Path.of( "76.822586W_39.230167N_NWM_Short_Range_PEARSON_CORRELATION_COEFFICIENT.csv" ), Path.of( "76.822586W_39.230167N_NWM_Short_Range_SAMPLE_SIZE.csv" ), Path.of( "pairs.csv.gz" ), - Path.of( "NWM_Short_Range_14400_SECONDS.nc" ) ); + Path.of( "NWM_Short_Range_0-14400_SECONDS.nc" ) ); private ScenarioInformation scenarioInfo; diff --git a/systests/dist/src/test/java/wres/systests/Scenario703.java b/systests/dist/src/test/java/wres/systests/Scenario703.java index ab07e619ce..1a2488591a 100755 --- a/systests/dist/src/test/java/wres/systests/Scenario703.java +++ b/systests/dist/src/test/java/wres/systests/Scenario703.java @@ -33,30 +33,30 @@ public class Scenario703 */ private static final Set EXPECTED_NC_FILES = - Set.of( Path.of( "NWM_Short_Range_20170808T000000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T010000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T020000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T030000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T040000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T050000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T060000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T070000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T080000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T090000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T100000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T110000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T120000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T130000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T140000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T150000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T160000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T170000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T180000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T190000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T200000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T210000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T220000Z_64800_SECONDS.nc" ), - Path.of( "NWM_Short_Range_20170808T230000Z_64800_SECONDS.nc" ) ); + Set.of( Path.of( "NWM_Short_Range_20170808T000000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T010000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T020000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T030000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T040000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T050000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T060000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T070000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T080000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T090000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T100000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T110000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T120000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T130000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T140000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T150000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T160000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T170000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T180000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T190000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T200000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T210000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T220000Z_0-64800_SECONDS.nc" ), + Path.of( "NWM_Short_Range_20170808T230000Z_0-64800_SECONDS.nc" ) ); private ScenarioInformation scenarioInfo; diff --git a/wres-writing/src/wres/writing/netcdf/NetcdfOutputWriter.java b/wres-writing/src/wres/writing/netcdf/NetcdfOutputWriter.java index adeda61a26..09190d564c 100644 --- a/wres-writing/src/wres/writing/netcdf/NetcdfOutputWriter.java +++ b/wres-writing/src/wres/writing/netcdf/NetcdfOutputWriter.java @@ -735,7 +735,8 @@ private Path getOutputPathToWriteForOneTimeWindow( Path outputDirectory, // Add latest valid time identifier (good enough for an ordered sequence of pools, not for arbitrary pools) // For backwards compatibility of file names, only qualify when valid dates pooling windows are supplied if ( Objects.nonNull( declaration.validDatePools() ) - && !timeWindow.getLatestValidTime().equals( Instant.MAX ) ) + && !timeWindow.getLatestValidTime() + .equals( Instant.MAX ) ) { String lastTime = timeWindow.getLatestValidTime().toString(); lastTime = lastTime.replace( "-", "" ) @@ -745,11 +746,21 @@ private Path getOutputPathToWriteForOneTimeWindow( Path outputDirectory, filename.add( lastTime ); } - // Format the duration with the default format - Number numericDuration = DataUtilities.durationToNumericUnits( timeWindow.getLatestLeadDuration(), - leadUnits ); - filename.add( numericDuration.toString() ); - filename.add( leadUnits.name().toUpperCase() ); + // Add the earliest lead duration as a qualifier: see GitHub issue #245 + // Format the latest lead duration with the default format + Number numericDurationLower = DataUtilities.durationToNumericUnits( timeWindow.getEarliestLeadDuration(), + leadUnits ); + + // Format the latest lead duration with the default format + Number numericDurationUpper = DataUtilities.durationToNumericUnits( timeWindow.getLatestLeadDuration(), + leadUnits ); + String leadDurationQualifier = numericDurationLower + + "-" + + numericDurationUpper; + + filename.add( leadDurationQualifier ); + filename.add( leadUnits.name() + .toUpperCase() ); String extension = ""; Outputs outputs = declaration.formats()