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..
@durack1 ok I've pulled your version accross and ran it as is. The 
output is fine for the first 4 models. I got a memory error for MIROC4h. 
I will try with 12 months instead of 24 to see what happens. If you 
could run MIROC4h for 24 months, do you have the output somewhere I 
could look at ?


On 31/10/14 04:40, Paul J. Durack wrote:
>
> In binDensity.py:
>
> > @@ -549,10 +560,12 @@ def densityBin(fileT,fileS,fileFx,outFile,debug=True,timeint='all',mthout=False)
> >          thetao  = mv.reshape(thetao,(tcdel, depthN, lonN*latN))
> >          so      = mv.reshape(so    ,(tcdel, depthN, lonN*latN))
> >          rhon    = mv.reshape(rhon  ,(tcdel, depthN, lonN*latN))
> > -        print thetao.shape
> > +        print 'thetao.shape:',thetao.shape
> >          if debug:
> >              print ' thetao :',thetao.data[0,:,ijtest]
>
> These lines are mask unaware (thetao.data[0]) and aware (thetao[0]) 
> respectively - the output from these is printed to the screen to 
> ensure that masked values are property reallocated to real 1e20 numbers
>
> â
> Reply to this email directly or view it on GitHub 
> <https://github.com/eguil/Density_bining/pull/22/files#r19650824>.
>

-- 
Eric Guilyardi
IPSL/LOCEAN - Dir. Rech. CNRS
Tour 45, 4eme, piece 406
UPMC, case 100
4 place Jussieu, F-75252 Paris
Tel: +33 (0)1 44 27 70 76 	Prof. Eric Guilyardi
NCAS Climate
Meteorology Department
University of Reading
Reading RG6 6BB - UK
Tel: +44 (0)118 378 8315

                 http://ncas-climate.nerc.ac.uk/~ericg