Skip to main content

GPlatesReconstructionModel

Prototyping for GPlates plate reconstructions as a python class

  • Usage examples are available in the test_notebooks directory

Installation

Install directly from GitHub with pip:

pip install git+https://github.com/siwill22/GPlatesReconstructionModel

This pulls in every core dependency automatically, including pygplates and PlateTectonicTools, both of which are ordinary PyPI packages.

To also install the optional dependencies for plotting, geophysics helpers, and additional spatial algorithms, install the all extra:

pip install "gprm[all] @ git+https://github.com/siwill22/GPlatesReconstructionModel"

A plain install needs no system packages — every core dependency has wheels on PyPI for Linux, macOS and Windows. That means the data-preparation and analysis path (fetching reconstruction models, assigning plate IDs, reconstructing data, plate snapshots, and all proximity calculations) runs on a headless machine or in CI with nothing but pip install.

pygmt is deliberately not a core dependency, because it is a wrapper around the GMT command-line library and does not bundle GMT itself — that is the one thing pip cannot install for you. It is only needed for plotting and for a few grid-sampling helpers, all of which import it at the point of use and tell you what to install if it is missing.

Python Dependencies

Required (installed automatically, all pip-installable):

  • numpy, scipy, pandas
  • geopandas, shapely, rasterio
  • matplotlib, xarray, cartopy
  • pygplates
  • PlateTectonicTools (https://github.com/EarthByte/PlateTectonicTools) — this itself imports cartopy unconditionally, which is why cartopy is required rather than optional
  • pooch, requests, tqdm, pyyaml

Optional extras:

  • pip install "gprm[viz]" — pygmt (plotting, grid sampling). pygmt also needs GMT >=6 installed separately: conda install -c conda-forge gmt, Homebrew's gmt, or your Linux package manager.
  • pip install "gprm[geophysics]" — pyshtools, litho1pt0, pmagpy
  • pip install "gprm[spatial]" — astropy-healpix, scikit-image, scikit-learn (if astropy-healpix is not installed, some functions fall back on precomputed point distributions in the Data folder)
  • pip install "gprm[all]" — everything above

Where downloaded data goes

Datasets are cached with pooch, in a platform-dependent location. Ask for it rather than writing it out by hand:

from gprm.datasets import cache_path
cache_path()                                    # the cache root
cache_path('TorsvikCocks2017', 'CEED6_LAND.gpml')  # a file inside a fetched bundle

Note on stripy: gprm no longer uses stripy directly, but geophysics still pulls it in transitively via litho1pt0. stripy has no prebuilt wheel for Apple Silicon macOS on any Python version, and none at all for Python 3.13+. On those platforms pip will try to build it from source, which needs a Fortran compiler (e.g. brew install gcc on macOS, or conda install -c conda-forge stripy as an alternative to pip for just that package). This means pip install "gprm[geophysics]" and "gprm[all]" can fail on those platforms even though the bare install and [spatial]/[viz] do not.

Release files for gprm 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gprm 0.2.0
File Size Uploaded
gprm-0.2.0.tar.gz 6.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for gprm 0.2.0
File Interpreter ABI Platform
gprm-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 MB

Release files / gprm-0.2.0.tar.gz

Download URL gprm-0.2.0.tar.gz
Size 6.3 MB
Tags Source
SHA-256 checksum
How to use checksums
d6f5bb6038bd3dd1f3c9db7552bc6f4dd7a72fe681c02baf7223c7176fa134ea
BLAKE2b-256 checksum
How to use checksums
f85f7738c1bac6631fc33ac4b067457108596c40aaa81271d438f0a7b9a57e4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.11

Release files / gprm-0.2.0-py3-none-any.whl

Download URL gprm-0.2.0-py3-none-any.whl
Size 6.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e263981464e6b7783208f9c569080dd8e8dc1c557533e5adfa1822d4cc9053e0
BLAKE2b-256 checksum
How to use checksums
e4da30baa969f6d89e30b28b7ded9f0a2b1794a2b9f2634fc2260fc651c3488a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page