我正在尝试学习/理解如何使用OpeNDAP / THREDDS来查看声压级和风速之间是否存在相关性。到目前为止,我已经能够访问风速数据的位置,如下所示:
import netCDF4
url = 'https://www.ncei.noaa.gov/thredds/dodsC/uv/daily/2000s/uv20181009rt.nc'
dataset = netCDF4.Dataset(url)
time = dataset.variables['time']
lat = dataset.variables['lat']
print(dataset.variables.keys())
print(time,lat)
哪个给我这个结果:
odict_keys(['time', 'zlev', 'lat', 'lon', 'u', 'v', 'w'])
<class 'netCDF4._netCDF4.Variable'>
int32 time(time)
long_name: Center Time of the Data
units: hours since 1978-01-01 00:00:00
unlimited dimensions:
current shape = (1,)
filling off
<class 'netCDF4._netCDF4.Variable'>
float32 lat(lat)
long_name: latitude
units: degrees_north
grids: uniform grids from -89.75 to 89.75 by 0.25
unlimited dimensions:
current shape = (719,)
filling off
我的问题如下:
我的最终目标是能够在程序中输入时间,纬度和经度,并接收风速输出,希望以后可以与声压级数据相关联。
预先感谢您的帮助/建议。