Forums

import netCDF @ pythonanywhere

http://en.wikipedia.org/wiki/NetCDF

Could anybody point me to a python module capable of reading netCDF files (*.nc) importable here. I've checked a lot, but either they need to be compiled, have c libs or are just a mess. On the other hand there might be a chance it's already (battery-) included and I missed it.

Many thanks,

--noiv

I was so close....

from scipy.io import netcdf

f = netcdf.netcdf_file('test.nc', 'r')
print f.history
time = f.variables['time']
print time.units
print time.shape
print time[:]
f.close()

it just works!