python - 使用 eccodes/grib 时如何解决此 AttributeError?
问题描述
我在 macOS 上使用 cfgrib,当我尝试将隐蔽的 grib 文件用于 xarray 时出现以下错误:
AttributeError: module 'pyeccodes.compat' has no attribute 'codes_grib_multi_support_off'
这是我到目前为止的代码:
import xarray as xr
import matplotlib.pyplot as plt
import matplotlib.style as sty
sty.use('classic')
import numpy as np
import cartopy.crs as ccrs
d7 = xr.open_dataset('2007_BLH.grib', engine='cfgrib')
我已经下载了所有似乎需要的东西,包括 eccodes、pyeccodes、cfgrib。我该如何解决这个问题?
解决方案
使用包管理器安装 ecCodes 二进制文件,请参阅:https ://github.com/ecmwf/cfgrib#binary-dependencies 。
推荐阅读
- r - ggplot2的操纵()滑块功能不起作用
- python - 未找到“”的反向。- 姜戈
- unity3d - 子弹没有以固定速度增加力量?如何在 2D 中正确地从左右两侧独立拍摄?
- python-3.x - Python 非阻塞服务器
- reactjs - React中控制反转的困惑
- spring-boot - 基本身份验证不适用于 POST 端点
- javascript - 默认隐藏表格行 - 按钮显示?
- java - 我有 5 个按钮我想更改 mediaPlayer 源 fonClick 的按钮怎么做?
- c# - 从下载字符串获取信息后,如何将文本框中的数据拆分为多行?
- postgresql - 如何自动将多个表从一个模式移动到 PostgreSQL 中的另一个模式?