Output exceeds the size limit. Open the full output data in a text editor---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Cell In[14], line 11
6 lats,lons=latlon_coords(ds)
7 # print(lats,lons)
8
9 ########################################设置地理坐标系投影为wrf中的投影
---> 11 cart_proj=get_cartopy(ds["T2"])
12 ax=plt.axes(projection = cart_proj)
13 print(ax)
File ~/anaconda3/lib/python3.10/site-packages/wrf/util.py:3523, in get_cartopy(var, wrfin, varname, timeidx, method, squeeze, cache)
3459 def get_cartopy(var=None, wrfin=None, varname=None, timeidx=0, method="cat",
3460 squeeze=True, cache=None):
3461 """Return a :class:`cartopy.crs.Projection` subclass for the
3462 map projection.
3463
(...)
3521
3522 """
-> 3523 return _get_proj_obj("cartopy", var, wrfin, varname, timeidx, method,
3524 squeeze, cache)
File ~/anaconda3/lib/python3.10/site-packages/wrf/util.py:3385, in _get_proj_obj(ob_type, var, wrfin, varname, timeidx, method, squeeze, cache, **kwargs)
3325 def _get_proj_obj(ob_type, var, wrfin, varname, timeidx, method, squeeze,
...
3313 except AttributeError:
3314 raise ValueError("variable does not contain projection "
3315 "information")