Skip to main content

Object-orientated Python interface to pyGPlates for plate tectonic reconstructions

Project description

GPlately

GPlately is an object-oriented interface to common pyGPlates and PlateTectonicTools routines.

SeedPointGIF

Dependencies

Installation

You can install GPlately using the pip package manager,

pip install gplately

... you can also install the most updated version of the GPlately repository with pip:

pip install git+https://github.com/GPlates/gplately.git 

Usage

GPlately uses objects to accomplish a variety of common tasks. The common objects include:

  • DataServer - download rotation files and topology features from plate models on EarthByte's webDAV server
  • PlateReconstruction - reconstruct features, tesselate mid ocean ridges, subduction zones
  • Points - partition points onto plates, rotate back through time
  • Raster - read in NetCDF grids, interpolation, resampling
  • PlotTopologies - one stop shop for plotting ridges, trenches, subduction teeth

The DataServer object

GPlately's DataServer object can be used to download:

  • rotation models
  • topology features
  • static polygons
  • coastlines
  • continents
  • continent-ocean boundaries
  • age grids and rasters
  • geological feature data

from assorted plate reconstruction models. These files are needed to construct most of GPlately's objects. For example, we can download a rotation model, a set of topology features and some static polygons from the Müller et al. 2019 global Mesozoic–Cenozoic deforming plate motion model.

gDownload = gplately.DataServer("Muller2019")
rotation_model, topology_features, static_polygons = gDownload.get_plate_reconstruction_files()

The PlateReconstruction object

... contains methods to reconstruct the positions of present-day feature data back through geological time. You can also use it to calculate plate model data like topological plate velocities, or total trench and ridge lengths per Ma! You can create the object by passing a rotation model, a set of topology features and some static polygons:

model = gplately.PlateReconstruction(rotation_model, topology_features, static_polygons)

Launch the Plate Reconstruction notebook to see more.

The PlotTopologies object

... can be used to visualise reconstructed feature geometries through time. To call the object, pass a set of continents, coastlines and COBs (either as file paths or as <pyGPlates.FeatureCollection> objects), as well as a PlateReconstruction object, and a reconstruction time.

coastlines, continents, COBs = gDownload.get_topology_geometries()
time = 50 #Ma
gPlot = gplately.plot.PlotTopologies(model, time, coastlines, continents, COBs)

Below are some continents, coastlines, COBs, ridges and transforms, trenches, subduction teeth and seafloor age grids plotted using PlotTopologies!

ReconstructionImage

The Points object

... can be used to reconstruct the positions of geological point features and calculate their underlying plate velocities through geological time.

pt_lon = np.array([-107.662152, -58.082792, 17.483189, 133.674590, 80.412876])
pt_lat = np.array([48.797807, -12.654857, 11.884395, -26.415630, 31.368509])

# Call the Points object: pass the PlateReconstruction object, and the latitudes and longitudes of the seed points!
gpts = gplately.Points(model, pt_lon, pt_lat)

PointData

The Raster object

...can be used to read, resample and resize assorted raster data like netCDF4 seafloor age grids, continental grids and ETOPO relief rasters. You can also reconstruct raster data back through geological time!

time = 0
agegrid = gdownload.get_age_grid(time)
graster = gplately.Raster(model, array=agegrid, extent=[-180,180,-90,90])

Below is a plot of the original Müller et al. (2019) age grid (L) and an age-grid resampled with the Raster object (R):

RasterImg

Sample workflows

To see GPlately in action, launch a Jupyter Notebook environment and check out the sample notebooks:

API Documentation

Documentation of GPlately's objects and methods can be found here!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gplately-0.1.macosx-11.0-arm64.tar.gz (151.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page