【发布时间】:2017-07-08 19:17:09
【问题描述】:
我正在使用 URL 从 opendap 服务器(数据的子集)打开 netcdf 数据。当我打开它时,数据(据我所见)在请求变量之前并未实际加载。我想将数据保存到磁盘上的文件中,我该怎么做?
我目前有:
import numpy as np
import netCDF4 as NC
url = u'http://etc/etc/hourly?varname[0:1:10][0:1:30]'
set = NC.Dataset(url) # I think data is not yet loaded here, only the "layout"
varData = set.variables['varname'][:,:] # I think data is loaded here
# now i want to save this data to a file (for example test.nc), set.close() obviously wont work
希望有人能帮忙,谢谢!
【问题讨论】: