Navigation Menu

Skip to content

Commit

Permalink
Add warning for monthly timesteps (#1208)
Browse files Browse the repository at this point in the history
* Add warning for monthly timesteps

Add warning if store_monthly_step == True but mb_elev_feedback = 'annual' to make sure users don't expect output to reflect monthly processes if mass balance is only calculated annualy

* Update flowline.py

correct for minor mistakes in warning.
  • Loading branch information
sarah-hanus committed Mar 3, 2021
1 parent 0d826e1 commit bcc40b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions oggm/core/flowline.py
Expand Up @@ -2128,6 +2128,10 @@ def flowline_model_run(gdir, output_filesuffix=None, mb_model=None,
kwargs : dict
kwargs to pass to the FluxBasedModel instance
"""
mb_elev_feedback = kwargs.get('mb_elev_feedback', 'annual')
if store_monthly_step and (mb_elev_feedback == 'annual'):
warnings.warn("Mass balance is computed yearly. If you want output to "
"reflect monthly processes set mb_elev_feedback = 'monthly'")

if cfg.PARAMS['use_inversion_params_for_run']:
diag = gdir.get_diagnostics()
Expand Down

0 comments on commit bcc40b7

Please sign in to comment.