Skip to main content

TerraTools

Tools to read, analyse and visualise models written by the TERRA mantle convection code. TerraTools is released under an MIT License.

DOI

Homepage: https://terratools.readthedocs.io/en/latest/
Documentation: https://terratools.readthedocs.io/en/latest/
Source code: https://github.com/mantle-convection-constrained/terratools
Publication: DOI

Citing TerraTools

If you use terratools, please cite the associated JOSS paper. You can make use of the BibTeX entry below:

@article{terratools:2025,
  title = {Terratools: {A} {P}ython package to analyse {TERRA} mantle convection simulations},
  shorttitle = {Terratools},
  author = {Nowacki, Andy and Panton, James and Ward, Jamie and Myhill, Bob and Walker, Andrew and Wookey, James and Davies, J. Huw},
  year = 2025,
  month = dec,
  journal = {Journal of Open Source Software},
  volume = {10},
  number = {116},
  pages = {7539},
  issn = {2475-9066},
  doi = {10.21105/joss.07539},
  urldate = {2025-12-16},
  langid = {english}
}

Installation

Requirements

TerraTools requires Python version 3.9 or newer.

If you want to use the map plotting functions (such as TerraModel.plot_layer), make sure you have a working installation of Cartopy.

Pre-installation

If you are using a Conda-like package manager (e.g., Miniconda or Mamba), we recommend always creating a new environment for each project you are working on into which you install TerraTools. For instance:

conda create -n amazing_mantle_convection_project python=3.11
conda activate amazing_mantle_convection_project

This is entirely optional but often prevents issues with dependency version conflicts.

Installing the latest released version

Installation with pip

Before installing TerraTools with pip, first install and/or upgrade your version of pip:

python -m ensurepip --upgrade

To install the latest released version of TerraTools, then do:

python -m pip install terratools

Installation with dependency management systems

If you use a dependency management system such as Poetry or Pipenv you should add terratools as a dependency of your project.

Installing the development version

You can also install the latest development version of TerraTools from source. To do this, first clone the repository onto your local machine using git:

git clone https://github.com/mantle-convection-constrained/terratools.git

Then navigate to the top level directory and install in development mode:

  • Using pip (-e for an 'editable' development install and the .[dev] group for the extra development dependencies):
     cd terratools; python -m pip install -ve '.[dev]'
    
  • Using Poetry:
    cd terratools; poetry install --all-extras
    
  • Using uv (install dev dependencies by default):
    cd terratools; uv sync
    

Post-installation

Finally, check you have a fully working installation:

python -c "import terratools"

Reporting bugs

If you would like to report any bugs, please raise an issue on GitHub.

Contributing to TerraTools

If you would like to contribute bug fixes, new functions or new modules to the existing codebase, please fork the terratools repository, make the desired changes and then make a pull request on GitHub.

Acknowledgement and Support

This project is supported by NERC Large Grant MC-squared.

Metadata

Release files for terratools 1.2.1

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

Source distribution (sdist)

Source distribution for terratools 1.2.1
File Size Uploaded Provenance
terratools-1.2.1.tar.gz 114.7 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 232.9 kB

Release files / terratools-1.2.1.tar.gz

Download URL terratools-1.2.1.tar.gz
Size 114.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2a868260783e00db4830612e82890609570146b5d164c359af4eab2e43f26015
BLAKE2b-256 checksum
How to use checksums
f10d1d9361979d8acea8f6acdd87390b764b0610b4752500feb5335af62e5d27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.12 Darwin/24.6.0

Release files / terratools-1.2.1-py3-none-any.whl

Download URL terratools-1.2.1-py3-none-any.whl
Size 118.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba423d930a35e9456a1a1e5ee8a188d4a2b7308e0476e07ec21cb8276ca0f9c7
BLAKE2b-256 checksum
How to use checksums
9643bac97e889a4e4fe72ba8baf9a71ff99cef68cde0ed3accc41fce07215111
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.12 Darwin/24.6.0

Security for terratools 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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