OGGM / oggm-edu

Educational material about glaciers, powered by OGGM and MyBinder
http://edu.oggm.org
BSD 3-Clause "New" or "Revised" License
22 stars 28 forks source link

New mass balance customisation interface and other qol updates. #150

Closed Holmgren825 closed 2 years ago

Holmgren825 commented 2 years ago

This PR introduces a new way for the mass balance to handle changes in the temperature bias (or ELA changes). This is now done via the new attribute MassBalance.temp_bias_series which hold the historical and possible future values of the temperature bias of the mass balance. Future values are added to this series through either the methods add_temp_bias or add_random_climate. It is also possible for the user to assign a completely custom temperature bias series to the attribute. The mass balance model then reads from this series during runtime. This has the added benefit that it greatly simplifies Glacier.run_to... methods.

This also includes ways to visualise the temp_bias_series via plot_history via the show_bias argument. It is also possible to smooth the bias data for plotting via the smooth arg. Finally time_range enables the user to select a data period to plot.

QoL updates: