You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The streamplot method is extremely slow on every projection, including PlateCarree for dataset that are not subsantially small.
I'm trying to plot an array which has dimension 551 (latitude) x 1071 (longitude). This is a cut from a global domain, and I wouldn't consider it an extremely large dataset. In fact, when plotting it without a cartopy projection defined, matplotlib only takes less than a second, while the one with a cartopy projection never finishes it. The only way to make it work is to artificially coarsen the input array.
takes the execution time back to 3.3s, which is still worse than the plain matplotlib example, but ok.
Using every 5th points brings us back to almost 8s. Going further doesn't make sense as it becomes way slower.
In theory streamlines will only preserve large scale features, so artificially coarsening is not a big deal...but this is definitely not an intended behaviour! There is some additional/unneeded transformation taking place.
Description
The
streamplot
method is extremely slow on every projection, includingPlateCarree
for dataset that are not subsantially small.I'm trying to plot an array which has dimension 551 (latitude) x 1071 (longitude). This is a cut from a global domain, and I wouldn't consider it an extremely large dataset. In fact, when plotting it without a cartopy projection defined, matplotlib only takes less than a second, while the one with a cartopy projection never finishes it. The only way to make it work is to artificially coarsen the input array.
Code to reproduce
Input netcdf for MWE is available here
completes succesfully in 0.3 seconds.
When adding the cartopy projection (note that I'm using
PlateCarree
so that there is NO transformation taking place.This uses 80% of my entire processor and never completes.
Only way to make it work is to coarsen the dataset. For example doing
takes the execution time back to 3.3s, which is still worse than the plain matplotlib example, but ok.
Using every 5th points brings us back to almost 8s. Going further doesn't make sense as it becomes way slower.
In theory streamlines will only preserve large scale features, so artificially coarsening is not a big deal...but this is definitely not an intended behaviour! There is some additional/unneeded transformation taking place.
Full environment definition
Operating system
MacOs 13.7.1 (22H221)
Cartopy version
cartopy 0.24.0
conda list
The text was updated successfully, but these errors were encountered: