Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2a72177
Remove text output of full surface fields
amorison Oct 17, 2021
a453d5a
Plot any scalar field with plate info
amorison Oct 17, 2021
59ea1c2
Option to plot stress vector on field plates plot
amorison Oct 17, 2021
2977583
Switch for continent shading on plates plots
amorison Oct 17, 2021
1973fcc
Fix indexing of uprof_averaged
amorison Oct 17, 2021
2fe51c4
isurf and icont abstracted in function
amorison Oct 17, 2021
29c830a
Remove integrated stress in lithosphere
amorison Oct 17, 2021
e7ac14a
New plot_at_surface function handles plates plots
amorison Oct 18, 2021
40389e4
Only compute icont where needed
amorison Oct 18, 2021
11b4ea6
Remove unused fiddling of colormap
amorison Oct 20, 2021
88f1fff
Colour continents by composition on field plots
amorison Oct 20, 2021
5744675
Remove unecessary variables
amorison Oct 20, 2021
196abbf
Remove unused output of detect_plates
amorison Oct 20, 2021
5f6a526
Fix condition to fetch age of trench
amorison Oct 20, 2021
23d7930
Extract IO out of detect_plates
amorison Oct 20, 2021
5eb1caf
Fix dvphi threshold for trench detection
amorison Oct 20, 2021
8dd18c3
Always show plate limit annotations
amorison Oct 20, 2021
f562142
Simplify _write_trench_diagnostics
amorison Oct 20, 2021
a9f3ad2
Group IO in _write_trench_diagnostics
amorison Oct 20, 2021
c01eeba
Group all ascii io in one file
amorison Oct 20, 2021
3bfa10c
Merge main_plates into cmd function
amorison Oct 21, 2021
09ea7fe
Remove phyvars.PLATES
amorison Oct 21, 2021
4baf577
Don't fetch c field if plates.continents is False
amorison Oct 21, 2021
eba1d4b
detect_plates return index of limit, is cached
amorison Oct 21, 2021
0cd4f37
Merge detect_plates and detect_plates_vzcheck
amorison Oct 21, 2021
0b42556
Rename plates.timeprofile into plates.nbplates
amorison Oct 21, 2021
5584098
Documentation of plates API
amorison Oct 21, 2021
3048969
Only compute _isurf when needed in _surf_diag
amorison Oct 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions docs/sources/apiref/phyvars.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,6 @@ phyvars
Dictionary of time series that StagPy can compute. Keys are the variable
names, values are :class:`Vart` instances.

.. class:: Varp

:class:`collections.namedtuple` whose instances hold metadata of
plate variables. It defines the following fields:

- **description** (*str*): short description of the variable.

.. data:: PLATES
:annotation: = {platevar: Varp()}

Dictionary of plate variables output by StagYY. Keys are the variable
names, values are :class:`Varp` instances.

.. data:: SCALES
:annotation: = {dimstr: func}

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/apiref/plates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ plates
======

.. automodule:: stagpy.plates
:members: cmd
:members:
3 changes: 0 additions & 3 deletions stagpy/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ def var_cmd():
print('refstate:')
_layout(phyvars.REFSTATE, {})
print()
if print_all or conf.var.plates:
print('plates:')
_layout(phyvars.PLATES, {})


def version_cmd():
Expand Down
49 changes: 18 additions & 31 deletions stagpy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,38 +179,27 @@ def _index_collection(arg):

CONF_DEF['plates'] = OrderedDict((
('plot',
Conf('c,eta,sc', True, 'o',
{'nargs': '?', 'const': '', 'type': str},
True, 'variables to plot (see stagpy var)')),
('vzcheck', switch_opt(False, None,
'activate Colin\'s version with vz checking')),
('timeprofile', switch_opt(False, None,
'nb of plates as function of time')),
Conf('c.T.v2-v2.dv2-v2.topo_top', True, 'o',
{'nargs': '?', 'const': '', 'type': str}, True,
'variables to plot, can be a surface field, field, or dv2')),
('field',
Conf('eta', True, None, {},
True, 'field variable to plot with plates info')),
('stress', switch_opt(
False, None,
'Plot deviatoric stress instead of velocity on field plots')),
('continents', switch_opt(True, None,
'Whether to shade continents on plots')),
('vzratio',
Conf(0., True, None, {}, True,
'Ratio of mean vzabs used as threshold for plates limits')),
('nbplates', switch_opt(False, None,
'Plot number of plates as function of time')),
('distribution', switch_opt(False, None,
'Plot plate size distribution')),
('zoom',
Conf(None, True, None, {'type': float},
False, 'zoom around surface')),
('topomin', Conf(-40, False, None, {},
True, 'min topography in plots')),
('topomax', Conf(100, False, None, {},
True, 'max topography in plots')),
('agemin', Conf(-50, False, None, {},
True, 'min age in plots')),
('agemax', Conf(500, False, None, {},
True, 'max age in plots')),
('vmin', Conf(-5000, False, None, {},
True, 'min velocity in plots')),
('vmax', Conf(5000, False, None, {},
True, 'max velocity in plots')),
('dvmin', Conf(-250000, False, None, {},
True, 'min velocity derivative in plots')),
('dvmax', Conf(150000, False, None, {},
True, 'max velocity derivative in plots')),
('stressmin', Conf(0, False, None, {},
True, 'min stress in plots')),
('stressmax', Conf(800, False, None, {},
True, 'max stress in plots')),
('lstressmax', Conf(50, False, None, {},
True, 'max lithospheric stress in plots')),
))

CONF_DEF['info'] = OrderedDict((
Expand All @@ -229,8 +218,6 @@ def _index_collection(arg):
False, 'print time variables')),
('refstate', Conf(None, True, None, {'action': 'store_true'},
False, 'print refstate variables')),
('plates', Conf(None, True, None, {'action': 'store_true'},
False, 'print plates variables')),
))

CONF_DEF['config'] = config_conf_section()
17 changes: 0 additions & 17 deletions stagpy/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,23 +163,6 @@ def __init__(self, zoom):
super().__init__(f'Zoom angle should be in [0,360] (received {zoom})')


class StagnantLidError(StagpyError):
"""Raised when unexpected stagnant lid regime is found.

Args:
sdat (:class:`~stagpy.stagyydata.StagyyData`): the StagyyData
instance for which a stagnant lid regime was found.

Attributes:
sdat (:class:`~stagpy.stagyydata.StagyyData`): the StagyyData
instance for which a stagnant lid regime was found.
"""

def __init__(self, sdat):
self.sdat = sdat
super().__init__(f'Stagnant lid regime for {sdat}')


class MissingDataError(StagpyError, KeyError):
"""Raised when requested data is not present in output."""

Expand Down
11 changes: 0 additions & 11 deletions stagpy/phyvars.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,17 +262,6 @@
('grav', Varr('Gravity', 'Gravity', 'm/s2')),
))

Varp = namedtuple('Varp', ['description'])
PLATES = OrderedDict((
('c', Varp('Composition')),
('eta', Varp('Viscosity')),
('sc', Varp('Topography')),
('age', Varp('Age')),
('str', Varp('Stress')),
('sx', Varp('Principal deviatoric stress')),
('ed', Varp('Strain rate')),
))

SCALES = {
'm': attrgetter('length'),
'kg/m3': attrgetter('density'),
Expand Down
Loading