Skip to content

The GPlates Web Service Python Wrapper allows users to access GPlates Web Service more easily via simple Python programming interface.

License

Notifications You must be signed in to change notification settings

michaelchin/gwspy

Repository files navigation

GPlates Web Service Python Wrapper

build badge PyPI version

GPlates

The GPlates Web Service Python Wrapper allows users to access GPlates Web Service more easily via a simple Python programming interface. This Python package is a part of GPlates software suite. GPlates is an open source project funded by AuScope.

Installation

pip install gwspy

How to use

The following Python code reconstructs three locations to 100Ma with Muller2019 reconstruction model.

  # pip install gwspy shapely
  import shapely
  from gwspy import PlateModel, reconstruct_shapely_points

  lats = [50, 10, 50]
  lons = [-100, 160, 100]
  points = [shapely.Point(x, y) for x, y in zip(lons, lats)]

  model = PlateModel("Muller2019")
  paleo_points = reconstruct_shapely_points(model, points, 100)
  print(paleo_points)

GPlates Web Service server

By default, https://gws.gplates.org is used. You can use .env file to specify your service URL. Alternertively, you can export GWS_URL=https://your-service-url in a terminal.

See env.template and setup GWS server with Docker.

Dependencies

API reference

API reference can be found at https://michaelchin.github.io/gwspy/.

Contact

The EarthByte group at the University of Sydney is responsible for maintaining the GPlates software suite.

Examples

👉 reconstruct_shapely_points.py

The red dots are present-day locations. The blue dots are paleo-locations at 100Ma.

reconstruct_shapely_points

👉 plot_subduction_zones.py

plot_subduction_zones

👉 plot_topological_plate_polygons.py

plot_topological_plate_polygons

All Examples

About

The GPlates Web Service Python Wrapper allows users to access GPlates Web Service more easily via simple Python programming interface.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published