Skip to main content

Quagmire

Quagmire is a Python surface process framework for building erosion and deposition models on highly parallel, decomposed structured and unstructured meshes.

Quagmire is structured into three major classes that inherit methods and attributes from lower tiers.

Quagmire hierarchy

The Surface Processes class inherits from the Topography class, which in turn inherits from TriMesh or PixMesh depending on the type of mesh.

Installation

Numpy and a fortran compiler, preferably gfortran, are required to install Quagmire.

  • python setup.py build
    • If you change the fortran compiler, you may have to add the flags config_fc --fcompiler=<compiler name> when setup.py is run (see docs for numpy.distutils).
  • python setup.py install

Dependencies

Running this code requires the following packages to be installed:

  • Python 3.7.x and above
  • Numpy 1.9 and above
  • Scipy 0.15 and above
  • mpi4py
  • petsc4py
  • stripy
  • h5py (optional - for saving parallel data)
  • Matplotlib (optional - for visualisation)

PETSc installation

PETSc is used extensively via the Python frontend, petsc4py. It is required that PETSc be configured and installed on your local machine prior to using Quagmire. You can use pip to install petsc4py and its dependencies.

[sudo] pip install numpy mpi4py
[sudo] pip install petsc petsc4py

If that fails you must compile these manually.

HDF5 installation

This is an optional installation, but it is very useful for saving data that is distributed across multiple processes. If you are compiling HDF5 from source it should be configured with the --enable-parallel flag:

CC=/usr/local/mpi/bin/mpicc ./configure --enable-parallel --enable-shared --prefix=<install-directory>
make	# build the library
make check	# verify the correctness
make install

You can then point to this install directory when you install h5py.

Usage

Quagmire is highly scalable. All of the python scripts in the tests subdirectory can be run in parallel, e.g.

mpirun -np 4 python stream_power.py

where the number after the -np flag specifies the number of processors.

Tutorials

Tutorials with worked examples can be found in the Notebooks subdirectory. These are Jupyter Notebooks that can be run locally. We recommend installing FFmpeg to create videos in some of the notebooks.

The topics covered in the Notebooks include:

Meshing

  • Square mesh
  • Elliptical mesh
  • Mesh refinement (e.g. Lloyd's mesh improvement)
  • Poisson disc sampling
  • Mesh Variables
  • quagmire function interface (requires a base mesh)

Flow algorithms

  • Single and multiple downhill pathways
  • Accumulating flow

Erosion and deposition

  • Long-range stream flow models
  • Short-range diffusive evolution

Landscape evolution

  • Explicit timestepping and numerical stability
  • Landscape equilibrium metrics
  • Basement uplift

Release Notes v0.5.0b

This is the first formal 'release' of the code which

Summary of changes

  • Introducing quagmire.function which is a collection of lazy-evaluation objects similar to underworld functions
  • Introducing MeshVariables which wrap PETSc data vectors and provide interoperability with quagmire functions
  • Providing context manager support for changes to topography that automatically update matrices appropriately
  • Making all mesh variable data arrays view only except for assignment from a suitably sized numpy array (this is to ensure correct synchronisation of information in parallel).
  • various @property definitions to handle cases where changes require rebuilding of data structures
  • making many mesh methods private and exposing them via functions
    • upstream integration is a function on the mesh
    • upstream / downstream smoothing is via a mesh function
    • rbf smoothing builds a manager that provides a function interface

Release files for quagmire 0.5.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 quagmire 0.5.0
File Size Uploaded
quagmire-0.5.0.tar.gz 618.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for quagmire 0.5.0
File Interpreter ABI Platform
quagmire-0.5.0-cp37-cp37m-macosx_10_14_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64 Details

Total release size: 1.3 MB

Release files / quagmire-0.5.0.tar.gz

Download URL quagmire-0.5.0.tar.gz
Size 618.8 kB
Tags Source
SHA-256 checksum
How to use checksums
94e6a2d592ff8586485fb2359e89f4a087379c351a317c788edeee5a2db24517
BLAKE2b-256 checksum
How to use checksums
082fd248fe6b7dfbdae50796115047113dee21c319116f1951d8d0f2dd155170
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0

Release files / quagmire-0.5.0-cp37-cp37m-macosx_10_14_x86_64.whl

Download URL quagmire-0.5.0-cp37-cp37m-macosx_10_14_x86_64.whl
Size 681.9 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
de7bbd368f46fd9005b22986b26f83e2a894e699ca2443ea4d66392844522dca
BLAKE2b-256 checksum
How to use checksums
1137559421f571b62f3f101461f1c1610560a973e90b9178ad1c87584ced6a52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.2.1

1 release file

0.2.0

1 release file

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