我是使用 python 绘制和检查 wx 数据的新手。我从这个例子开始,850 hPa 温度平流,它在这个声明中失败了。
ncss = NCSS('{}{dt:%Y%m}/{dt:%Y%m%d}/gfsanl_4_{dt:%Y%m%d}_'
'{dt:%H}00_000.grb2'.format(base_url, dt=dt))
这给了我 jupyter notebook 中的以下错误。似乎与XML有关。自创建此示例以来,所使用文件的数据结构可能已更改。任何帮助,将不胜感激。
Traceback (most recent call last):
File "C:\users\martbar\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3326, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-18-1457913792bc>", line 7, in <module>
'{dt:%H}00_000.grb2'.format(base_url, dt=dt))
File "C:\users\martbar\anaconda3\lib\site-packages\siphon\http_util.py", line 379, in __init__
self._get_metadata()
File "C:\users\martbar\anaconda3\lib\site-packages\siphon\ncss.py", line 58, in _get_metadata
root = ET.fromstring(meta_xml)
File "C:\users\martbar\anaconda3\lib\xml\etree\ElementTree.py", line 1316, in XML
return parser.close()
File "<string>", line unknown
ParseError: no element found: line 1, column 0