Matching time ranges¶
Some time range matchers use time unit suffixes. Here is a table with their meaning:
s: secondsm: minutesh: hoursd: daysmo: monthsy: years
When unit suffixes are used, all time values are normalised to either seconds or months, according to what is appropriate. This means it is possible to use seconds to match a time range expressed in hours, or to use years to match a time range expressed in months, but it is not possible to use months to match a time range expressed in days, because months have a variable number of days.
GRIB1¶
Syntax: timerange:GRIB1,type,p1,p2
Any of type, p1, or p2 can be omitted; if omitted, any value will match.
p1 and p2 must have a time unit suffix (any of s,m,h,d,mo,y) unless they
are 0.
Examples¶
Given timerange GRIB1(0, 6h) (6-hours forecast)
timerange:GRIB1,0matchestimerange:GRIB1,0,6hmatchestimerange:GRIB1,0,360mmatchestimerange:GRIB1,0,21600smatchestimerange:GRIB1,1does not matchtimerange:GRIB1,0,6mdoes not match
Given timerange GRIB1(2, 6h, 12h) (valid between reftime+6h and reftime+12h):
timerange:GRIB1,2matchestimerange:GRIB1,2,6h,12hmatchestimerange:GRIB1,2,6hmatches (partial match also works)timerange:GRIB1,1does not matchtimerange:GRIB1,2,6m,12mdoes not match
GRIB2¶
Syntax: timerange:GRIB2,type,unit,p1,p2
Any of type, unit, p1 or p2 can be omitted; if omitted, any value will match.
Unit is given explicitly and p1,p2 do not use suffixes.
Examples¶
Given timerange GRIB2(0, 1, 6h, 0h) (6-hours forecast):
timerange:GRIB2,0matchestimerange:GRIB2,0,1,6matchestimerange:GRIB2,0,1,6,0matchestimerange:GRIB2,1does not matchtimerange:GRIB2,0,1,5does not matchtimerange:GRIB2,0,2,6does not matchtimerange:GRIB2,0,0,360does not match
Timedef¶
Syntax: timerange:Timedef,fcstep,proctype,proclen
fcstepis the forecast stepproctypeis the type of statistical processing (use-for data with no statistical processing)proclenis the time duration the interval for statistical processing
Any of fcstep, proctype, proclen can be omitted; if omitted, any value
will match.
Examples¶
Given timerange Timedef(6h) (6-hours forecast):
timerange:Timedef,6hmatches
Given timerange Timedef(6h, 0, 3h) (6-hours forecast, average over 3 hours):
timerange:Timedef,6h,0,3hmatches: 6hours forecast, average over 3 hourstimerange:Timedef,,0,3hmatches: all averages over 3 hourstimerange:Timedef,3hdoes not matchtimerange:Timedef,,1,3hdoes not match
BUFR¶
Syntax: timerange:BUFR,val
val can be omitted; if omitted, any value will match.
val must have a time unit suffix (any of s,m,h,d,mo,y) unless it is 0.
Examples¶
Given timerange BUFR(6h) (6-hours forecast):
timerange:BUFRmatchestimerange:BUFR,6hmatchestimerange:BUFR,360mmatchestimerange:BUFR,21600smatchestimerange:BUFR,0does not matchtimerange:BUFR,6mdoes not match