Re-enable caching of preparation results.
Fix an issue where dates was a different length to discharge data.

dates runs from 2008-12-31 to 2011-01-31, but discharge data
only runs up to 2010-12-31. So slice dates so as it's same length
for doing calibration/application.