参考资料:https://stackoverflow.com/questions/47608101/indexerror-too-many-indices-for-array-when-plot-winds-netcdf/47617374#47617374
在提取nc数据时候,一定要注意lon,lat的维度
例如lon为180x360中的360,lat为180x360中的180
lon = data[‘lon’]
lat = data[‘lat’]
注意提取出来的维度,若均为两维
那么在使用basemap投影画图时,仅需
m = Basemap()
x1,y1=m(lon,lat)
若lon为一维,长度为360;lat为一维,长度为180
那么使用basemap投影画图时,需要
m=Basemap()
x1,y1 = m(*np.meshgrid(lon,lat))
否则就会出现 too many indices 的错误。