diff --git a/src/python/amrclaw/data.py b/src/python/amrclaw/data.py index 19029270..42276e11 100755 --- a/src/python/amrclaw/data.py +++ b/src/python/amrclaw/data.py @@ -418,6 +418,12 @@ def write(self, num_eqn, num_aux, out_file='gauges.data', if len(self.gauge_numbers) != len(set(self.gauge_numbers)): raise Exception("Non unique gauge numbers specified.") + for gaugeno in self.gauge_numbers: + if abs(gaugeno) >= 2**31: + raise Exception("Gauge number %i is too large, must be < 2**31"\ + % gaugeno) + + # Write out gauge data file self.open_data_file(out_file,data_source) self.data_write(name='ngauges',value=len(self.gauges))