[MITgcm-support] Converting mdsio output to netcdf, or reading mdsio in python

Ryan Abernathey rpa at MIT.EDU
Thu Oct 25 12:07:58 EDT 2012


Hi Andrea,

You have 3 options:
- Simply read the mds files into python using np.fromfile (they are  
just raw binary data)
- Use Oliver Jahn's MITgcm python utils package, which contains a  
python mdsio and many other useful scripts (Oliver, is this publicly  
available yet?)
- Upgrade your code to the latest version of layers, which now does  
output via the diagnostics package and therefore should support netcdf  
format. (Disclaimer: I have not tested netcdf output, but maybe Gael  
has?)

Personally, I actually prefer mds output. The main reason is that  
netcdf does not support singleCPUio and consequently produces a  
ridiculous amount of output files that then have to be glued together  
in a separate step.

Best,
Ryan


On Oct 25, 2012, at 6:26 AM, cimatori wrote:

> Hi everybody,
> I have a technical issue which is probably rather common. I am using  
> layers package to compute the stream function in density, but layers  
> package can produce output only in the meta/data format.  
> Unfortunately, I have no matlab available, and all my scripts are  
> based on netcdf format. Is there a way convert meta/data to netcdf?  
> Is there an easy way to read meta/data files in python?
> I do have access to octave (an open source version of matlab) if  
> that can help.
> Many thanks,
>
> -- 
>
> Andrea Cimatoribus
> Royal Netherlands Meteorological Institute
> www.knmi.nl/~cimatori
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list