Git Product home page Git Product logo

pygem's Introduction

Python Glacier Evolution Model (PyGEM)

Overview: Python Glacier Evolution Model (PyGEM) is an open-source glacier evolution model coded in Python that models the transient evolution of glaciers. Each glacier is modeled independently using a monthly timestep. PyGEM has a modular framework that allows different schemes to be used for model calibration or model physics (e.g., climatic mass balance, glacier dynamics). In the newest version under development, PyGEM is working to become compatible with the Open Global Glacier Model (OGGM; https://oggm.org/).

Manual: Details concerning the model physics, installation, and running the model may be found here: https://github.com/drounce/PyGEM/wiki

Usage: PyGEM is meant for large-scale glacier evolution modeling. PyGEMv0.2.0 is no longer being actively being supported. We recommend using the new documentation listed above and contacting the lead developer (David Rounce) if you're interested in using the version that is actively being developed.

Contributing: We welcome contributions from any interested parties and are in the process of outlining how to best incorporate outside contributions. For the time being, if you would like to contribute to the development of the model, please contact David Rounce ([email protected]).

Credits: If using PyGEM for scientific applications, please cite the following: Rounce, D.R., Hock, R., Maussion, F., Hugonnet, R., Kochtitzky, W., Huss, M., Berthier, E., Brinkerhoff, D., Compagno, L., Copland, L., Farinotti, D., Menounos, B., and McNabb, R.W. “Global glacier change in the 21st century: Every increase in temperature matters”, Science, 379(6627), pp. 78-83, (2023), doi:10.1126/science.abo1324.

License: PyGEM uses an MIT license.

pygem's People

Contributors

btobers avatar drounce avatar fmaussion avatar kitrea avatar mrweathers avatar tusharkh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pygem's Issues

Bugs in the Frontal ablation calibration ( Advanced Test- Tidewater Glaciers)

Hi David,

 I got errors when doing the first step, `python run_calibration.py -option_parallels=0`, of Frontal ablation calibration (Advanced Test- Tidewater Glaciers).  

  Here is the error information:

  `pygem.shop.mbdata: AssertionError occurred during task mb_df_to_gdir on RGI60-01.03622: mb_clim_mwea not a column in mb_df`

   Actually there is no column named mb_clim_mwea in the file **df_pergla_global_20yr-filled.csv**.  I am wondering if `mb_clim_mwea = mb_mwea`, under this situation?    If yes, another condition statement might be needed in the  ~  Line191-196,  Or?


    Besides a typo error, in the manual  "Update datasets and recalibrate model parameters", 

     update the pygem_input.py, might be `hugonnet_fn = ‘df_pergla_global_20yr-filled-facorrected.csv`’ not `hugonnet_fn = ‘df_pergla_global_20yr-filled-FAcorrected.csv’

`

Support for PyGEM climate files added in OGGM

Hi, I've added support for the files you provided me in OGGM/oggm#1031

This creates a netdf file in the glacier directory with all the data you need. (I think). The only differences you might see are:

  • we correct the original precip and provide monthly sums in mm.
  • the time is already cropped to match the hydrological year in both hemispheres.

Here is a code to read and display the data:

rgi_ids = ['RGI60-11.0{}'.format(i) for i in range(3200, 3220)]

# Artesonrau (SH), Hintereisferner (NH)
rgi_ids = ['RGI60-16.02444', 'RGI60-11.00897']

# Locals
import oggm.cfg as cfg
from oggm import utils, workflow

# Initialize OGGM and set up the default run parameters
cfg.initialize(logging_level='WORKFLOW')
cfg.PARAMS['border'] = 10
# Usually we recommend to set dl_verify to True - here it is quite slow
# because of the huge files so we just turn it off.
# Switch it on for real cases!
cfg.PARAMS['dl_verify'] = False
cfg.PATHS['working_dir'] = utils.get_temp_dir('PyGEM_ex')

# Get the pre-processed topography data
from oggm.shop import rgitopo
gdirs = rgitopo.init_glacier_directories_from_rgitopo(rgi_ids)

# Process the ECMWF climate data from David
from oggm.shop import ecmwf
workflow.execute_entity_task(ecmwf.process_ecmwf_data, gdirs, dataset='ERA5dr')

# This creates a "climate_historical.nc" file in each glacier directory with
# the data in it:
fpath = gdirs[0].get_filepath('climate_historical')
print(fpath)

# plots
import xarray as xr
import matplotlib.pyplot as plt

for gdir, name in zip(gdirs, ['Artesonraju', 'Hintereisferner']):
    ds = xr.open_dataset(gdir.get_filepath('climate_historical'))
    f, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, figsize=(12, 7))
    ds.temp.plot(ax=ax1)
    ds.temp_std.plot(ax=ax2)
    ds.gradient.plot(ax=ax3)
    ds.prcp.plot(ax=ax4)
    plt.suptitle(name + ' - Ref height: {}m'.format(int(ds.ref_hgt)))

Artesonraju

Hintereisferner

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.