Skip to content

Conversation

sgdecker
Copy link
Contributor

@sgdecker sgdecker commented Nov 10, 2022

Description Of Changes

Currently, BarbPlot is happy to attempt to plot very large wind barbs, but if the size becomes too large, memory usage becomes an issue, leading to system hangs. This commit adds a check to make sure the wind barbs will not consist of so many pennants that memory could be an issue.

Checklist

@sgdecker
Copy link
Contributor Author

This is the kind of check I am envisioning.

Fixes Unidata#2785.

Currently, BarbPlot is happy to attempt to plot very large wind barbs,
but if the size becomes too large, memory usage becomes an issue,
leading to system hangs.  This commit adds a check to make sure the
wind barbs will not consist of so many pennants that memory could be
an issue.
@sgdecker sgdecker marked this pull request as ready for review November 17, 2022 21:34
@sgdecker sgdecker requested review from a team and kgoebber as code owners November 17, 2022 21:34
@sgdecker sgdecker requested review from dcamron and removed request for a team November 17, 2022 21:34
@needs_cartopy
def test_too_big_error_barbs():
"""Make sure we get an error when we are about to draw too many pennants."""
data = xr.open_dataset(get_test_data('narr_example.nc', as_file_obj=False)).squeeze()

Check warning

Code scanning / CodeQL

File is not always closed

File is opened but is not closed.
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.

Raise error instead of attempting absurd BarbPlot
1 participant