Rescue corrupt IDL .sav files to NetCDF or HDF5
One should generally save data in open formats like netCDF4 or HDF5 instead of proprietary formats. An exception to this is with real-time instrument data acquisition that saves the raw data at high speed to binary files, which can be converted offline to open formats.
IDL .sav` files are a proprietary data format that can be read from Python:
from scipy.io import readsav
data = readsav('mydata.sav')datadict()of IDL variables.
Example: I wrote a one-off IDL script to convert from IDL .sav to netCDF4:
sav2nc.pro.
I also have Python code there to convert from IDL .sav to HDF5.
I successfully submitted a
patch to SciPy
to fix some IDL .sav reading issues.