我正在尝试使用https://unidata.github.io/MetPy/latest/examples/Four_Panel_Map.html#sphx-glr-download-examples-four-panel-map-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:\Users\fedec\PycharmProjects\met2\venv\lib\site-packages\xarray\backends\api.py", line 480, in open_dataset
engine = plugins.guess_engine(filename_or_obj)
File "C:\Users\fedec\PycharmProjects\met2\venv\lib\site-packages\xarray\backends\plugins.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 install "xarrayio“pip install "xarraycomplete”,但是我得到了相同的ValueError。Python版本3.8有什么想法吗?提前感谢!Fede
发布于 2021-05-27 06:14:34
这个特定的数据文件是netCDF-4格式的,zarr或scipy都不支持这种格式。我很惊讶安装xarray[io]或xarray[complete]并没有解决这个问题。正在尝试手动执行pip install netcdf4。
(如果这不起作用,请在此处注释,并使用新错误更新上面的回溯。)
https://stackoverflow.com/questions/67697344
复制相似问题