terrainbento
A modular landscape evolution modeling package built on top of the Landlab Toolkit.
Science Score: 77.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
4 of 8 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.1%) to scientific vocabulary
Keywords from Contributors
Repository
A modular landscape evolution modeling package built on top of the Landlab Toolkit.
Basic Info
- Host: GitHub
- Owner: TerrainBento
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://terrainbento.readthedocs.io/
- Size: 8.15 MB
Statistics
- Stars: 20
- Watchers: 5
- Forks: 8
- Open Issues: 16
- Releases: 13
Metadata Files
README.md
| Thing | Badge |
| :---: | :---: |
| CI Status | |
| Coverage |
|
| Docs |
|
| Notebooks |
|
| License |
|
| Style |
|
| DOI |
|
| Conda Recipe |
|
| Downloads |
|
| Version |
|
| Platforms |
|
| Binder |
|
terrainbento
A modular landscape evolution modeling package built on top of the Landlab Toolkit.
terrainbento"s User Manual is located at our Read The Docs page.
We recommend that you start with a set of Jupyter notebooks that introduce terrainbento and the model description paper Barnhart et al. (2019). The link above goes to a Binder instance, if you want the notebooks themselves clone the repo and navigate to the directory
notebooks.
A quick example
The following is all the code needed to run the Basic model. There are a few different options available to create a model, here we will create one from a file-like object. The string will contain the same information as a YAML style input file that specifies the model construction and run.
```python from terrainbento import Basic
params = { # create the Clock. "clock": {"start": 0, "step": 10, "stop": 1e5},
# Create the Grid
"grid": {
"RasterModelGrid": [
(200, 320),
{
"xy_spacing": 10
},
{
"fields": {
"node": {
"topographic__elevation": {
"random": [{
"where": "CORE_NODE"
}]
}
}
}
},
]
},
# Set up Boundary Handlers
"boundary_handlers":{"NotCoreNodeBaselevelHandler": {"modify_core_nodes": True,
"lowering_rate": -0.001}},
# Parameters that control output.
"output_interval": 1e3,
"save_first_timestep": True,
"fields":["topographic__elevation"],
# Parameters that control process and rates.
"water_erodibility" : 0.001,
"m_sp" : 0.5,
"n_sp" : 1.0,
"regolith_transport_parameter" : 0.2,
}
model = Basic.from_dict(params) model.run() ```
Next we make an image for each output interval.
```python from landlab import imshow_grid
filenames = [] ds = model.toxarraydataset() for i in range(ds.topographicelevation.shape[0]): filename = "tempoutput."+str(i)+".png" imshowgrid(model.grid, ds.topographicelevation.values[i, :, :], cmap="viridis", limits=(0, 12), output=filename) filenames.append(filename) model.removeoutputnetcdfs()
```
Finally we compile the images into a gif.
python
import os
import imageio
with imageio.get_writer("terrainbento_example.gif", mode="I") as writer:
for filename in filenames:
image = imageio.imread(filename)
writer.append_data(image)
os.remove(filename)

Installation instructions
Before installing terrainbento you will need a Python distribution. We recommend that you use the Anaconda python distribution. We strongly suggest that you install the current 3.* version of Python.
To install the release version of terrainbento (this is probably what you want) we support conda and pip package management.
Using conda
Open a terminal and execute the following:
conda config --add channels conda-forge
conda install terrainbento
Using pip
Open a terminal and execute the following:
pip install terrainbento
From source code
To install the terrainbento source code version of terrainbento we recommend creating a conda environment for terrainbento.
git clone https://github.com/TerrainBento/terrainbento.git
cd terrainbento
conda env create -f environment-dev.yml
conda activate terrainbento_dev
pip install .
Notes for developers
If you plan to develop with terrainbento, please fork terrainbento, clone the forked repository, and create an editable install with:
bash
pip install -e .
We use nox for most project tasks in terrainbento.
Install nox and list the available sessions with:
bash
pip install -e ".[dev]"
nox --list
To use nox to run the terrainbento tests, for example, call the test session:
bash
nox -s test
If you have any questions, please contact us by making an issue.
How to cite
Barnhart, K. R., Glade, R. C., Shobe, C. M., and Tucker, G. E.: Terrainbento 1.0: a Python package for multi-model analysis in long-term drainage basin evolution, Geosci. Model Dev., 12, 1267-1297, https://doi.org/10.5194/gmd-12-1267-2019, 2019.
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# https://citation-file-format.github.io/cff-initializer-javascript
cff-version: 1.2.0
title: Terrainbento
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Katherine R.
family-names: Barnhart
orcid: 'https://orcid.org/0000-0001-5682-455X'
- given-names: Rachel C.
family-names: Glade
orcid: 'https://orcid.org/0000-0002-0345-1953'
- given-names: Charles M.
family-names: Shobe
orcid: 'https://orcid.org/0000-0003-3015-1283'
- given-names: Gregory E.
family-names: Tucker
orcid: 'https://orcid.org/0000-0003-0364-5800'
identifiers:
- type: doi
value: 10.5194/gmd-12-1267-2019
- type: url
value: 'https://doi.org/10.5194/gmd-12-1267-2019'
repository-code: 'https://github.com/TerrainBento/terrainbento'
url: 'https://terrainbento.readthedocs.io'
abstract: >-
A modular landscape evolution modeling package built on
top of the Landlab Toolkit.
keywords:
- earth science
- landlab
- landscape evolution modeling
- numerical modeling
license: MIT
commit: cbf9d93
version: v2.0.1
date-released: '2024-09-11'
GitHub Events
Total
Last Year
Committers
Last synced: almost 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| kbarnhart | k****t@g****m | 1,042 |
| cmshobe | c****e@e****u | 74 |
| Rachel Glade | r****e@c****u | 60 |
| Greg Tucker | g****r@c****u | 23 |
| mcflugen | m****n@g****m | 10 |
| Katy Barnhart | k****t@u****m | 1 |
| Katy Barnhart | k****t@u****v | 1 |
| alexmitchell | a****l@u****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 50
- Total pull requests: 67
- Average time to close issues: 14 days
- Average time to close pull requests: 6 days
- Total issue authors: 5
- Total pull request authors: 5
- Average comments per issue: 0.76
- Average comments per pull request: 0.9
- Merged pull requests: 63
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 6
- Pull requests: 10
- Average time to close issues: 8 days
- Average time to close pull requests: about 20 hours
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 1.33
- Average comments per pull request: 0.8
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- kbarnhart (39)
- mdpiper (6)
- alexmitchell (2)
- cmshobe (2)
- gregtucker (1)
Pull Request Authors
- kbarnhart (47)
- mdpiper (18)
- gregtucker (6)
- cmshobe (2)
- alexmitchell (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 37 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 4
(may contain duplicates) - Total versions: 16
- Total maintainers: 2
pypi.org: terrainbento
TerrainBento suite of landscape evolution models
- Documentation: https://terrainbento.readthedocs.io/
- License: MIT License
-
Latest release: 2.0.1
published over 1 year ago
Rankings
Maintainers (2)
conda-forge.org: terrainbento
A modular landscape evolution modeling package for mulit-model analysis built on top of the Landlab Toolkit.
- Homepage: https://terrainbento.github.io
- License: MIT
-
Latest release: 2.0.0
published almost 6 years ago
Rankings
Dependencies
- actions/checkout v4 composite
- actions/setup-python v4 composite
- actions/checkout v4 composite
- actions/setup-python v4 composite
- actions/checkout v4 composite
- conda-incubator/setup-miniconda v3 composite
- AndreMiras/coveralls-python-action develop composite
- actions/checkout v4 composite
- conda-incubator/setup-miniconda v3 composite
- build *
- twine *
- zest.releaser *
- nox * development
- sphinx *
- sphinx_rtd_theme *
- holoviews *
- jupyter *
- matplotlib *
- pandas *
- coveralls * test
- pytest * test
- pytest-cov * test
- pytest-datadir * test
- dask *
- landlab >=2.6
- numpy >=1.20,<2
- pyyaml *
- scipy *
- xarray >=0.16