Next: List processing, Previous: Dates processing, Up: Setting the timeLoop
The range processing mode of timeLoop creates a loop beginning
on a given date and ending on a second given date. All defined dates
and times between the two dates are processed. This can be useful
for generation of a mean state over multiple days, months, or years.
Note that the date/time components (year, month, day, hour, and fcst)
are identical to those for the dates processing mode
(see for details) but that all should be
defined only with start/end values since lists are nonsensical in
this context.
For example, if you wished to loop over all 6-hourly periods from
20 March 2001 to 14 July 2004 (for whatever reason), then you
could implement the following call to timeLoop.
timer => timeLoop('range',fileType,startYear=2001,endYear=2004, &
startMonth=3,endMonth=7,startDay=20,endDay=14,startHour=0, &
endHour=23,incHour=6)
Note that the end time does not need to be present in the dataset - if it is not, then valid time up to the end time will be treated. Now suppose that you want to loop over all 12-hour times in January 2004.
timer => timeLoop('range',fileType,startYear=2004,startMonth=1, &
startDay=1,endDay=31,startHour=0,endHour=23,incHour=12)
Note that the end values of each variable default to the start values if they are not provided. This shorthand makes it quicker to define short ranges as above.