Skip to main content

Modeling glaciers on a digital elevation model based on mass balance and a modified D8 flow algorithm applied to ice

Project description

https://github.com/munterfi/glacier-flow-model

Glacier flow model

https://zenodo.org/badge/96700423.svg https://img.shields.io/pypi/v/glacier-flow-model.svg https://github.com/munterfi/glacier-flow-model/workflows/check/badge.svg Documentation Status https://codecov.io/gh/munterfi/glacier-flow-model/branch/master/graph/badge.svg?token=2Kh9EboLXx

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 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 MODEL_TREND_SIZE=100) is less than a given tolerance (default 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:

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.

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:

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 reach_steady_state method to do so:

gfm.reach_steady_state()
https://github.com/munterfi/glacier-flow-model

When the model is in a steady state, a temperature change of the climate can be simulated. Simply use the 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:

gfm.simulate(4.5)
https://github.com/munterfi/glacier-flow-model

Cooling -3°C after initial steady state:

gfm.simulate(-3)
https://github.com/munterfi/glacier-flow-model

Export the results of the model into .csv and .tif files:

gfm.export()

The GeoTiff contains the following bands, averaged over the last 10 simulation years (default 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glacier_flow_model-0.4.0.tar.gz (382.5 kB view details)

Uploaded Source

Built Distribution

glacier_flow_model-0.4.0-py3-none-any.whl (383.8 kB view details)

Uploaded Python 3

File details

Details for the file glacier_flow_model-0.4.0.tar.gz.

File metadata

  • Download URL: glacier_flow_model-0.4.0.tar.gz
  • Upload date:
  • Size: 382.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for glacier_flow_model-0.4.0.tar.gz
Algorithm Hash digest
SHA256 e7cef2d1c85adb6d32a797c140aaec94b90e62fa143ae94a37a3acf7f8c1ef97
MD5 8043dfa2bc09567bdf1187dc25f51582
BLAKE2b-256 c9f5af0eb590a493ed8c0865f4ee168ba1879a46bba7a9daa61df4cb508b1194

See more details on using hashes here.

File details

Details for the file glacier_flow_model-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for glacier_flow_model-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d62c2a52e5c41eca42ad9a8019f97467e11d9ffb96ce988225d4c56235f4bcec
MD5 7e48a1386f187a32a0770ca028501f05
BLAKE2b-256 ae261fc3a21858f2bb10a0aa6ba855d48085a1a724012a08c7eceb52521a0c61

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page