Plates¶
Plates is a class that contains data, geometries and methods for working with tectonic plates. In the PlateTorques module, the Plates class is used to store the plates of the model and to store the torques acting on the plates.
- class plato.plates.Plates(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, PARALLEL_MODE=False, DEBUG_MODE=False, PROGRESS_BAR=True)[source]¶
Bases:
object
Class that contains all information for the plates in a reconstruction. A Plates object can be initialised in multiple ways:
The user can initialise a Plates 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.
Alternatively, the user can initialise a Plates object by providing a Settings object and a Reconstruction object from a Globe, Grids, Plates, Points or Slabs object. Providing the settings from a Plates object will allow the user to initialise a new Plates 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)
PROGRESS_BAR (bool) – flag to enable the tqdm progress bar (default: True)
- calculate_continental_fraction(points=None, seafloor_grids=None, ages=None, cases=None, plateIDs=None, PROGRESS_BAR=True)[source]¶
Function to calculate the continental fraction of the plates.
This function can be called in multiple ways:
If no Points object is provided, but a Grids is, the function will initialise a Points object, sample the seafloor ages and calculate the continental fraction
If a Points object is provided, the function will calculate the continental fraction using the data in the Points object.
If ages, cases, and plateIDs are provided, the function will calculate the continental fraction for the specified ages, cases, and plateIDs. Otherwise, the function will calculate the continental fraction for all ages, cases, and plateIDs.
- Parameters:
points (plato.points.Points) – Points object (default: None)
ages (float, int, list, numpy.ndarray) – ages of interest (default: None)
cases (str, list) – cases of interest (default: None)
plateIDs (int, float, list, numpy.ndarray) – plateIDs of interest (default: None)
PROGRESS_BAR (bool) – flag to enable the tqdm progress bar (default: True)
- calculate_mean_asthenospheric_thickness(points=None, ages=None, cases=None, plateIDs=None, PROGRESS_BAR=True)[source]¶
Function to calculate the continental fraction of the plates.
- Parameters:
points (plato.points.Points) – Points object (default: None)
ages (float, int, list, numpy.ndarray) – ages of interest (default: None)
cases (str, list) – cases of interest (default: None)
plateIDs (int, float, list, numpy.ndarray) – plateIDs of interest (default: None)
PROGRESS_BAR (bool) – flag to enable the tqdm progress bar (default: True)
- calculate_rms_velocity(points=None, ages=None, cases=None, plateIDs=None, PROGRESS_BAR=True)[source]¶
Function to calculate the root mean square (RMS) velocity of the plates.
This function can be called in multiple ways:
If no Points object is provided, the function will initialise a Points object and calculate the RMS velocity.
If a Points object is provided, the function will calculate the RMS velocity for using the data in the Points object.
If ages, cases, and plateIDs are provided, the function will calculate the RMS velocity for the specified ages, cases, and plateIDs. Otherwise, the function will calculate the RMS velocity for all ages, cases, and plateIDs.
- Parameters:
points (plato.points.Points) – Points object (default: None)
ages (float, int, list, numpy.ndarray) – ages of interest (default: None)
cases (str, list) – cases of interest (default: None)
plateIDs (int, float, list, numpy.ndarray) – plateIDs of interest (default: None)
PROGRESS_BAR (bool) – flag to enable the tqdm progress bar (default: True)
- remove_net_rotation(points=None, ages=None, cases=None, plateIDs=None, PROGRESS_BAR=True)[source]¶
Function to remove net lithospheric rotation from the motion of plates.
- Parameters:
ages (float, int, list, numpy.ndarray) – ages of interest (default: None)
cases (str, list) – cases of interest (default: None)
plateIDs (int, float, list, numpy.ndarray) – plateIDs of interest (default: None)
- calculate_torque_on_plates(point_data, ages=None, cases=None, plateIDs=None, torque_var='torque', PROGRESS_BAR=True)[source]¶
Function to calculate the torque on plates from the forces acting on a set of points on Earth.
This function is used in the PlateTorques module to calculate the torque on plates arising from slab pull, slab bend, gravitational potential energy (GPE), and mantle drag. It can also be used directly if the user has a set of points on Earth with forces acting on them. Thes should be organised in a dictionary with the ages of interest as keys and the cases as subkeys.
- Parameters:
point_data (dict) – dictionary with point data
ages (float, int, list, numpy.ndarray) – ages of interest (default: None)
cases (str, list) – cases of interest (default: None)
plateIDs (int, float, list, numpy.ndarray) – plateIDs of interest (default: None)
torque_var (str) – variable to calculate torque for (default: “torque”)
PROGRESS_BAR (bool) – flag to enable the tqdm progress bar (default: True)
- calculate_driving_torque(ages=None, cases=None, plateIDs=None, PROGRESS_BAR=True)[source]¶
Function to calculate the driving torque acting on each plate.
The driving torque is the sum of the torques arising from the slab pull and gravitational potential energy (GPE) force.
- Parameters:
ages (float, int, list, numpy.ndarray) – ages of interest (default: None)
cases (str, list) – cases of interest (default: None)
plateIDs (int, float, list, numpy.ndarray) – plateIDs of interest (default: None)
torque_var (str) – variable to calculate torque for (default: “torque”)
PROGRESS_BAR (bool) – flag to enable the tqdm progress bar (default: True)
- calculate_residual_torque(ages=None, cases=None, plateIDs=None, PROGRESS_BAR=True)[source]¶
Function to calculate the residual torque acting on each plate.
The residual torque is the sum of the torques arising from driving (slab pull and gravitational potential energy (GPE) force) and resistive forces (slab bend and mantle drag force).
- Parameters:
ages (float, int, list, numpy.ndarray) – ages of interest (default: None)
cases (str, list) – cases of interest (default: None)
plateIDs (int, float, list, numpy.ndarray) – plateIDs of interest (default: None)
torque_var (str) – variable to calculate torque for (default: “torque”)
PROGRESS_BAR (bool) – flag to enable the tqdm progress bar (default: True)
- calculate_synthetic_velocity(ages=None, cases=None, plateIDs=None, PROGRESS_BAR=True, RECONSTRUCTED_CASES=False)[source]¶
Function to calculate synthetic velocity of plates.
The synthetic velocity is calculated by summing all torques acting on a plate, except for the mantle drag torque.
- Parameters:
ages (float, int, list, numpy.ndarray) – ages of interest (default: None)
cases (str, list) – cases of interest (default: None)
plateIDs (int, float, list, numpy.ndarray) – plateIDs of interest (default: None)
torque_var (str) – variable to calculate torque for (default: “torque”)
PROGRESS_BAR (bool) – flag to enable the tqdm progress bar (default: True)
- rotate_torque(reference_rotations, reference_plates, torque='slab_pull_torque', ages=None, cases=None, plateIDs=None, reference_case=None, PROGRESS_BAR=True)[source]¶
Function to rotate a torque vector stored in another the Plates object to the reference frame of this Plates object.
- Parameters:
reference_rotations (dict, xarray.Dataset) – reference rotations to use for rotation
reference_plates (dict, xarray.Dataset) – reference plates to use for rotation
torque (str) – torque to rotate (default: “slab_pull_torque”)
ages (float, int, list, numpy.ndarray) – ages of interest (default: None)
cases (str, list) – cases of interest (default: None)
plateIDs (int, float, list, numpy.ndarray) – plateIDs of interest (default: None)
torque_var (str) – variable to calculate torque for (default: “torque”)
PROGRESS_BAR (bool) – flag to enable the tqdm progress bar (default: True)
- extract_data_through_time(ages=None, cases=None, plateIDs=None, var='velocity_rms_mag')[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[str]) – cases of interest (default: None)
plateIDs (int, float, list[int, float], numpy.ndarray) – plateIDs of interest (default: None)
var (str) – variable to extract (default: “velocity_rms_mag”)
- Returns:
extracted data with age as index and plateID as columns
- Return type:
dict[str, pandas.DataFrame] or pandas.DataFrame if only one case is selected
- save(ages=None, cases=None, plateIDs=None, file_dir=None, PROGRESS_BAR=True)[source]¶
Function to export the Plates object. All files are saved as .parquet files to reduce file size and enable rapid reloading. The Plates object can be filtered by age, case, and plateID. By default, the files are saved to the directory specified in the settings object. The user can specify the directory to store the files using the file_dir.
- Parameters:
ages (float, int, list, numpy.ndarray) – ages of interest (default: None)
cases (str, list[str]) – cases of interest (default: None)
plateIDs (int, float, list[int, float], numpy.ndarray) – plateIDs of interest (default: None)
file_dir (str) – directory to store files (default: None)
PROGRESS_BAR (bool) – flag to enable the tqdm progress bar (default: True)
- export(ages=None, cases=None, plateIDs=None, file_dir=None, PROGRESS_BAR=True)[source]¶
Function to export the Plates object. Geometries are exported as shapefiles, data are exported as .csv files. The Plates object can be filtered by age, case, and plateID. By default, the files are saved to the directory specified in the settings object. The user can specify the directory to store the files using the file_dir.
- Parameters:
ages (float, int, list, numpy.ndarray) – ages of interest (default: None)
cases (str, list[str]) – cases of interest (default: None)
plateIDs (int, float, list[int, float], numpy.ndarray) – plateIDs of interest (default: None)
file_dir (str) – directory to store files (default: None)
PROGRESS_BAR (bool) – flag to enable the tqdm progress bar (default: True)