grib2 ファイルを読み込もうとしていますが、ファイルに問題があるのか、それとも読み込もうとしている方法に問題があるのかわかりません。
ファイルはここから抽出されます(ここからダウンロードしたのではなく、ここから取得した同僚のフォルダーからコピーしたため、実際には同じファイルである必要があります...しかし、挿入しようとしましたftp アドレスと同じエラーが発生しました)。
疲れたpygrib
grbs = pygrib.open('pgbf2016060100.01.2016053100.grib2')
このエラーが発生します:
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
<ipython-input-20-674763ffdd1f> in <module>()
----> 1 grbs = pygrib.open('pgbf2016060100.01.2016053100.grib2')
pygrib.pyx in pygrib.open.__cinit__ (pygrib.c:2772)()
IOError: [Errno could not open %s] pgbf2016060100.01.2016053100.grib2
私は試したxarray
ds = xr.open_dataset("pgbf2016060100.01.2016053100.grb2",engine='pynio')
そして、私はこのエラーが発生します
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/software/centos6/x86_64/canopy-1.5.2/Canopy_64bit/User/lib/python2.7/site- packages/IPython/core/interactiveshell.pyc in run_code(self, code_obj, result)
3081 if result is not None:
3082 result.error_in_exec = sys.exc_info()[1]
-> 3083 self.showtraceback()
3084 else:
3085 outflag = 0
/software/centos6/x86_64/canopy-1.5.2/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in showtraceback(self, exc_tuple, filename, tb_offset, exception_only)
1858 return
1859
-> 1860 if issubclass(etype, SyntaxError):
1861 # Though this won't be called by syntax errors in the input
1862 # line, there may be SyntaxError cases with imported code.
TypeError: issubclass() arg 1 must be a class
直接やってみたNIO
f = nio.open_file("pgbf2016060100.01.2016053100.grb2")
からのものと同じエラーが発生しますxarray
。
なにか提案を?