Skip to content

Commit 2a72177

Browse files
committed
Remove text output of full surface fields
Those are output from StagYY already, or can be easily computed if needed for a particular study. They are not general enough to be handled by this module.
1 parent 1912bb2 commit 2a72177

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

stagpy/plates.py

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ def detect_plates(step, vrms_surface, fids, time):
8585
# dvphi/dphi at cell-center
8686
dvph2 = np.diff(vphi[:, indsurf]) / (ph_coord[1] - ph_coord[0])
8787

88-
io_surface(step.isnap, time, fids[6], dvph2)
89-
io_surface(step.isnap, time, fids[7], vph2[:, indsurf])
90-
9188
# finding trenches
9289
pom2 = np.copy(dvph2)
9390
maskbigdvel = -vrms_surface * (
@@ -455,13 +452,6 @@ def plot_plates(step, time, vrms_surface, trench, ridge, agetrench,
455452
))
456453

457454

458-
def io_surface(timestep, time, fid, fld):
459-
"""Output surface files."""
460-
fid.write(f"{timestep} {time}")
461-
fid.writelines(["%10.2e" % item for item in fld[:]])
462-
fid.writelines(["\n"])
463-
464-
465455
def lithospheric_stress(step, trench, ridge, time):
466456
"""Calculate stress in the lithosphere."""
467457
timestep = step.isnap
@@ -582,8 +572,7 @@ def main_plates(sdat):
582572
vrms_surface = uprof_averaged[isurf]
583573

584574
# determine names of files
585-
fnames = ['plate_velocity', 'distance_subd', 'continents',
586-
'flux', 'topography', 'age', 'velderiv', 'velocity']
575+
fnames = ['plate_velocity', 'distance_subd']
587576
fnames = [f'plates_{stem}_{sdat.walk.stepstr}' for stem in fnames]
588577
with ExitStack() as stack:
589578
fids = [stack.enter_context(open(fname, 'w')) for fname in fnames]
@@ -617,17 +606,6 @@ def main_plates(sdat):
617606
concfld < 3, concfld) # plotting continents, to-do
618607
continentsfld = continentsfld / continentsfld
619608

620-
temp = step.fields['T'].values[0, :, :, 0]
621-
tgrad = (temp[:, isurf - 1] - temp[:, isurf]) /\
622-
(step.geom.r_centers[isurf] - step.geom.r_centers[isurf - 1])
623-
624-
io_surface(timestep, time, fids[2], concfld[:-1, isurf])
625-
io_surface(timestep, time, fids[3], tgrad)
626-
io_surface(timestep, time, fids[4], topo[:, 1])
627-
if 'age' in conf.plates.plot:
628-
io_surface(timestep, time, fids[5],
629-
step.fields['age'].values[0, :, isurf, 0])
630-
631609
# plot viscosity field with position of trenches and ridges
632610
etamin, _ = sdat.scale(1e-2, 'Pa')
633611
etamax, _ = sdat.scale(sdat.par['viscosity']['eta_max'], 'Pa')

0 commit comments

Comments
 (0)