Skip to content

GPlates/gplately

Repository files navigation

GPlately logo.

PyPI PyPI - Downloads Conda (channel only) downloads GitHub Unitttest Workflow Status (with branch) GitHub Build Doc Workflow Status (with branch) PyPI - Python Version

GPlately was created to accelerate spatio-temporal data analysis by leveraging pyGPlates and PlateTectonicTools within a simplified Python interface. This object-oriented package enables the reconstruction of data through deep geologic time (such as points, lines, polygons, and rasters), the interrogation of plate kinematic information (plate velocities, rates of subduction and seafloor spreading), the rapid comparison of multiple plate motion models, and the plotting of reconstructed output data on maps. All tools are designed to be parallel-safe, accelerating spatio-temporal analysis over multiple CPU processors.

SeedPointGIF

GPlately can be installed using either pip or conda (via the conda-forge channel). For detailed installation instructions, please refer to the Installation section. Additionally, Docker images are available for your convenience.

Sample data is available from EarthByte servers, which include rasters, seafloor age grids, rotation files, and more to help you get started with plate reconstructions.

Citation

Mather, B.R., Müller, R.D., Zahirovic, S., Cannon, J., Chin, M., Ilano, L., Wright, N.M., Alfonso, C., Williams, S., Tetley, M., Merdith, A. (2023) Deep time spatio-temporal data analysis using pyGPlates with PlateTectonicTools and GPlately. Geoscience Data Journal, 1–8. Available from: https://doi.org/10.1002/gdj3.185

@article{Mather2023,
author = {Mather, Ben R. and Müller, R. Dietmar and Zahirovic, Sabin and Cannon, John and Chin, Michael and Ilano, Lauren and Wright, Nicky M. and Alfonso, Christopher and Williams, Simon and Tetley, Michael and Merdith, Andrew},
title = {Deep time spatio-temporal data analysis using pyGPlates with PlateTectonicTools and GPlately},
year = {2023},
journal = {Geoscience Data Journal},
pages = {1-8},
keywords = {geospatial, plate reconstructions, pyGPlates, python, tectonics},
doi = {https://doi.org/10.1002/gdj3.185},
url = {https://rmets.onlinelibrary.wiley.com/doi/abs/10.1002/gdj3.185},
eprint = {https://rmets.onlinelibrary.wiley.com/doi/pdf/10.1002/gdj3.185},
}

Usage

API Reference

Installation

1. Using conda (recommended)

The latest stable public release of GPlately can be installed using conda from the "conda-forge" channel. The following commands will create a new conda environment called "my-gplately-conda-env" and install GPlately within that environment.

conda create -n my-gplately-conda-env
conda activate my-gplately-conda-env
conda install -c conda-forge gplately

✏️ If conda gets stuck while solving the environment during the installation of GPlately, you can try using micromamba instead.

2. Using pip

GPlately can also be installed using pip.

🟢 Install the latest stable public release from PyPI

pip install gplately

🟢 Install from GitHub repository (if you need the latest code changes on GitHub)

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

🟢 Install from a local folder (if you need local code changes)

git clone https://github.com/GPlates/gplately.git gplately.git
cd gplately.git # go into the folder created by "git clone" command
git checkout master # check out the "master" branch or the name of branch you want
git pull # fetch all recent code changes from the GitHub remote repository
# make your local code changes 
pip install . # alternatively, you can use "pip install -e ." to install gplately in editable mode

3. Using Docker 🐳

👉 Run GPlately notebooks with Docker

👉 Run GPlately command with Docker

  • docker run gplates/gplately gplately --version
  • docker run gplates/gplately gplately --help

👉 Run your Python script with Docker

  • docker run -it --rm -v THE_FULL_PATH_TO_YOUR_SCRIPT_FOLDER:/ws -w /ws gplates/gplately python my_script_to_run.py

✏️ Replace THE_FULL_PATH_TO_YOUR_SCRIPT_FOLDER with the full path to the folder containing your script file. In PowerShell, you can use "$PWD" if your script is in the current working directory. On Linux or macOS, you can use `pwd` instead.

Visit this page for more details about using Docker with GPlately.

Dependencies