Package: quagmire
QuagmireQuagmire 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.The Surface Processes class inherits from the Topography class, which in turn inherits from TriMesh or PixMesh depending on the type of mesh.InstallationNumpy and a fortran compiler, preferablygfortran, are required to install Quagmire.python setup.py buildIf you change the fortran compiler, you may have to add the
flagsconfig_fc --fcompiler=<compiler name>when setup.py is run
(see docs fornumpy.distutils).python setup.py installDependenciesRunning this code requires the following packages to be installed:Python 3.7.x and aboveNumpy 1.9 and aboveScipy 0.15 and abovempi4pypetsc4pystripyh5py(optional - for saving parallel data)Matplotlib (optional - for visualisation)PETSc installationPETSc 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 petsc4pyIf that fails you must compile these manually.HDF5 installationThis is an optional installation, but it is very useful for saving data that is distributed across multiple processes. If you are compiling HDF5 fromsourceit should be configured with the--enable-parallelflag:CC=/usr/local/mpi/bin/mpicc ./configure --enable-parallel --enable-shared --prefix=<install-directory>
make	# build the library
make check	# verify the correctness
make installYou can then point to this install directory when you installh5py.UsageQuagmire is highly scalable. All of the python scripts in thetestssubdirectory can be run in parallel, e.g.mpirun -np 4 python stream_power.pywhere the number after the-npflag specifies the number of processors.TutorialsTutorials with worked examples can be found in theNotebookssubdirectory. These are Jupyter Notebooks that can be run locally. We recommend installingFFmpegto create videos in some of the notebooks.The topics covered in the Notebooks include:MeshingSquare meshElliptical meshMesh refinement (e.g. Lloyd's mesh improvement)Poisson disc samplingMesh Variablesquagmire function interface (requires a base mesh)Flow algorithmsSingle and multiple downhill pathwaysAccumulating flowErosion and depositionLong-range stream flow modelsShort-range diffusive evolutionLandscape evolutionExplicit timestepping and numerical stabilityLandscape equilibrium metricsBasement upliftRelease Notes v0.5.0bThis is the first formal 'release' of the code whichSummary of changesIntroducing quagmire.function which is a collection of lazy-evaluation objects similar to underworld functionsIntroducing MeshVariables which wrap PETSc data vectors and provide interoperability with quagmire functionsProviding context manager support for changes to topography that automatically update matrices appropriatelyMaking 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 structuresmaking many mesh methods private and exposing them via functionsupstream integration is a function on the meshupstream / downstream smoothing is via a mesh functionrbf smoothing builds a manager that provides a function interface