terrainbento

A modular landscape evolution modeling package built on top of the Landlab Toolkit.

https://github.com/terrainbento/terrainbento

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

numerical-modeling
Last synced: 6 months ago · JSON representation ·

Repository

A modular landscape evolution modeling package built on top of the Landlab Toolkit.

Basic Info
Statistics
  • Stars: 20
  • Watchers: 5
  • Forks: 8
  • Open Issues: 16
  • Releases: 13
Created almost 8 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Code of conduct Citation

README.md

| Thing | Badge | | :---: | :---: | | CI Status | Test | | Coverage | Coverage Status | | Docs | Documentation Status | | Notebooks | Notebooks | | License | License: MIT | | Style | Code style: black | | DOI | DOI | | Conda Recipe | Conda Recipe | | Downloads | Conda Downloads | | Version | Conda Version | | Platforms | Conda Platforms | | Binder | 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 Binder 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)

Example terrainbento run

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

All Time
  • Total Commits: 1,212
  • Total Committers: 8
  • Avg Commits per committer: 151.5
  • Development Distribution Score (DDS): 0.14
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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
enhancement (6)
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

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 37 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 13.3%
Stargazers count: 14.6%
Dependent repos count: 21.5%
Average: 27.8%
Downloads: 79.4%
Maintainers (2)
Last synced: 7 months ago
conda-forge.org: terrainbento

A modular landscape evolution modeling package for mulit-model analysis built on top of the Landlab Toolkit.

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 3
Rankings
Dependent repos count: 18.0%
Average: 43.4%
Dependent packages count: 51.6%
Stargazers count: 51.8%
Forks count: 52.1%
Last synced: 6 months ago

Dependencies

pyproject.toml pypi
.github/workflows/docs.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/lint.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/test-notebooks.yml actions
  • actions/checkout v4 composite
  • conda-incubator/setup-miniconda v3 composite
.github/workflows/test.yml actions
  • AndreMiras/coveralls-python-action develop composite
  • actions/checkout v4 composite
  • conda-incubator/setup-miniconda v3 composite
requirements-extra/requirements-build.txt pypi
  • build *
  • twine *
  • zest.releaser *
requirements-extra/requirements-dev.txt pypi
  • nox * development
requirements-extra/requirements-docs.txt pypi
  • sphinx *
  • sphinx_rtd_theme *
requirements-extra/requirements-notebooks.txt pypi
  • holoviews *
  • jupyter *
  • matplotlib *
  • pandas *
requirements-extra/requirements-testing.txt pypi
  • coveralls * test
  • pytest * test
  • pytest-cov * test
  • pytest-datadir * test
requirements.txt pypi
  • dask *
  • landlab >=2.6
  • numpy >=1.20,<2
  • pyyaml *
  • scipy *
  • xarray >=0.16