从在线NETCDF时间表中提取值,而无需下载整个文件
我在Python& GDAL(专门为此踩在我的R-World之外),因此,如果您需要更多的东西来使此可再现或更清楚,请告诉我!
我正在尝试从几个NETCDF文件中提取时间序列数据,而不必下载整个文件。我知道gdallocationinfo
可以为下载.nc
文件,但是/vsicurl/
(这是访问此处访问在线文件的唯一方法案例)与.nc
文件无法使用。
In the end I'd like to have something like this
gdallocationinfo -wgs84 -valonly "/vsicurl/https://os.zhdk.cloud.switch.ch/envicloud/chelsa/chelsa_V2/GLOBAL/monthly/cmi/CHELSA_cmi_01_1981_V.2.1.tif" 14.27585 48.9335
that will work for this file: https://os.zhdk.cloud.switch.ch/envicloud/chelsa/chelsa_V1/chelsa_cmip5_ts/CHELSAcmip5ts_pr_ACCESS1-3_rcp45_2030-2049_V1.1.nc
So I '希望找到一种方法来说服vsicurl
接受.nc
文件,或者完全不同的东西,无论有效!
编辑
我首先要求一种“修复”以下行的方法,但是@Robert Davy的评论清楚地表明,vsicurl
将与.nc 。 >文件,因此稍微改变了问题的重点。
gdallocationinfo -wgs84 -valonly "/vsicurl/" 14.27585 48.9335
I'm brand new in python & gdal (stepping outside of my R-world specifically for this), so if you need anything more to make this reproducible or more clear, please let me know!
I'm trying to extract time series data from several netCDF files WITHOUT having to download the whole files. I know that gdallocationinfo
can do so for downloaded .nc
files, but /vsicurl/
(which is the only way to access online files in this case) doesn't work together with .nc
files.
In the end I'd like to have something like this
gdallocationinfo -wgs84 -valonly "/vsicurl/https://os.zhdk.cloud.switch.ch/envicloud/chelsa/chelsa_V2/GLOBAL/monthly/cmi/CHELSA_cmi_01_1981_V.2.1.tif" 14.27585 48.9335
that will work for this file: https://os.zhdk.cloud.switch.ch/envicloud/chelsa/chelsa_V1/chelsa_cmip5_ts/CHELSAcmip5ts_pr_ACCESS1-3_rcp45_2030-2049_V1.1.nc
So I'm looking to find a way to either convince vsicurl
to accept the .nc
files, or something totally different, whatever works!
Edit
I was first asking for a way to "fix" the line below, but comments from @Robert Davy made it clear that the vsicurl
was going to create issues in combination with .nc
files, so slightly changed the emphasis of the question.
gdallocationinfo -wgs84 -valonly "/vsicurl/" 14.27585 48.9335
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试
其中
varname
是netcdf感兴趣的变量。但是,我认为对于
vsicurl
和netcdf
,需要满足某些条件。Try
where
varname
is the netcdf variable of interest.However, I think there are some conditions that need to be met for
vsicurl
andnetcdf
to work together.