我有一个python脚本,它绘制了位势高度的等值线图-
nc_f = './hgt_500_2014_12_5_00Z.nc' # Your filename
nc_fid = dataset(nc_f, 'r')
lats = nc_fid.variables['lat'][:] # extract/copy the data
lons = nc_fid.variables['lon'][:]
time = nc_fid.variables['time'][:]
hgt = nc_fid.variables['hgt'][:] # shape is time, lat, lon as shown above
x, y = np.meshgrid(lons, lats,copy=False)
rbf = scipy.interpolate.Rbf(x, y, hgt, function='linear')
zi = rbf(x, y)
plt.contour(x,y,zi)
plt.show()
我想把这片土地与海岸线和国家叠加起来。 我试过这样做,但这给了我海岸线和国家,但地球位高度等值线却不见了
^{pr2}$
你的密码完全坏了。看看hgt数据的例子:
结果:
相关问题 更多 >
编程相关推荐