diff --git a/examples/tsunami/chile2010_fgmax-fgout/plot_fgout.py b/examples/tsunami/chile2010_fgmax-fgout/plot_fgout.py index 8b61666d3..a24f5a68d 100644 --- a/examples/tsunami/chile2010_fgmax-fgout/plot_fgout.py +++ b/examples/tsunami/chile2010_fgmax-fgout/plot_fgout.py @@ -13,6 +13,7 @@ # Instantiate object for reading fgout frames: fgout_grid = fgout_tools.FGoutGrid(fgno, outdir, output_format) +fgout_grid.read_fgout_grids_data() # Plot one frame of fgout data fgframe = 20 diff --git a/src/python/geoclaw/fgout_tools.py b/src/python/geoclaw/fgout_tools.py index de21b51a8..6b957a9d8 100644 --- a/src/python/geoclaw/fgout_tools.py +++ b/src/python/geoclaw/fgout_tools.py @@ -341,9 +341,12 @@ def __init__(self,fgno=None,outdir='.',output_format=None, # Note output_format will be reset by read_fgout_grids_data: self.output_format = output_format - self.q_out_vars = [1,2,3,4] # list of which components to print - # default: h,hu,hv,eta (5=topo) - self.nqout = None # number of vars to print out + # list of which components to print: + if 'eta' in self.qmap.keys(): + # default: h,hu,hv,eta as in previous versions of GeoClaw + self.q_out_vars = [1,2,3,self.qmap['eta']] + else: + self.q_out_vars = [1,2,3] # if qmap['eta'] not defined self.drytol = 1e-3 # used for computing u,v from hu,hv