From a60187fe3dc7459df294bb65264aa5ade5ef4030 Mon Sep 17 00:00:00 2001 From: Julia Eis Date: Fri, 2 Sep 2022 10:48:18 +0200 Subject: [PATCH] add water_level to FileModel (#1450) * add water_level to FileModel * PEP8 correction * Also add fallback Co-authored-by: Fabien Maussion --- oggm/core/flowline.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oggm/core/flowline.py b/oggm/core/flowline.py index 5005d2421..3d014c985 100644 --- a/oggm/core/flowline.py +++ b/oggm/core/flowline.py @@ -2137,10 +2137,12 @@ def __init__(self, path): try: with xr.open_dataset(path) as ds: self._calving_m3_since_y0 = ds.calving_m3.values + self.water_level = ds.water_level self.do_calving = True except AttributeError: self._calving_m3_since_y0 = 0 self.do_calving = False + self.water_level = 0 # time self.reset_y0()