Slabs

Slabs is a class that contains data and methods for working with subduction zones. In the PlateTorques module, the Slabs class is used to store the subduction zones of the model and to calculate the slab pull and slab bend torques.

class plato.slabs.Slabs(settings=None, reconstruction=None, rotation_file=None, topology_file=None, polygon_file=None, reconstruction_name=None, ages=None, cases_file=None, cases_sheet='Sheet1', files_dir=None, plate_data=None, resolved_geometries=None, PARALLEL_MODE=False, DEBUG_MODE=False, CALCULATE_VELOCITIES=True, PROGRESS_BAR=True)[source]

Bases: object

Class that contains all information for the slabs in a reconstruction. A Slabs object can be initialised in multiple ways:

  1. The user can initialise a Slabs object from scratch by providing the reconstruction and the ages of interest. The reconstruction can be provided as a file with rotation poles, a file with topologies, and a file with polygons, or as one of the model name string identifiers for the models available on the GPlately DataServer (https://gplates.github.io/gplately/v1.3.0/#dataserver).

    Additionally, the user may specify the excel file with a number of different cases (combinations of options) to be considered.

  2. Alternatively, the user can initialise a Slabs object by providing a Settings object and a Reconstruction object from a Globe, Grids, Plates, Points or Slabs object. Providing the settings from a Slabs object will allow the user to initialise a new Slabs object with the same settings as the original object.

Parameters:
  • settings (plato.settings.Settings) – Settings object (default: None)

  • reconstruction (gplately.PlateReconstruction) – Reconstruction object (default: None)

  • rotation_file (str) – filepath to .rot file with rotation poles (default: None)

  • topology_file (str) – filepath to .gpml file with topologies (default: None)

  • polygon_file (str) – filepath to .gpml file with polygons (default: None)

  • reconstruction_name (str) – model name string identifiers for the GPlately DataServer (default: None)

  • ages (float, int, list, numpy.ndarray) – ages of interest (default: None)

  • cases_file (str) – filepath to excel file with cases (default: None)

  • cases_sheet (str) – name of the sheet in the excel file with cases (default: “Sheet1”)

  • files_dir (str) – directory to store files (default: None)

  • PARALLEL_MODE (bool) – flag to enable parallel mode (default: False)

  • DEBUG_MODE (bool) – flag to enable debug mode (default: False)

  • CALCULATE_VELOCITIES (bool) – flag to calculate velocities (default: True)

calculate_velocities(ages=None, cases=None, plateIDs=None, stage_rotation=None, PROGRESS_BAR=True, PARALLEL_MODE=False)[source]

Function to compute velocities at slabs.

Parameters:
  • ages (float, int, list, numpy.ndarray) – ages of interest (default: None)

  • cases (str, list) – cases of interest (default: None)

  • stage_rotation (dict) – stage rotation model (default: None)

TODO: Trench velocities need to be calculated differently from the

sample_slab_seafloor_ages(ages=None, cases=None, plateIDs=None, grids=None, ITERATIONS=True, PROGRESS_BAR=True)[source]

Samples seafloor age at slabs. This is a special case of the sample_grid function, where the variable to sample from the grid is set to “seafloor_age” and the column to store the sampled values is set to “slab_seafloor_age”.

Parameters:
  • ages (float, int, list, numpy.ndarray) – ages of interest (default: None)

  • cases (str, list) – cases of interest (default: None)

  • plateIDs (list, numpy.ndarray) – plateIDs of interest (default: None)

  • grids (dict[float, dict[str, xarray.Dataset]]) – grids to sample from (default: None)

sample_arc_seafloor_ages(ages=None, cases=None, plateIDs=None, grids=None, ITERATIONS=False, PROGRESS_BAR=True)[source]

Samples seafloor age at arcs. This is a special case of the sample_grid function, where the variable to sample from the grid is set to “seafloor_age” and the column to store the sampled values is set to “arc_seafloor_age”.

Parameters:
  • ages (float, int, list, numpy.ndarray) – ages of interest (default: None)

  • cases (str, list) – cases of interest (default: None)

  • plateIDs (list, numpy.ndarray) – plateIDs of interest (default: None)

  • grids (dict[float, dict[str, xarray.Dataset]]) – grids to sample from (default: None)

sample_arc_LAB_depth(ages=None, cases=None, plateIDs=None, grids=None, ITERATIONS=False, PROGRESS_BAR=True)[source]

Samples LAB depth at arcs. This is a special case of the sample_grid function, where the variable to sample from the grid is set to “LAB_depth” and the column to store the sampled values is set to “arc_LAB_depth”.

Parameters:
  • ages (float, int, list, numpy.ndarray) – ages of interest (default: None)

  • cases (str, list) – cases of interest (default: None)

  • plateIDs (list, numpy.ndarray) – plateIDs of interest (default: None)

  • grids (dict[float, dict[str, xarray.Dataset]]) – grids to sample from (default: None)

sample_slab_sediment_thickness(ages=None, cases=None, plateIDs=None, grids=None, ITERATIONS=True, PROGRESS_BAR=True)[source]

Samples sediment thickness at slabs. This function calls several internal functions to sample sediment thickness at slabs:

  1. A a special case of the sample_grid function, where the variable to sample from the grid is set to None and the column to store the sampled values is set to “sediment_thickness”. Settings the variable to sample from the grid to None will sample all variables in the grid specified in the case settings.

  2. The set_continental_arc function, which will call the sample_arc_seafloor_ages function if the seafloor ages at arcs have not been sampled yet, and then sets whether a trench has a continental arc with additional manual overrides for known oceanic arcs that are masked on seafloor age grids of the Earthbyte reconstructions available on the GPlately DataServer.

  3. A special case of the set_values function, where the column to set the values is set to “sediment_thickness” and the value to set is set to the value specified in the case settings.

Parameters:
  • ages (float, int, list, numpy.ndarray) – ages of interest (default: None)

  • cases (str, list) – cases of interest (default: None)

  • plateIDs (list, numpy.ndarray) – plateIDs of interest (default: None)

  • grids (dict[float, dict[str, xarray.Dataset]]) – grids to sample from (default: None)

set_continental_arc(ages=None, cases=None, plateIDs=None, PROGRESS_BAR=True, OVERRIDE=None)[source]

Function to set whether a trench has a continental arc. This function calls the sample_arc_seafloor_ages function if the seafloor ages at arcs have not been sampled yet, and then sets whether a trench has a continental arc with additional manual overrides for known oceanic arcs that are masked on seafloor age grids of the Earthbyte reconstructions available on the GPlately DataServer.

Parameters:
  • ages (float, int, list, numpy.ndarray) – ages of interest (default: None)

  • cases (str, list) – cases of interest (default: None)

  • plateIDs (list, numpy.ndarray) – plateIDs of interest (default: None)

sample_grid(ages=None, cases=None, plateIDs=None, grids=None, plate='lower', vars=['seafloor_age'], cols=['slab_seafloor_age'], ITERATIONS=False, PROGRESS_BAR=True)[source]

Samples any grid at slabs.

set_values(ages=None, cases=None, plateIDs=None, plate='lower', cols=None, vals=None, PROGRESS_BAR=True)[source]

Function to add values to the ‘Slabs’ object.

calculate_slab_pull_force(ages=None, cases=None, plateIDs=None, PROGRESS_BAR=True)[source]

Function to compute slab pull force along trenches.

Parameters:
  • ages (float, int, list, numpy.ndarray) – ages of interest (default: None)

  • cases (str, list) – cases of interest (default: None)

  • plateIDs (list, numpy.ndarray) – plateIDs of interest (default: None)

  • PROGRESS_BAR (bool) – flag to show progress bar (default: True)

calculate_slab_suction_force(ages=None, cases=None, plateIDs=None, PROGRESS_BAR=True)[source]

Function to compute slab suction force along trenches.

Parameters:
  • ages (float, int, list, numpy.ndarray) – ages of interest (default: None)

  • cases (str, list) – cases of interest (default: None)

  • plateIDs (list, numpy.ndarray) – plateIDs of interest (default: None)

  • PROGRESS_BAR (bool) – flag to show progress bar (default: True)

calculate_slab_bend_force(ages=None, cases=None, plateIDs=None, PROGRESS_BAR=True)[source]

Function to compute slab bend force along trenches.

Parameters:
  • ages (float, int, list, numpy.ndarray) – ages of interest (default: None)

  • cases (str, list) – cases of interest (default: None)

  • plateIDs (list, numpy.ndarray) – plateIDs of interest (default: None)

  • PROGRESS_BAR (bool) – flag to show progress bar (default: True)

calculate_residual_force(ages=None, cases=None, plateIDs=None, residual_torque=None, PROGRESS_BAR=True)[source]

Function to calculate residual torque along trenches.

Parameters:
  • ages (float, int, list, numpy.ndarray) – ages of interest (default: None)

  • cases (str, list) – cases of interest (default: None)

  • plateIDs (list, numpy.ndarray) – plateIDs of interest (default: None)

  • residual_torque (dict) – residual torque to use for the calculation (default: None)

  • PROGRESS_BAR (bool) – flag to show progress bar (default: True)

extract_data_through_time(ages=None, cases=None, plateIDs=None, var='None')[source]

Function to extract data on slabs through time as a pandas.DataFrame.

Parameters:
  • ages (float, int, list, numpy.ndarray) – ages of interest (default: None)

  • cases (str, list) – cases of interest (default: None)

  • plateIDs (list, numpy.ndarray) – plateIDs of interest (default: None)

  • var (str, list) – variable to extract (default: None)

save(ages=None, cases=None, plateIDs=None, file_dir=None, PROGRESS_BAR=True)[source]

Function to save the ‘Slabs’ object. Data of the ‘Slabs’ object is saved to .parquet files.

Parameters:
  • ages (float, int, list, numpy.ndarray) – ages of interest (default: None)

  • cases (str, list) – cases of interest (default: None)

  • plateIDs (list, numpy.ndarray) – plateIDs of interest (default: None)

  • file_dir (str) – directory to save the data (default: None)

  • PROGRESS_BAR (bool) – flag to show progress bar (default: True)

export(ages=None, cases=None, plateIDs=None, file_dir=None, PROGRESS_BAR=True)[source]

Function to export the ‘Slabs’ object. Data of the ‘Slabs’ object is exported to .csv files.

Parameters:
  • ages (float, int, list, numpy.ndarray) – ages of interest (default: None)

  • cases (str, list) – cases of interest (default: None)

  • plateIDs (list, numpy.ndarray) – plateIDs of interest (default: None)

  • file_dir (str) – directory to save the data (default: None)

  • PROGRESS_BAR (bool) – flag to show progress bar (default: True)