From eed8224fca95240998840b9ab9232f7306bde39a Mon Sep 17 00:00:00 2001 From: MarliesA Date: Thu, 15 Aug 2024 14:08:06 +0200 Subject: [PATCH] bugfix asser statements reading in data --- xbTools/xbeachpost.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xbTools/xbeachpost.py b/xbTools/xbeachpost.py index 238e9e2..0c7a088 100644 --- a/xbTools/xbeachpost.py +++ b/xbTools/xbeachpost.py @@ -445,17 +445,17 @@ def load_modeloutput(self, var): return if '_mean' in var: - assert sum([var[:-5] in x for x in self.params['meanvar']]) > 0, '{} not in xb output' + assert sum([var[:-5] in x for x in self.params['meanvar']]) > 0, '{} not in xb output'.format(var) elif '_var' in var: - assert sum([var[:-4] in x for x in self.params['meanvar']]) > 0, '{} not in xb output' + assert sum([var[:-4] in x for x in self.params['meanvar']]) > 0, '{} not in xb output'.format(var) elif '_min' in var: - assert sum([var[:-4] in x for x in self.params['meanvar']]) > 0, '{} not in xb output' + assert sum([var[:-4] in x for x in self.params['meanvar']]) > 0, '{} not in xb output'.format(var) elif '_max' in var: - assert sum([var[:-4] in x for x in self.params['meanvar']]) > 0, '{} not in xb output' + assert sum([var[:-4] in x for x in self.params['meanvar']]) > 0, '{} not in xb output'.format(var) elif 'point_' in var: - assert sum([var[6:] in x for x in self.params['pointvar']]) > 0, '{} not in xb output' + assert sum([var[6:] in x for x in self.params['pointvar']]) > 0, '{} not in xb output'.format(var) else: - assert sum([var in x for x in self.params['globalvar']]) > 0, '{} not in xb output' + assert sum([var in x for x in self.params['globalvar']]) > 0, '{} not in xb output'.format(var) # if not yet present, load coordinates if self.var == {}: