diff --git a/Inst_eddies/Analysis/plot_velocity.py b/Inst_eddies/Analysis/plot_velocity.py index 87305b82d74e56f7a7dec7a14386c15c97666ead..3a5f97dcb92d400bb6906185c19757c50850ce84 100755 --- a/Inst_eddies/Analysis/plot_velocity.py +++ b/Inst_eddies/Analysis/plot_velocity.py @@ -56,6 +56,8 @@ else: lat_mask = np.logical_and(latitude >= llcrnrlat, latitude <= urcrnrlat) +longitude = longitude[lon_mask] +latitude = latitude[lat_mask] src_crs = ccrs.PlateCarree() projection = ccrs.PlateCarree() ##projection = ccrs.NorthPolarStereo() @@ -64,14 +66,12 @@ ax = plt.axes(projection = projection) if args.undefined: undef_velocity = np.logical_or(ugos.mask, vgos.mask) - lon_2d, lat_2d = np.meshgrid(longitude[lon_mask], - latitude[lat_mask]) + lon_2d, lat_2d = np.meshgrid(longitude, latitude) ax.plot(lon_2d[undef_velocity].reshape(-1), lat_2d[undef_velocity].reshape(-1), transform = src_crs, marker = "*", color = "violet", linestyle = "None") else: - quiver_return = wind_cartopy.plot(ax, longitude[lon_mask], - latitude[lat_mask], + quiver_return = wind_cartopy.plot(ax, longitude, latitude, ugos[lat_mask][:, lon_mask], vgos[lat_mask][:, lon_mask], scale = args.scale,