Skip to content
Snippets Groups Projects
Commit cd843903 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Polish

parent dc4fbdac
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,6 @@ with shapefile.Reader("SHPC/max_speed_contour") as sf:
p = sf.shape(0)
p = np.array(p.points)
lon_interp = p[:, 0]
lat_interp = p[:, 1]
......@@ -58,15 +57,16 @@ lat_0 = float(input("latitude extremum = ? "))
lon_0_rad = lon_0 * np.pi/180
lat_0_rad = lat_0 * np.pi/180
src_crs = ccrs.PlateCarree()
projection = ccrs.Stereographic(central_latitude = lat_0,
central_longitude = lon_0)
x = np.cos(lat_0_rad) * (lon_interp_rad - lon_0_rad)
y = lat_interp_rad - lat_0_rad
v_azim = (x * vi - y * ui) / np.sqrt(x**2 + y**2)
print("mean azimuthal speed = ", np.mean(v_azim), "m s-1")
src_crs = ccrs.PlateCarree()
projection = ccrs.Stereographic(central_latitude = lat_0,
central_longitude = lon_0)
plt.figure()
ax = plt.axes(projection = projection)
ax.plot(lon_interp, lat_interp, transform = src_crs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment