glacier-flow-model
Modeling glaciers on a digital elevation model (DEM) based on mass balance and a modified D8 flow algorithm applied to ice.
Science Score: 54.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
-
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.5%) to scientific vocabulary
Keywords
digital-elevation-model
geographical-information-system
geospatial
glacier
glaciers-flow
gradient
mass-balance
modeling
Keywords from Contributors
mesh
interpretability
sequences
generic
projection
interactive
optim
hacking
network-simulation
Last synced: 6 months ago
·
JSON representation
·
Repository
Modeling glaciers on a digital elevation model (DEM) based on mass balance and a modified D8 flow algorithm applied to ice.
Basic Info
- Host: GitHub
- Owner: munterfi
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://doi.org/10.5281/zenodo.6418201
- Size: 9.97 MB
Statistics
- Stars: 22
- Watchers: 4
- Forks: 11
- Open Issues: 5
- Releases: 8
Topics
digital-elevation-model
geographical-information-system
geospatial
glacier
glaciers-flow
gradient
mass-balance
modeling
Created over 8 years ago
· Last pushed 6 months ago
Metadata Files
Readme
Changelog
Contributing
License
Citation
README.rst
.. image:: https://raw.githubusercontent.com/munterfi/glacier-flow-model/master/docs/source/_static/logo.svg
:width: 120 px
:alt: https://github.com/munterfi/glacier-flow-model
:align: right
==================
Glacier flow model
==================
.. image:: https://zenodo.org/badge/96700423.svg
:target: https://zenodo.org/badge/latestdoi/96700423
.. image:: https://img.shields.io/pypi/v/glacier-flow-model.svg
:target: https://pypi.python.org/pypi/glacier-flow-model
.. image:: https://github.com/munterfi/glacier-flow-model/workflows/check/badge.svg
:target: https://github.com/munterfi/glacier-flow-model/actions?query=workflow%3Acheck
.. image:: https://readthedocs.org/projects/glacier-flow-model/badge/?version=latest
:target: https://glacier-flow-model.readthedocs.io/en/latest/
:alt: Documentation Status
.. image:: https://codecov.io/gh/munterfi/glacier-flow-model/branch/master/graph/badge.svg?token=2Kh9EboLXx
:target: https://codecov.io/gh/munterfi/glacier-flow-model
Modeling glaciers on a digital elevation model (DEM) based on mass balance and
a modified D8 flow algorithm applied to ice.
The modeling is based on a linear relationship between altitude and mass
balance, the so-called mass balance gradient. For alpine glaciers this gradient
is about 0.006 m/m. Continental glaciers tend to be at 0.003 and maritime
glaciers at 0.01 m/m. The alpine gradient is set by default in the model.
To model the glaciers, annual steps are calculated. First the mass balance
(accumulation and ablation) for the area is added to the glacier layer and in a
second step the glacier flow is simulated by using a modified D8 technique
(submodule :code:`fracd8`).
Since the prupose of the D8 flow direction algorithm is modeling surface water
flows over terrain, the D8 algorithm was modified to be able to consider the
fraction of ice that is flowing out of each cell based on the glaciers
velocity. In order to avoid pure convergence of the flow, the surface of the
glaciers is slightly smoothed. The simulation stops when the observed
difference in mass balance for a smoothed curve (default
:code:`MODEL_TREND_SIZE=100`) is less than a given tolerance (default
:code:`MODEL_TOLERANCE=0.0001`).
Getting started
---------------
The **glacier-flow-model** package depends on GDAL, which needs to be installed
on the system.
Get the stable release of the package from pypi:
.. code-block:: shell
pip install glacier-flow-model
Example data
____________
The package includes an example DEM from `swisstopo `_.
It covers a smaller extent around the Aletsch glacial arena in Switzerland with
a raster cell resolution of 200m.
.. code-block:: python
from glacier_flow_model import PkgDataAccess
dem = PkgDataAccess.load_dem()
The original DEM can be downloaded `here `_.
Usage
_____
To set up a glacier flow model, a path to a DEM in the GeoTiff file format has
to passed to the model class constructor. By default the mass balance
parameters for alpine glaciers in the year 2000 are set. Keep the input file
size small, otherwise the model may be slowed down remarkably:
.. code-block:: python
import logging
from glacier_flow_model import GlacierFlowModel, PkgDataAccess
LOG_FORMAT = "[%(asctime)s %(levelname)s] %(message)s (%(name)s)"
logging.basicConfig(format=LOG_FORMAT, level=logging.INFO)
gfm = GlacierFlowModel(PkgDataAccess.locate_dem())
After initialization, the model needs to accumulate the initial ice mass until
it reaches a steady state, call the :code:`reach_steady_state` method to do so:
.. code-block:: python
gfm.reach_steady_state()
.. image:: https://raw.githubusercontent.com/munterfi/glacier-flow-model/master/docs/source/_static/steady_state_initial.png
:alt: https://github.com/munterfi/glacier-flow-model
:align: center
When the model is in a steady state, a temperature change of the climate can be
simulated. Simply use the :code:`simulate` method with a positive or negative
temperature change in degrees. The model changes the temperature gradually and
simulates years until it reaches a steady state again.
Heating 4.5°C after initial steady state:
.. code-block:: python
gfm.simulate(4.5)
.. image:: https://raw.githubusercontent.com/munterfi/glacier-flow-model/master/docs/source/_static/steady_state_heating.png
:alt: https://github.com/munterfi/glacier-flow-model
:align: center
Cooling -3°C after initial steady state:
.. code-block:: python
gfm.simulate(-3)
.. image:: https://raw.githubusercontent.com/munterfi/glacier-flow-model/master/docs/source/_static/steady_state_cooling.png
:alt: https://github.com/munterfi/glacier-flow-model
:align: center
Export the results of the model into :code:`.csv` and :code:`.tif` files:
.. code-block:: python
gfm.export()
The GeoTiff contains the following bands, averaged over the last 10 simulation
years (default :code:`MODEL_RECORD_SIZE=10`):
1. Glacier thickness [m].
2. Velocity at medium height [m/a].
3. Mass balance [m].
Check out the `video `_ of the scenario simulation in the Aletsch
glacial arena in Switzerland
Limitations
-----------
The model has some limitations that need to be considered:
- The flow velocity of the ice per year is limited by the resolution of the
grid cells. Therefore, a too high resolution should not be chosen for the
simulation.
- The modeling of ice flow is done with D8, a technique for modeling surface
flow in hydrology. Water behaves fundamentally different from ice, which is
neglected by the model (e.g. influence of crevasses).
- The flow velocity only considers internal ice deformation (creep). Basal
sliding, and soft bed deformation are ignored.
- No distinction is made between snow and ice. The density of the snow or ice
mass is also neglected in the vertical column.
License
-------
This project is licensed under the MIT License - see the LICENSE file for
details
Owner
- Name: Merlin Unterfinger
- Login: munterfi
- Kind: user
- Location: Zurich, Switzerland
- Company: SBB (Swiss Federal Railways)
- Website: maptic.ch
- Twitter: munterfi1
- Repositories: 29
- Profile: https://github.com/munterfi
Data Scientist at the Swiss Federal Railways (SBB), specialized in Geographic Information Science.
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Unterfinger" given-names: "Merlin" orcid: "https://orcid.org/0000-0003-2020-2366" - family-names: "Luck" given-names: "Manuel Andreas" orcid: "https://orcid.org/0000-0003-1222-0070" title: "Modeling glaciers on a digital elevation model based on mass balance and a modified D8 flow algorithm applied to ice." version: 0.2.0 doi: 10.5281/zenodo.6418201 date-released: 2022-04-06 url: "https://github.com/munterfi/glacier-flow-model"
GitHub Events
Total
- Watch event: 3
- Delete event: 19
- Issue comment event: 12
- Push event: 10
- Pull request event: 34
- Fork event: 2
- Create event: 20
Last Year
- Watch event: 3
- Delete event: 19
- Issue comment event: 12
- Push event: 10
- Pull request event: 34
- Fork event: 2
- Create event: 20
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| dependabot[bot] | 4****] | 237 |
| Merlin Unterfinger | i****o@m****h | 190 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 282
- Average time to close issues: N/A
- Average time to close pull requests: 5 days
- Total issue authors: 0
- Total pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.78
- Merged pull requests: 227
- Bot issues: 0
- Bot pull requests: 278
Past Year
- Issues: 0
- Pull requests: 36
- Average time to close issues: N/A
- Average time to close pull requests: 16 days
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.36
- Merged pull requests: 15
- Bot issues: 0
- Bot pull requests: 36
Top Authors
Issue Authors
Pull Request Authors
- dependabot[bot] (357)
- munterfi (4)
Top Labels
Issue Labels
Pull Request Labels
dependencies (357)
python (4)
bug (1)
enhancement (1)
Packages
- Total packages: 2
-
Total downloads:
- pypi 20 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 1
(may contain duplicates) - Total versions: 17
- Total maintainers: 1
proxy.golang.org: github.com/munterfi/glacier-flow-model
- Documentation: https://pkg.go.dev/github.com/munterfi/glacier-flow-model#section-documentation
- License: mit
-
Latest release: v0.4.0
published about 2 years ago
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced:
6 months ago
pypi.org: glacier-flow-model
Modeling glaciers on a digital elevation model based on mass balance and a modified D8 flow algorithm applied to ice
- Homepage: https://pypi.org/project/glacier-flow-model/
- Documentation: https://glacier-flow-model.readthedocs.io/en/latest/
- License: MIT
-
Latest release: 0.4.0
published about 2 years ago
Rankings
Dependent packages count: 10.1%
Forks count: 11.4%
Average: 14.8%
Downloads: 15.4%
Stargazers count: 15.6%
Dependent repos count: 21.6%
Maintainers (1)
Last synced:
6 months ago
Dependencies
poetry.lock
pypi
- alabaster 0.7.12 develop
- atomicwrites 1.4.0 develop
- attrs 21.4.0 develop
- babel 2.9.1 develop
- beautifulsoup4 4.10.0 develop
- black 22.3.0 develop
- certifi 2021.10.8 develop
- charset-normalizer 2.0.12 develop
- click 8.1.2 develop
- codecov 2.1.12 develop
- colorama 0.4.4 develop
- coverage 6.3.2 develop
- doc8 0.11.2 develop
- docutils 0.17.1 develop
- flake8 4.0.1 develop
- idna 3.3 develop
- imagesize 1.3.0 develop
- importlib-metadata 4.11.3 develop
- iniconfig 1.1.1 develop
- jinja2 3.1.1 develop
- markupsafe 2.1.1 develop
- mccabe 0.6.1 develop
- mypy 0.961 develop
- mypy-extensions 0.4.3 develop
- pathspec 0.9.0 develop
- pbr 5.8.1 develop
- platformdirs 2.5.1 develop
- pluggy 1.0.0 develop
- py 1.11.0 develop
- pycodestyle 2.8.0 develop
- pydantic 1.9.1 develop
- pydata-sphinx-theme 0.9.0 develop
- pyflakes 2.4.0 develop
- pygments 2.11.2 develop
- pytest 7.1.2 develop
- pytest-cov 3.0.0 develop
- pytz 2022.1 develop
- requests 2.27.1 develop
- restructuredtext-lint 1.4.0 develop
- rstcheck 6.0.0.post1 develop
- rstcheck-core 1.0.2 develop
- shellingham 1.4.0 develop
- snowballstemmer 2.2.0 develop
- soupsieve 2.3.1 develop
- sphinx 5.0.2 develop
- sphinxcontrib-applehelp 1.0.2 develop
- sphinxcontrib-devhelp 1.0.2 develop
- sphinxcontrib-htmlhelp 2.0.0 develop
- sphinxcontrib-jsmath 1.0.1 develop
- sphinxcontrib-qthelp 1.0.3 develop
- sphinxcontrib-serializinghtml 1.1.5 develop
- stevedore 3.5.0 develop
- tomlkit 0.11.0 develop
- typer 0.4.1 develop
- types-docutils 0.18.2 develop
- typing-extensions 4.1.1 develop
- urllib3 1.26.9 develop
- zipp 3.8.0 develop
- cycler 0.11.0
- fonttools 4.31.2
- gdal 3.5.0.3
- kiwisolver 1.4.2
- llvmlite 0.38.0
- matplotlib 3.5.2
- numba 0.55.2
- numpy 1.22.4
- packaging 21.3
- pillow 9.1.1
- pyparsing 3.0.7
- python-dateutil 2.8.2
- scipy 1.8.1
- setuptools-scm 6.4.2
- six 1.16.0
- tomli 2.0.1
pyproject.toml
pypi
- Sphinx ^5.0.2 develop
- black ^22.1.0 develop
- codecov ^2.1.12 develop
- doc8 ^0.11.2 develop
- flake8 ^4.0.1 develop
- mypy ^0.961 develop
- pydata-sphinx-theme ^0.9.0 develop
- pytest ^7.1.2 develop
- pytest-cov ^3.0.0 develop
- rstcheck ^6.0.0 develop
- tomlkit ^0.11.0 develop
- GDAL ^3.4.1
- matplotlib ^3.5.1
- numba ^0.55.1
- numpy ^1.19.0
- python >=3.9,<3.11
- scipy ^1.8.0
.github/workflows/gdal-stable-test.yml
actions
- actions/cache v1 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
.github/workflows/gdal-unstable-test.yml
actions
- actions/cache v1 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
.github/workflows/package-check.yml
actions
- actions/cache v1 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
.github/workflows/package-publish.yml
actions
- actions/checkout v2 composite
- actions/setup-python v1 composite
docs/environment.yml
conda
- matplotlib
- numba
- numpy
- pydata-sphinx-theme
- rasterio
- scipy
- sphinx
- tomlkit