From 0530ed88dd21870be8fb1169bdbdc7cb5b1e3de4 Mon Sep 17 00:00:00 2001 From: Lionel GUEZ <guez@lmd.ens.fr> Date: Mon, 24 Apr 2023 23:23:19 +0200 Subject: [PATCH] Polish --- Inst_eddies/Analysis/plot_velocity.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Inst_eddies/Analysis/plot_velocity.py b/Inst_eddies/Analysis/plot_velocity.py index 87305b82..3a5f97dc 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, -- GitLab