{"id":13764315,"url":"https://github.com/munterfi/glacier-flow-model","last_synced_at":"2026-03-17T16:15:32.921Z","repository":{"id":37090453,"uuid":"96700423","full_name":"munterfi/glacier-flow-model","owner":"munterfi","description":"Modeling glaciers on a digital elevation model (DEM) based on mass balance and a modified D8 flow algorithm applied to ice.","archived":false,"fork":false,"pushed_at":"2024-12-31T10:06:17.000Z","size":11048,"stargazers_count":21,"open_issues_count":3,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-01T05:39:53.559Z","etag":null,"topics":["digital-elevation-model","geographical-information-system","geospatial","glacier","glaciers-flow","gradient","mass-balance","modeling"],"latest_commit_sha":null,"homepage":"https://doi.org/10.5281/zenodo.6418201","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/munterfi.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-09T17:38:06.000Z","updated_at":"2024-12-30T13:22:22.000Z","dependencies_parsed_at":"2024-01-07T11:50:35.186Z","dependency_job_id":"620d2d4d-6510-4be4-969b-78c915171412","html_url":"https://github.com/munterfi/glacier-flow-model","commit_stats":{"total_commits":425,"total_committers":4,"mean_commits":106.25,"dds":"0.44705882352941173","last_synced_commit":"a16c42d5dc2ce1d8459c7d547afcde51f1abe1e2"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munterfi%2Fglacier-flow-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munterfi%2Fglacier-flow-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munterfi%2Fglacier-flow-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munterfi%2Fglacier-flow-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/munterfi","download_url":"https://codeload.github.com/munterfi/glacier-flow-model/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232081271,"owners_count":18469905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["digital-elevation-model","geographical-information-system","geospatial","glacier","glaciers-flow","gradient","mass-balance","modeling"],"created_at":"2024-08-03T16:00:18.825Z","updated_at":"2026-03-17T16:15:32.887Z","avatar_url":"https://github.com/munterfi.png","language":"Python","funding_links":[],"categories":["Ice Sheets and Glaciers","Cryosphere"],"sub_categories":["ISG Software","Glacier and Ice Sheets"],"readme":".. image:: https://raw.githubusercontent.com/munterfi/glacier-flow-model/master/docs/source/_static/logo.svg\n   :width: 120 px\n   :alt: https://github.com/munterfi/glacier-flow-model\n   :align: right\n\n==================\nGlacier flow model\n==================\n\n.. image:: https://zenodo.org/badge/96700423.svg\n   :target: https://zenodo.org/badge/latestdoi/96700423\n\n.. image:: https://img.shields.io/pypi/v/glacier-flow-model.svg\n        :target: https://pypi.python.org/pypi/glacier-flow-model\n\n.. image:: https://github.com/munterfi/glacier-flow-model/workflows/check/badge.svg\n        :target: https://github.com/munterfi/glacier-flow-model/actions?query=workflow%3Acheck\n\n.. image:: https://readthedocs.org/projects/glacier-flow-model/badge/?version=latest\n        :target: https://glacier-flow-model.readthedocs.io/en/latest/\n        :alt: Documentation Status\n\n.. image:: https://codecov.io/gh/munterfi/glacier-flow-model/branch/master/graph/badge.svg?token=2Kh9EboLXx\n        :target: https://codecov.io/gh/munterfi/glacier-flow-model\n\nModeling glaciers on a digital elevation model (DEM) based on mass balance and\na modified D8 flow algorithm applied to ice.\n\nThe modeling is based on a linear relationship between altitude and mass\nbalance, the so-called mass balance gradient. For alpine glaciers this gradient\nis about 0.006 m/m. Continental glaciers tend to be at 0.003 and maritime\nglaciers at 0.01 m/m. The alpine gradient is set by default in the model.\nTo model the glaciers, annual steps are calculated. First the mass balance\n(accumulation and ablation) for the area is added to the glacier layer and in a\nsecond step the glacier flow is simulated by using a modified D8 technique\n(submodule :code:`fracd8`).\nSince the prupose of the D8 flow direction algorithm is modeling surface water\nflows over terrain, the D8 algorithm was modified to be able to consider the\nfraction of ice that is flowing out of each cell based on the glaciers\nvelocity. In order to avoid pure convergence of the flow, the surface of the\nglaciers is slightly smoothed. The simulation stops when the observed\ndifference in mass balance for a smoothed curve (default\n:code:`MODEL_TREND_SIZE=100`) is less than a given tolerance (default\n:code:`MODEL_TOLERANCE=0.0001`).\n\nGetting started\n---------------\n\nThe **glacier-flow-model** package depends on GDAL, which needs to be installed\non the system.\n\nGet the stable release of the package from pypi:\n\n.. code-block:: shell\n\n    pip install glacier-flow-model\n\nExample data\n____________\n\nThe package includes an example DEM from `swisstopo \u003chttps://www.swisstopo.admin.ch/en/home.html\u003e`_.\nIt covers a smaller extent around the Aletsch glacial arena in Switzerland with\na raster cell resolution of 200m.\n\n.. code-block:: python\n\n    from glacier_flow_model import PkgDataAccess\n    dem = PkgDataAccess.load_dem()\n\nThe original DEM can be downloaded `here \u003chttps://www.swisstopo.admin.ch/en/geodata/height/dhm25200.html\u003e`_.\n\nUsage\n_____\n\nTo set up a glacier flow model, a path to a DEM in the GeoTiff file format has\nto passed to the model class constructor. By default the mass balance\nparameters for alpine glaciers in the year 2000 are set. Keep the input file\nsize small, otherwise the model may be slowed down remarkably:\n\n.. code-block:: python\n\n    import logging\n    from glacier_flow_model import GlacierFlowModel, PkgDataAccess\n\n    LOG_FORMAT = \"[%(asctime)s %(levelname)s] %(message)s (%(name)s)\"\n    logging.basicConfig(format=LOG_FORMAT, level=logging.INFO)\n\n    gfm = GlacierFlowModel(PkgDataAccess.locate_dem())\n\nAfter initialization, the model needs to accumulate the initial ice mass until\nit reaches a steady state, call the :code:`reach_steady_state` method to do so:\n\n.. code-block:: python\n\n    gfm.reach_steady_state()\n\n.. image:: https://raw.githubusercontent.com/munterfi/glacier-flow-model/master/docs/source/_static/steady_state_initial.png\n   :alt: https://github.com/munterfi/glacier-flow-model\n   :align: center\n\nWhen the model is in a steady state, a temperature change of the climate can be\nsimulated. Simply use the :code:`simulate` method with a positive or negative\ntemperature change in degrees. The model changes the temperature gradually and\nsimulates years until it reaches a steady state again.\n\nHeating 4.5°C after initial steady state:\n\n.. code-block:: python\n\n    gfm.simulate(4.5)\n\n.. image:: https://raw.githubusercontent.com/munterfi/glacier-flow-model/master/docs/source/_static/steady_state_heating.png\n   :alt: https://github.com/munterfi/glacier-flow-model\n   :align: center\n\nCooling -3°C after initial steady state:\n\n.. code-block:: python\n\n    gfm.simulate(-3)\n\n.. image:: https://raw.githubusercontent.com/munterfi/glacier-flow-model/master/docs/source/_static/steady_state_cooling.png\n   :alt: https://github.com/munterfi/glacier-flow-model\n   :align: center\n\nExport the results of the model into :code:`.csv` and :code:`.tif` files:\n\n.. code-block:: python\n\n    gfm.export()\n\nThe GeoTiff contains the following bands, averaged over the last 10 simulation\nyears (default :code:`MODEL_RECORD_SIZE=10`):\n\n1. Glacier thickness [m].\n2. Velocity at medium height [m/a].\n3. Mass balance [m].\n\nCheck out the `video \u003chttps://munterfinger.ch/media/film/gfm.mp4\u003e`_ of the scenario simulation in the Aletsch\nglacial arena in Switzerland\n\nLimitations\n-----------\n\nThe model has some limitations that need to be considered:\n\n- The flow velocity of the ice per year is limited by the resolution of the\n  grid cells. Therefore, a too high resolution should not be chosen for the\n  simulation.\n- The modeling of ice flow is done with D8, a technique for modeling surface\n  flow in hydrology. Water behaves fundamentally different from ice, which is\n  neglected by the model (e.g. influence of crevasses).\n- The flow velocity only considers internal ice deformation (creep). Basal\n  sliding, and soft bed deformation are ignored.\n- No distinction is made between snow and ice. The density of the snow or ice\n  mass is also neglected in the vertical column.\n\nLicense\n-------\n\nThis project is licensed under the MIT License - see the LICENSE file for\ndetails\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunterfi%2Fglacier-flow-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmunterfi%2Fglacier-flow-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunterfi%2Fglacier-flow-model/lists"}