Preprocessors are applied to individual time series files in order to return mean CAM fields with centered time coordinates.
The main steps in preprocessing are:
Extract a time slice of size “nlead”
Create a lead time coordinate “L” that is an integer sequence
Swap “time” with “L” so that L becomes a shared coordinate to aggregate data over, while “time” becomes a data variable that will now have a “Y” dimension (hindcast start time)
Extract only the chosen “field” from the data file (together with the new “time” variable)
Chunk to include all “L” values (which all come from a single NetCDF file)
The default preprocessor is described in data_access.preprocessor().
However, the preprocessor can be adapted for a number of cases, such as to return a seasonal mean field or POP SST. A few examples of different kinds of preprocessors are available on the tutorial page.