Skip to content
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

Add temp try/except for plotting errors #280

Closed

Conversation

justin-richling
Copy link
Collaborator

@justin-richling justin-richling commented Jan 23, 2024

Placeholder until the random bug is fixed.

I'm working through several suggested fixes and also reaching out to cartopy and matplotlib. But this will at least allow the ADF to continue to run.

Placeholder until the random bug is fixed
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but did have one request!

img.append(ax[i].contourf(lons, lats, a, levels=levels, cmap=cmap, norm=norm, transform=ccrs.PlateCarree(), **cp_info['contourf_opt']))
try:
img.append(ax[i].contourf(lons, lats, a, levels=levels, cmap=cmap, norm=norm, transform=ccrs.PlateCarree(), **cp_info['contourf_opt']))
except:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would only except for TypeError, as that is the specific type of error that is being raised. Otherwise if a different kind of error shows up we might not see it and thus miss a potential bug-fix.

Suggested change
except:
except TypeError:

@justin-richling
Copy link
Collaborator Author

Closed due to #287

@justin-richling justin-richling deleted the polygon-error-temp-fix branch February 27, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants