Skip to content

Commit 29c830a

Browse files
committed
Remove integrated stress in lithosphere
The way it is computed is too specific of one problem to be useful in the general case.
1 parent 2fe51c4 commit 29c830a

File tree

2 files changed

+0
-86
lines changed

2 files changed

+0
-86
lines changed

stagpy/config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,6 @@ def _index_collection(arg):
217217
True, 'min stress in plots')),
218218
('stressmax', Conf(800, False, None, {},
219219
True, 'max stress in plots')),
220-
('lstressmax', Conf(50, False, None, {},
221-
True, 'max lithospheric stress in plots')),
222220
))
223221

224222
CONF_DEF['info'] = OrderedDict((

stagpy/plates.py

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -448,90 +448,6 @@ def plot_plates(step, time, vrms_surface, trench, ridge, agetrench,
448448
))
449449

450450

451-
def lithospheric_stress(step, trench, ridge, time):
452-
"""Calculate stress in the lithosphere."""
453-
timestep = step.isnap
454-
base_lith = step.geom.rcmb + 1 - 0.105
455-
456-
stressfld = step.fields['sII'].values[0, :, :, 0]
457-
r_centers = np.outer(np.ones(stressfld.shape[0]), step.geom.r_centers)
458-
stressfld = np.ma.masked_where(r_centers < base_lith, stressfld)
459-
460-
# stress integration in the lithosphere
461-
dzm = (step.geom.r_centers[1:] - step.geom.r_centers[:-1])
462-
stress_lith = np.sum((stressfld[:, 1:] * dzm.T), axis=1)
463-
ph_coord = step.geom.p_centers # probably doesn't need alias
464-
465-
# plot stress in the lithosphere
466-
fig, axis, _, _ = field.plot_scalar(step, 'sII', stressfld,
467-
cmap='plasma_r', vmin=0, vmax=300)
468-
# Annotation with time and step
469-
axis.text(1., 0.9, str(round(time, 0)) + ' My', transform=axis.transAxes)
470-
axis.text(1., 0.1, str(timestep), transform=axis.transAxes)
471-
saveplot(fig, 'lith', timestep)
472-
473-
# velocity
474-
vphi = step.fields['v2'].values[0, :, :, 0]
475-
476-
# position of continents
477-
concfld = step.fields['c'].values[0, :, :, 0]
478-
_, indcont = _isurf_icont(step)
479-
if step.sdat.par['boundaries']['air_layer'] and\
480-
not step.sdat.par['continents']['proterozoic_belts']:
481-
continents = np.ma.masked_where(
482-
np.logical_or(concfld[:-1, indcont] < 3,
483-
concfld[:-1, indcont] > 4),
484-
concfld[:-1, indcont])
485-
elif step.sdat.par['boundaries']['air_layer'] and\
486-
step.sdat.par['continents']['proterozoic_belts']:
487-
continents = np.ma.masked_where(
488-
np.logical_or(concfld[:-1, indcont] < 3,
489-
concfld[:-1, indcont] > 5),
490-
concfld[:-1, indcont])
491-
elif step.sdat.par['tracersin']['tracers_weakcrust']:
492-
continents = np.ma.masked_where(
493-
concfld[:-1, indcont] < 3, concfld[:-1, indcont])
494-
else:
495-
continents = np.ma.masked_where(
496-
concfld[:-1, indcont] < 2, concfld[:-1, indcont])
497-
498-
# masked array, only continents are true
499-
continentsall = continents / continents
500-
501-
# plot integrated stress in the lithosphere
502-
fig0, (ax1, ax2) = plt.subplots(2, 1, sharex=True, figsize=(12, 8))
503-
ax1.plot(step.geom.p_walls, vphi[:, -1], label='Vel')
504-
ax1.axhline(y=0, xmin=0, xmax=2 * np.pi,
505-
color='black', ls='solid', alpha=0.2)
506-
ax1.set_ylabel("Velocity")
507-
ax1.text(0.95, 1.07, str(round(time, 0)) + ' My',
508-
transform=ax1.transAxes)
509-
ax1.text(0.01, 1.07, str(round(step.time, 8)),
510-
transform=ax1.transAxes)
511-
512-
intstr_scale = step.sdat.scales.stress * step.sdat.scales.length / 1.e12
513-
ax2.plot(ph_coord, stress_lith * intstr_scale, color='k', label='Stress')
514-
ax2.set_ylabel(r"Integrated stress [$TN\,m^{-1}$]")
515-
516-
plot_plate_limits(ax1, ridge, trench, conf.plates.vmin,
517-
conf.plates.vmax)
518-
plot_plate_limits(ax2, ridge, trench, conf.plates.stressmin,
519-
conf.plates.lstressmax)
520-
ax1.set_xlim(0, 2 * np.pi)
521-
ax1.set_title(timestep)
522-
523-
ax1.fill_between(
524-
ph_coord, continentsall * conf.plates.vmin,
525-
conf.plates.vmax, facecolor='#8b6914', alpha=0.2)
526-
ax1.set_ylim(conf.plates.vmin, conf.plates.vmax)
527-
ax2.fill_between(
528-
ph_coord, continentsall * conf.plates.stressmin,
529-
conf.plates.lstressmax, facecolor='#8b6914', alpha=0.2)
530-
ax2.set_ylim(conf.plates.stressmin, conf.plates.lstressmax)
531-
532-
saveplot(fig0, 'svelslith', timestep)
533-
534-
535451
def set_of_vars(arg_plot):
536452
"""Build set of needed variables.
537453

0 commit comments

Comments
 (0)