我的环境:window7 32bit anaconda spyder。
这是我的脚本,
from netCDF4 import Dataset
import matplotlib.pyplot as plt
import scipy.io as sio
s = 'http://tds.hycom.org/thredds/dodsC/GLBu0.08/expt_19.1/2012/3hrly'
f = Dataset(s, 'r')
v = f.variables
u = v['water_u'][0:1, 0:1, 1413:1651, 3838:4034]
u_xy = u[0,0,:,:]
sio.savemat('savemat.mat', {'mat_u': u})
loadmat_u = sio.loadmat('savemat.mat')['mat_u']
mat_u_xy = loadmat_u[0,0,:,:]
plt.figure(1)
plt.imshow(u_xy)
plt.colorbar()
plt.figure(2)
plt.imshow(mat_u_xy)
plt.colorbar()
figure(1)
和figure(2)
彼此不同。我觉得有些事
错误scipy.io.savemat
数字: