我正在尝试使用https://unidata.github.io/MetPy/latest/examples/Four_Panel_Map.html#sphx-glr下载了四个面板地图py的例子来制作天气图,但我在运行这个脚本时发现了这个问题:
Traceback (most recent call last):
File "C:/Users/fedec/PycharmProjects/met2/four-panel.py", line 46, in <module>
ds = xr.open_dataset(get_test_data('gfs_output.nc', False))
File "C:UsersfedecPycharmProjectsmet2venvlibsite-packagesxarraybackendsapi.py", line 480, in open_dataset
engine = plugins.guess_engine(filename_or_obj)
File "C:UsersfedecPycharmProjectsmet2venvlibsite-packagesxarraybackendsplugins.py", line 111, in guess_engine
raise ValueError(
ValueError: did not find a match in any of xarray's currently installed IO backends ['scipy', 'zarr']. Consider explicitly selecting one of the installed backends via the ``engine`` parameter to xarray.open_dataset(), or installing additional IO dependencies:
http://xarray.pydata.org/en/stable/getting-started-guide/installing.html
http://xarray.pydata.org/en/stable/user-guide/io.html
Process finished with exit code 1
我认为我对xarray有一些问题,所以我尝试升级我的xarray,这样做:pip安装";xarray[io]";pip安装";xarray[完成]";但我得到了相同的ValueError。Python 3.8版有什么想法吗?提前感谢!Fede
该特定数据文件是netCDF-4格式的,zarr或scipy都不支持该格式。我很惊讶安装xarray[io]
或xarray[complete]
没有修复它。正在尝试手动执行pip install netcdf4
。
(如果这不起作用,请在此处进行评论,并用新错误更新上面的回溯。(