Skip to content

Commit ad8e30d

Browse files
committed
Minor fixes in plates module
1 parent fc1b4d6 commit ad8e30d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stagpy/plates.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def detect_plates_vzcheck(step, seuil_memz):
1616
v_z = step.fields['v3'][0, :, :, 0]
1717
v_x = step.fields['v2'][0, :, :, 0]
1818
tcell = step.fields['T'][0, :, :, 0]
19-
n_z = step.nztot
20-
nphi = step.nptot # -1? should be OK, ghost not included
19+
n_z = step.geom.nztot
20+
nphi = step.geom.nptot
2121
rcmb = step.geom.rcmb
2222
radius = step.geom.r_centers
2323
radiusgrid = step.geom.r_walls
@@ -611,14 +611,14 @@ def main_plates(sdat):
611611
isurf -= 4 # why different isurf for the rest?
612612
else:
613613
isurf = -1
614-
vrms_surface = uprof_averaged.iloc[isurf]
614+
vrms_surface = uprof_averaged[isurf]
615615

616616
# determine names of files
617617
fnames = ['plate_velocity', 'distance_subd', 'continents',
618618
'flux', 'topography', 'age', 'velderiv', 'velocity']
619619
fnames = [f'plates_{stem}_{sdat.walk.stepstr}' for stem in fnames]
620620
with ExitStack() as stack:
621-
fids = [stack.enter_context(open(fname)) for fname in fnames]
621+
fids = [stack.enter_context(open(fname, 'w')) for fname in fnames]
622622
fids[0].write('# it time ph_trench vel_trench age_trench\n')
623623
fids[1].write('# it time time [My] distance '
624624
'ph_trench ph_cont age_trench [My]\n')

0 commit comments

Comments
 (0)