Skip to content

Commit

Permalink
force user to call read_fgout_grids_data before read_frame
Browse files Browse the repository at this point in the history
  • Loading branch information
rjleveque committed Jul 29, 2024
1 parent f373e23 commit 6c849f2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/python/geoclaw/fgout_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,14 @@ def read_frame(self, frameno):
fgoutX = self.X
fgoutY = self.Y
except:
msg = '\n*** Before reading frame, you must set FGoutGrid data,' \
'\n*** Typically by calling read_fgout_grids_data'
raise ValueError(msg)

# prior to v5.11, self.read_fgout_grids_data() called here
# rather than raising exception...
print(msg)
print('*** Calling read_fgout_grids_data...')
self.read_fgout_grids_data()
fgoutX = self.X
fgoutY = self.Y
Expand Down

0 comments on commit 6c849f2

Please sign in to comment.