Points¶
Points is a class that contains data and methods for working with grid points. In the PlateTorques module, the Points class is used to store the grid points of the model and to calculate the GPE torque and mantle drag torques.
- class plato.points.Points(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 points in a reconstruction. A Slabs object can be initialised in multiple ways:
The user can initialise a Points 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 Points object by providing a Settings object and a Reconstruction object from a Globe, Grids, Plates, Points or Slabs object. Providing the settings from a Points object will allow the user to initialise a new Points 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=None)[source]¶
Function to compute velocities at points.
- 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 poles (default: None)
- sample_seafloor_ages(ages=None, cases=None, plateIDs=None, grids=None, vars=['seafloor_age'], PROGRESS_BAR=True)[source]¶
Samples seafloor age at points.
- 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) – seafloor age grids (default: None)
vars (str, list) – variables to sample (default: [“seafloor_age”])
PROGRESS_BAR (bool) – flag to enable progress bar (default: True)
- sample_lab_depths(ages=None, cases=None, plateIDs=None, grids=None, vars=['LAB_depth'], PROGRESS_BAR=True)[source]¶
Samples the depth of the lithosphere-asthenosphere boundary (LAB) at points.
- 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) – grids to sample (default: None)
vars (str, list) – variables to sample (default: [“LAB_depth”])
PROGRESS_BAR (bool) – flag to enable progress bar (default: True)
- sample_grid(ages=None, cases=None, plateIDs=None, grids=None, vars=['seafloor_age'], sampling_coords=['lat', 'lon'], cols=None, default_cases=None, PROGRESS_BAR=True)[source]¶
Samples any grid at points.
- 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) – grids to sample (default: None)
vars (str, list) – variables to sample (default: [“seafloor_age”])
sampling_coords (list) – coordinates to sample (default: [“lat”, “lon”])
cols (str, list) – columns to store sampled data (default: [“seafloor_age”])
default_cases (str) – default cases to sample (default: None)
PROGRESS_BAR (bool) – flag to enable progress bar (default: True)
- calculate_lab_depths(ages=None, cases=None, plateIDs=None, grids=None, PROGRESS_BAR=True)[source]¶
Function to compute the depth of the lithosphere-asthenosphere boundary (LAB) at points.
- 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) – grids to sample (default: None)
PROGRESS_BAR (bool) – flag to enable progress bar (default: True)
- calculate_gpe_force(ages=None, cases=None, plateIDs=None, seafloor_grid=None, PROGRESS_BAR=True)[source]¶
Function to compute gravitational potential energy (GPE) force acting at points.
- 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)
seafloor_grid (dict) – seafloor age grid (default: None)
- calculate_mantle_drag_force(plate_data, ages=None, cases=None, plateIDs=None, PROGRESS_BAR=True)[source]¶
Function to compute mantle drag force acting at points.
- 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)
- 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 along trenches (default: None)
- save(ages=None, cases=None, plateIDs=None, file_dir=None, PROGRESS_BAR=True)[source]¶
Function to save the ‘Points’ object. Data of the points 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 store files (default: None)
- export(ages=None, cases=None, plateIDs=None, file_dir=None, PROGRESS_BAR=True)[source]¶
Function to export the ‘Points’ object. Data of the points object is saved 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 store files (default: None)