@@ -18,7 +18,7 @@ def detect_plates_vzcheck(step, seuil_memz):
1818 n_z = step .geom .nztot
1919 nphi = step .geom .nptot # -1? should be OK, ghost not included
2020 rcmb = max (0 , step .geom .rcmb )
21- radius = step .geom .r_coord + rcmb
21+ radius = step .geom .r_coord
2222 radiusgrid = step .geom .rgeom [:, 0 ] + rcmb
2323 dphi = 1 / nphi
2424
@@ -93,7 +93,8 @@ def detect_plates(step, vrms_surface, fids, time):
9393 dsa = step .sdat .par ['boundaries' ]['air_thickness' ]
9494 # we are a bit below the surface; should check if you are in the
9595 # thermal boundary layer
96- indsurf = np .argmin (abs ((1 - dsa ) - step .geom .r_coord )) - 4
96+ indsurf = np .argmin (
97+ np .abs (1 - dsa - step .geom .r_coord + step .geom .rcmb )) - 4
9798 else :
9899 indsurf = - 1
99100
@@ -211,9 +212,11 @@ def plot_plates(step, time, vrms_surface, trench, ridge, agetrench,
211212 # to be just below
212213 # the surface (that is considered plane here); should check if you are
213214 # in the thermal boundary layer
214- indsurf = np .argmin (abs ((1 - dsa ) - step .geom .r_coord )) - 4
215+ indsurf = np .argmin (
216+ np .abs (1 - dsa - step .geom .r_coord + step .geom .rcmb )) - 4
215217 # depth to detect the continents
216- indcont = np .argmin (abs ((1 - dsa ) - np .array (step .geom .r_coord ))) - 10
218+ indcont = np .argmin (
219+ np .abs (1 - dsa - step .geom .r_coord + step .geom .rcmb )) - 10
217220 else :
218221 indsurf = - 1
219222 indcont = - 1 # depth to detect continents
@@ -514,7 +517,8 @@ def lithospheric_stress(step, trench, ridge, time):
514517 # to be just below
515518 dsa = step .sdat .par ['boundaries' ]['air_thickness' ]
516519 # depth to detect the continents
517- indcont = np .argmin (abs ((1 - dsa ) - step .geom .r_coord )) - 10
520+ indcont = np .argmin (
521+ np .abs (1 - dsa - step .geom .r_coord + step .geom .rcmb )) - 10
518522 else :
519523 # depth to detect continents
520524 indcont = - 1
0 commit comments