fix 19 - Code tweaks to get running on cm5 historical

@eguil this code, based off your branch we were working on today successfully runs across the 5 model test case (ACCESS1-0, BNU-ESM, EC-EARTH, IPSL-CM5A-LR and MIROC4h). I'm a little uncertain about the results from MIROC4h for example, the masking may still be an issue with this (and potentially other) models..

Let me know if this looks good and you can merge my changes, make any final tweaks you want and then let me know when you pull your changes back across and get this running..

I've left all the commented code tidyup to you, as it might be insightful as to how I was trying to test this to get it running..