-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'MercatorWithLatTS' object has no attribute '_x_limits' #162
Comments
I recently updated all my conda packages, and I am getting this same (and new to me) error when trying to extract cartography information, specifically when the output uses a Mercator projection: AttributeError: 'MercatorWithLatTS' object has no attribute '_x_limits' This error seems to be very similar to an older resolved issue: #77 I am using the following versions of wrf-python and cartopy: I do not get this error when the output use another projection (e.g., Lambert conformal). |
Hi @GautamKumarSaw and @sezick, In the mean time, I think you may need to either define the mercator projection by hand (ax = plt.axes(projection=crs.Mercator()) or there may be some help in using the "geobounds" or "varname" args with the get_cartopy call (this option seems to be less likely to be successful given my above thoughts on what is causing the problem, but always worth a shot). |
Hi @michaelavs |
Hi @GautamKumarSaw and @sezick, Let me know if you have any issues with updating your wrf-python version! |
Hi
I am new to wrf_python
I want to plot the slp (sea level Pressure) variable using wrf_python, for that, I have imported all the necessary libraries but I get this error
'MercatorWithLatTS' object has no attribute '_x_limits'
over the line (code)
cart_proj = get_cartopy(slp)
Any help would be really appreciated
from cartopy.crs import Mercator, Globe
slp = getvar(wrfin, 'slp', timeidx=0)
cart_proj = get_cartopy(slp)
lats, lons = latlon_coords(slp)
print(cart_proj, '\n', lats, '\n', lons)
fig = plt.figure(figsize=(10,10))
ax = plt.axes(projection=cart_proj)
ax.coastlines(linewidth=0.5)
lvl = np.arange(980, 1030, 2.5)
plt.contour(lons,
lats,
slp,
levels=lvl,
colors='k',
transform=crs.PlateCarree())
The text was updated successfully, but these errors were encountered: