Skip to content

Commit

Permalink
Merge pull request #630 from rjleveque/fgout_outvars_default
Browse files Browse the repository at this point in the history
Properly set fgout q_out_vars to default
  • Loading branch information
mandli authored Oct 29, 2024
2 parents 3303883 + 6f49189 commit a492ce7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/tsunami/chile2010_fgmax-fgout/plot_fgout.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions src/python/geoclaw/fgout_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a492ce7

Please sign in to comment.