## Statistical window concept for ECMWF
# either instantaneous data or processing is specified by mars stream
###############
# 1043 | mnth #
# 1092 | swmm #
# 1122 | eefo #
# 1221 | msmm #
# 1224 | mmsa #
# 1257 | sttd #
# 1258 | stte #
###############
# this is for one loop grib2 data
'none'  = {stream=1092; numberOfTimeRanges=1; true=is_one_of(indicatorOfUnitForTimeRange,1,2,3);}
'none'  = {stream=1043; numberOfTimeRanges=1; true=is_one_of(indicatorOfUnitForTimeRange,1,2,3);}
'none'  = {stream=1224; numberOfTimeRanges=1; true=is_one_of(indicatorOfUnitForTimeRange,1,2,3);}
'none'  = {stream=1221; numberOfTimeRanges=1; true=is_one_of(indicatorOfUnitForTimeRange,1,2,3);}
'none'  = {stream=1257; numberOfTimeRanges=1; true=is_one_of(indicatorOfUnitForTimeRange,1,2,3);}
'none'  = {stream=1258; numberOfTimeRanges=1; true=is_one_of(indicatorOfUnitForTimeRange,1,2,3);}
# special rules for weekly extended-range (sub-seasonal) products, types
################
# 47 | taem    #
# 48 | taes    #
# 80 | fcmean  #
# 81 | fcmax   #
# 82 | fcmin   #
# 83 | fcstdev #
################
#'none'  = {marsStream=1122; numberOfTimeRanges=1; true=is_one_of(marsType,47,48,80,81,82,83);}
'none'  = {marsStream=1122; numberOfTimeRanges=1; true=is_one_of(type,'fcmean','fcmax','fcmin','fcstdev','taem','taes');}
## accumulations
# 24 hourly time unit
'24h'  = {typeOfStatisticalProcessing=1; indicatorOfUnitForTimeRange=1; lengthOfTimeRange=24; class=1; stream=1035; type=30;}
# special rule for accumulations in streams efhs / eehs, type cd
###########
# 32 | cd #
###########
'24h'  = {typeOfStatisticalProcessing=1; indicatorOfUnitForTimeRange=1; lengthOfTimeRange=24;  class=1; stream=1040; type=32;}
'72h'  = {typeOfStatisticalProcessing=1; indicatorOfUnitForTimeRange=1; lengthOfTimeRange=72;  class=1; stream=1040; type=32;}
'120h' = {typeOfStatisticalProcessing=1; indicatorOfUnitForTimeRange=1; lengthOfTimeRange=120; class=1; stream=1040; type=32;}
'168h' = {typeOfStatisticalProcessing=1; indicatorOfUnitForTimeRange=1; lengthOfTimeRange=168; class=1; stream=1040; type=32;}
'168h' = {typeOfStatisticalProcessing=1; indicatorOfUnitForTimeRange=1; lengthOfTimeRange=168; class=1; stream=1121; type=32;}
'240h' = {typeOfStatisticalProcessing=1; indicatorOfUnitForTimeRange=1; lengthOfTimeRange=240; class=1; stream=1040; type=32;}
'360h' = {typeOfStatisticalProcessing=1; indicatorOfUnitForTimeRange=1; lengthOfTimeRange=360; class=1; stream=1040; type=32;}
## 7 days rolling accumulation
'7 days' = {typeOfStatisticalProcessing=1; indicatorOfUnitForTimeRange=1; lengthOfTimeRange=168; marsType=32;}
 ## 7 days rolling accumulation
'7 days' = {typeOfStatisticalProcessing=1; indicatorOfUnitForTimeRange=1; lengthOfTimeRange = 168; marsType=32;}
