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
Using the particle trajectory information from each ensemble member, use the RCLV method to create a labeled mask of coherent eddies.
# Eddy detectionlav_abs=np.abs(particle_history[:,2].copy()) # absolute value of vorticity on particleslx,ly=particle_history[:,0].copy(),particle_history[:,1].copy() # particle trjectories# lq = np.zeros([Nhold,Npart])# for i in range(Nhold):# lq[i] = lpa.interpolate_gridded_scalar(lx[i], ly[i], q[i,0]) # get the PV on particles (if needed)lx.shape= (Nhold, pNy, pNx)
ly.shape= (Nhold, pNy, pNx)
lav_abs.shape= (Nhold, pNy, pNx)
# lq.shape = (Nhold, pNy, pNx)lx1=np.unwrap(lx[::-1]*2*pi/m.W, axis=0)*m.W/(2*pi) # unwrap trajectories to correct the jump of displacement at the periodic boundariesly1=np.unwrap(ly[::-1]*2*pi/m.L, axis=0)*m.L/(2*pi)
lx1=lx1[::-1] # switch back to backward timingly1=ly1[::-1]
ndays1=60# lifetime of RCLVlavd1=lav_abs[-ndays1:].mean(axis=0) #LAVD field del(lav_abs)
cov1=10.0# convexity deficincy threshold, here uses 10.0 to disable itCI=-0.75# threshold for coherency indexmin_area=200# minimum area (number of pixels) of RCLVkwargs=dict(min_distance=20, # minimum distance between LAVD maxima (pixel units)max_width=100, # maximum width of the search window (pixel units)CI_th=CI, CI_tol=0.01, convex_def=cov1, convex_def_tol=0.001,
init_contour_step_frac=0.64, # the value with which to increment the initial contour levelmin_limit_diff=1e-10, min_area=min_area, periodic=(True, True))
contours1=list(rclv.find_convex_contours(lavd1,
lx1[-1:-ndays1-1:-1], ly1[-1:-ndays1-1:-1],
dx=dx, dy=dy, # particle spacing, must have the same unit as lx1 and ly1**kwargs))
mask=rclv.label_points_in_contours(lavd1.shape, [c[1] forcincontours1]) #label particles in RCLVs
The text was updated successfully, but these errors were encountered:
Using the particle trajectory information from each ensemble member, use the RCLV method to create a labeled mask of coherent eddies.
The text was updated successfully, but these errors were encountered: