NOAA-OWP / wres

Code and scripts for the Water Resources Evaluation Service
Other
2 stars 1 forks source link

As a user, I want any seasonal constraints associated with the verification statistics to be described in the statistical output #193

Open epag opened 2 months ago

epag commented 2 months ago

Author Name: James (James) Original Redmine Issue: 54907, https://vlab.noaa.gov/redmine/issues/54907 Original Date: 2018-09-11


Expected behavior:

In keeping with #44996, all required metadata should be propagated through the system, in order to inform users about the genesis of the statistics they are interpreting.

This includes information about seasonal constraints applied to the verification pairs.

Seasonal constraints take the form of a repeating time interval along the lines of "pool together all pairs between this start monthday and this end monthday from all years within this time interval."

The ISO8601 standard provides a description of a repeating time interval (according to Wikipedia: https://en.wikipedia.org/wiki/ISO_8601):

Repeating intervals Repeating intervals are specified in clause "4.5 Recurring time interval". They are formed by adding "R[n]/" to the beginning of an interval expression, where R is used as the letter itself and [n] is replaced by the number of repetitions. Leaving out the value for [n] means an unbounded number of repetitions. If the interval specifies the start (forms 1 and 2 above), then this is the start of the repeating interval. If the interval specifies the end but not the start (form 3 above), then this is the end of the repeating interval. For example, to repeat the interval of "P1Y2M10DT2H30M" five times starting at "2008-03-01T13:00:00Z", use "R5/2008-03-01T13:00:00Z/P1Y2M10DT2H30M".

This ticket will be resolved when information about seasonal constraints is included in the following output types:

Communication of these constraints to users need not (probably will not) follow the ISO8601 standard, which is somewhat difficult to unpack, although it would ideally leverage this standard internally.

Actual behavior:

As described in the discussion in #44544 (particularly #44544-77), information about seasonal constraints is not propagated through the system currently. Thus, without looking at the project configuration alongside the verification statistics, the user cannot know that a seasonal constraint was applied.

Implementation notes:

Constraints on datetimes are described in the @TimeWindow@ metadata. As noted in the @TimeWindow@ metadata:

 * TODO: If a future JDK implements something equivalent to an Interval in joda.time, consider replacing the 
 * earliest time and latest time with an Interval.

In the absence of a time interval concept in java.time, it may be difficult to efficiently describe a repeating time interval, such as a pool that includes several instances of one season (i.e. one per calendar year).


Redmine related issue(s): 44544


epag commented 2 months ago

Original Redmine Comment Author Name: James (James) Original Date: 2018-09-11T12:47:33Z


Some useful discussion here:

https://stackoverflow.com/questions/15977637/iso-8601-time-interval-parsing-in-java

epag commented 2 months ago

Original Redmine Comment Author Name: Jesse (Jesse) Original Date: 2018-09-27T20:12:54Z


Found https://github.com/ThreeTen/threeten-extra via https://stackoverflow.com/questions/22150722/is-there-a-class-in-java-time-comparable-to-the-joda-time-interval/22152890#22152890