OGGM / mb_simulator

Simulator for exploring the default Mass Balance Model of OGGM
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Connecting mb_simulator with glacier_simulator #10

Open pat-schmitt opened 2 years ago

pat-schmitt commented 2 years ago

A possible idea would be to show the annual mass balance of the mb_simulator as a dictionary for different heights (e.g. {height_1: MB(height_1), height_2: MB(height_2)}) in a panel StaticText widget (https://panel.holoviz.org/reference/widgets/StaticText.html). This dictionary can be copied and inserted into a panel Textinput widget (https://panel.holoviz.org/reference/widgets/TextInput.html) in the glacier_simulator. (For the conversion of string to dict one can use eval()). And in the glacier_simulator use an interpolater (e.g. from scipy.interpolate import interp1d) together with the values of the dictionary for the definition of the mass balance curve.

pat-schmitt commented 2 years ago

(Instead of eval() one should use ast.literal_eval for security concerns)