@@ -68,7 +68,7 @@ def detect_plates_vzcheck(step, vz_thres_ratio=0):
6868 return limits , dvphi , vphi_surf
6969
7070
71- def detect_plates (step , vrms_surface ):
71+ def detect_plates (step ):
7272 """Detect plates using derivative of horizontal velocity."""
7373 vphi = step .fields ['v2' ].values [0 , :, :, 0 ]
7474 ph_coord = step .geom .p_centers
@@ -82,8 +82,7 @@ def detect_plates(step, vrms_surface):
8282
8383 # finding trenches
8484 pom2 = np .copy (dvph2 )
85- maskbigdvel = - vrms_surface * (
86- 30 if step .sdat .par ['boundaries' ]['air_layer' ] else 10 )
85+ maskbigdvel = np .amin (dvph2 ) * 0.2
8786 pom2 [pom2 > maskbigdvel ] = maskbigdvel
8887 trench_span = 15 if step .sdat .par ['boundaries' ]['air_layer' ] else 10
8988 argless_dv = argrelextrema (
@@ -340,8 +339,7 @@ def main_plates(sdat):
340339
341340 time = step .time * vrms_surface * \
342341 conf .scaling .ttransit / conf .scaling .yearins / 1.e6
343- trenches , ridges , itrenches , v_trenches = \
344- detect_plates (step , vrms_surface )
342+ trenches , ridges , itrenches , v_trenches = detect_plates (step )
345343
346344 if 'age' in step .fields :
347345 agefld = step .fields ['age' ].values [0 , :, :, 0 ]
0 commit comments