Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fgout grid capability and support for output_format binary32 #533

Merged
merged 53 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
e156508
Fix some things with fixedgrid output to make more robust
rjleveque Nov 24, 2020
ef057b1
move fgrid_out to tick.f and remove deprecated max options
rjleveque Nov 27, 2020
e6436c2
remove debug write statements
rjleveque Mar 16, 2021
33b757a
fix comment in f90
rjleveque Mar 16, 2021
89924bb
Merge branch 'fixedgrid_output' into fgout
rjleveque Dec 8, 2021
538e313
moved fixedgrids_module.f90 -> fgout_module.f90 and changed many vari…
rjleveque Dec 13, 2021
e793247
add fgout_tools.py and make fgout specification more like fgmax.
rjleveque Dec 13, 2021
0a5828b
fix fgout to output ascii or binary in same format as frames for plot…
rjleveque Dec 14, 2021
724fc7f
qeta(m,i,j) works fine for binary write
rjleveque Dec 14, 2021
1ecd3ad
use fg pointer to clean up fgout_module
rjleveque Dec 15, 2021
cda08ee
use fgout pointer to clean up tick.f
rjleveque Dec 15, 2021
b7a47e9
clean up logic for fgout times,
rjleveque Dec 15, 2021
c3c1498
number fgout frames 1 to num_output
rjleveque Dec 15, 2021
2f68c8e
use fgout pointer in stepgrid
rjleveque Dec 15, 2021
b4a94fe
cleaned up stepgrid and fixed bugs so fgout works with restart
rjleveque Dec 16, 2021
40ec911
clean up unused variables and debug prints
rjleveque Dec 16, 2021
31630b6
fix Ctrl-M in fgout_module
rjleveque Dec 19, 2021
3cb548f
fix fgout_write to use fgrid%fgno for filename
rjleveque Dec 22, 2021
1bf12c3
rename tstart_out, tend_out as tstart,tend
rjleveque Dec 29, 2021
057db58
fix format for writing fgout frame info
rjleveque Dec 29, 2021
4563712
change fgout unit to 87
rjleveque Dec 29, 2021
b92e2e5
copied fgout_tools.py with more functionality from CMH project
rjleveque Feb 16, 2022
3eb36e3
modify fgout grid
rjleveque Feb 16, 2022
059cfbf
do not interpolate fgout in time
rjleveque Feb 17, 2022
250ab5a
fix fgout problem at full frame output times
rjleveque Feb 17, 2022
3ad9373
add time-interp of fgout as option, clean up debugging
rjleveque Feb 17, 2022
b85a0a0
changed fixedgrids to fgout_grids in example setrun files
rjleveque Feb 17, 2022
81064b9
update multilayer/Makefile.multilayer for fgout_module
rjleveque Feb 17, 2022
5b3a947
add deprecated class FixedGridData back to data.py, but with warning/…
rjleveque Feb 17, 2022
852826c
updates to fgout_tools init functions using @property for lazy evalua…
rjleveque Feb 20, 2022
72c7de6
improved fgout_tools, new make_fgout_fcn functions
rjleveque Feb 25, 2022
cdcbbb4
added FGoutFrame.drytol parameter for u,v, more docstrings
rjleveque Mar 1, 2022
0fafd7c
added examples/tsunami/chile2010_fgmax-fgout
rjleveque Mar 1, 2022
e3f9745
update README
rjleveque Mar 1, 2022
2996dc1
Fix some bugs in fgout: x1,x2,y1,y2 specified in setrun.py should be …
rjleveque Mar 1, 2022
72492b9
Add fgout_tools.write_netcdf and other functions to read netcdf files
rjleveque Mar 4, 2022
be75860
Use datetime.timedelta to add titles in HH:MM:SS format
rjleveque Mar 4, 2022
931741f
missing import
rjleveque Mar 12, 2022
bea02c4
refactor classes in fgout_tools so grid is only saved in FGoutGrid,
rjleveque Mar 12, 2022
7e0609c
fix and clean up fgout pw const interpolation
rjleveque Mar 20, 2022
f8877c5
remove method from list of interpolate args
rjleveque Mar 20, 2022
18251d2
remove potentially confusing warning
rjleveque Mar 20, 2022
f5e65ab
set fgout_grids.plotdata.save_frames=False so frames aren't all saved…
rjleveque Mar 20, 2022
deec6eb
support fgout output_format = 'binary32'
rjleveque Jun 2, 2022
52506f8
fix valout.f90 to support writing aux arrays as binary32
rjleveque Jun 2, 2022
5ee0450
Merge branch 'master' into fgout
rjleveque Jun 2, 2022
58e9280
fixed multilayer/stepgrid.f to properly use fgout_module
rjleveque Jun 17, 2022
1b58b08
Fixed multilayer/valout.f90 to have binary32 option and to write file…
rjleveque Jun 17, 2022
e5c283a
fixed comments in multilayer setrun.py
rjleveque Jun 17, 2022
36c0f32
fix some doc strings for sphinx autodoc
rjleveque Jul 3, 2022
2121e4e
fix some more doc strings for sphinx autodoc
rjleveque Jul 3, 2022
ae7d669
allow fgout output_format 'binary' to mean 'binary64'
rjleveque Jul 6, 2022
5f2461a
add kmltools.fgout2kml
rjleveque Jul 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions examples/multi-layer/bowl-radial/setrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def setrun(claw_pkg='geoclaw'):
clawdata.output_t0 = True


clawdata.output_format = 'ascii' # 'ascii' or 'binary'
clawdata.output_format = 'ascii' # 'ascii', 'binary32' or 'binary64'

clawdata.output_q_components = 'all' # could be list such as [True,True]
clawdata.output_aux_components = 'none' # could be list
Expand Down Expand Up @@ -404,11 +404,11 @@ def setgeo(rundata):
# [fname]
rundata.qinit_data.qinitfiles.append(['hump.xyz'])

# == setfixedgrids.data values ==
fixedgrids = rundata.fixed_grid_data.fixedgrids
# for fixed grids append lines of the form
# [t1,t2,noutput,x1,x2,y1,y2,xpoints,ypoints,\
# ioutarrivaltimes,ioutsurfacemax]
# == fgout grids ==
# new style as of v5.9.0 (old rundata.fixed_grid_data is deprecated)
# set rundata.fgout_data.fgout_grids to be a
# list of objects of class clawpack.geoclaw.fgout_tools.FGoutGrid:
#rundata.fgout_data.fgout_grids = []

return rundata
# end of function setgeo
Expand Down
2 changes: 1 addition & 1 deletion examples/multi-layer/plane_wave/setrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def setrun(claw_pkg='geoclaw'):
clawdata.output_t0 = True


clawdata.output_format = 'ascii' # 'ascii' or 'binary'
clawdata.output_format = 'ascii' # 'ascii', 'binary32' or 'binary64'

clawdata.output_q_components = 'all' # need all
clawdata.output_aux_components = 'all' # eta=h+B is in q
Expand Down
10 changes: 5 additions & 5 deletions examples/storm-surge/ike/setrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,11 @@ def setgeo(rundata):
topo_path = os.path.join(scratch_dir, 'gulf_caribbean.tt3')
topo_data.topofiles.append([3, topo_path])

# == setfixedgrids.data values ==
rundata.fixed_grid_data.fixedgrids = []
# for fixed grids append lines of the form
# [t1,t2,noutput,x1,x2,y1,y2,xpoints,ypoints,\
# ioutarrivaltimes,ioutsurfacemax]
# == fgout grids ==
# new style as of v5.9.0 (old rundata.fixed_grid_data is deprecated)
# set rundata.fgout_data.fgout_grids to be a
# list of objects of class clawpack.geoclaw.fgout_tools.FGoutGrid:
#rundata.fgout_data.fgout_grids = []

# ================
# Set Surge Data
Expand Down
10 changes: 5 additions & 5 deletions examples/storm-surge/isaac/setrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@ def setgeo(rundata):
topo_path = os.path.join(scratch_dir, 'gulf_caribbean.tt3')
topo_data.topofiles.append([3, topo_path])

# == setfixedgrids.data values ==
rundata.fixed_grid_data.fixedgrids = []
# for fixed grids append lines of the form
# [t1,t2,noutput,x1,x2,y1,y2,xpoints,ypoints,\
# ioutarrivaltimes,ioutsurfacemax]
# == fgout grids ==
# new style as of v5.9.0 (old rundata.fixed_grid_data is deprecated)
# set rundata.fgout_data.fgout_grids to be a
# list of objects of class clawpack.geoclaw.fgout_tools.FGoutGrid:
#rundata.fgout_data.fgout_grids = []

# ================
# Set Surge Data
Expand Down
10 changes: 5 additions & 5 deletions examples/tsunami/bowl-radial/setrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,11 @@ def setgeo(rundata):
# [fname]
rundata.qinit_data.qinitfiles.append(['hump.xyz'])

# == setfixedgrids.data values ==
fixedgrids = rundata.fixed_grid_data.fixedgrids
# for fixed grids append lines of the form
# [t1,t2,noutput,x1,x2,y1,y2,xpoints,ypoints,\
# ioutarrivaltimes,ioutsurfacemax]
# == fgout grids ==
# new style as of v5.9.0 (old rundata.fixed_grid_data is deprecated)
# set rundata.fgout_data.fgout_grids to be a
# list of objects of class clawpack.geoclaw.fgout_tools.FGoutGrid:
#rundata.fgout_data.fgout_grids = []

return rundata
# end of function setgeo
Expand Down
10 changes: 5 additions & 5 deletions examples/tsunami/bowl-slosh-netcdf/setrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,11 @@ def setgeo(rundata):
# for qinit perturbations, append lines of the form: (<= 1 allowed for now!)
# [fname]

# == setfixedgrids.data values ==
fixedgrids = rundata.fixed_grid_data
# for fixed grids append lines of the form
# [t1,t2,noutput,x1,x2,y1,y2,xpoints,ypoints,\
# ioutarrivaltimes,ioutsurfacemax]
# == fgout grids ==
# new style as of v5.9.0 (old rundata.fixed_grid_data is deprecated)
# set rundata.fgout_data.fgout_grids to be a
# list of objects of class clawpack.geoclaw.fgout_tools.FGoutGrid:
#rundata.fgout_data.fgout_grids = []

return rundata
# end of function setgeo
Expand Down
10 changes: 5 additions & 5 deletions examples/tsunami/bowl-slosh/setrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,11 @@ def setgeo(rundata):
# for qinit perturbations, append lines of the form: (<= 1 allowed for now!)
# [fname]

# == setfixedgrids.data values ==
fixedgrids = rundata.fixed_grid_data
# for fixed grids append lines of the form
# [t1,t2,noutput,x1,x2,y1,y2,xpoints,ypoints,\
# ioutarrivaltimes,ioutsurfacemax]
# == fgout grids ==
# new style as of v5.9.0 (old rundata.fixed_grid_data is deprecated)
# set rundata.fgout_data.fgout_grids to be a
# list of objects of class clawpack.geoclaw.fgout_tools.FGoutGrid:
#rundata.fgout_data.fgout_grids = []

return rundata
# end of function setgeo
Expand Down
10 changes: 5 additions & 5 deletions examples/tsunami/chile2010/setrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,11 +410,11 @@ def setgeo(rundata):
# for qinit perturbations, append lines of the form: (<= 1 allowed for now!)
# [fname]

# == setfixedgrids.data values ==
fixed_grids = rundata.fixed_grid_data
# for fixed grids append lines of the form
# [t1,t2,noutput,x1,x2,y1,y2,xpoints,ypoints,\
# ioutarrivaltimes,ioutsurfacemax]
# == fgout grids ==
# new style as of v5.9.0 (old rundata.fixed_grid_data is deprecated)
# set rundata.fgout_data.fgout_grids to be a
# list of objects of class clawpack.geoclaw.fgout_tools.FGoutGrid:
#rundata.fgout_data.fgout_grids = []

return rundata
# end of function setgeo
Expand Down
10 changes: 5 additions & 5 deletions examples/tsunami/chile2010_adjoint/adjoint/setrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,11 @@ def setgeo(rundata):
rundata.qinit_data.qinitfiles.append(['hump.xyz'])


# == setfixedgrids.data values ==
fixed_grids = rundata.fixed_grid_data
# for fixed grids append lines of the form
# [t1,t2,noutput,x1,x2,y1,y2,xpoints,ypoints,\
# ioutarrivaltimes,ioutsurfacemax]
# == fgout grids ==
# new style as of v5.9.0 (old rundata.fixed_grid_data is deprecated)
# set rundata.fgout_data.fgout_grids to be a
# list of objects of class clawpack.geoclaw.fgout_tools.FGoutGrid:
#rundata.fgout_data.fgout_grids = []

return rundata
# end of function setgeo
Expand Down
10 changes: 5 additions & 5 deletions examples/tsunami/chile2010_adjoint/setrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,11 @@ def setgeo(rundata):
# for qinit perturbations, append lines of the form: (<= 1 allowed for now!)
# [fname]

# == setfixedgrids.data values ==
fixed_grids = rundata.fixed_grid_data
# for fixed grids append lines of the form
# [t1,t2,noutput,x1,x2,y1,y2,xpoints,ypoints,\
# ioutarrivaltimes,ioutsurfacemax]
# == fgout grids ==
# new style as of v5.9.0 (old rundata.fixed_grid_data is deprecated)
# set rundata.fgout_data.fgout_grids to be a
# list of objects of class clawpack.geoclaw.fgout_tools.FGoutGrid:
#rundata.fgout_data.fgout_grids = []

return rundata
# end of function setgeo
Expand Down
Loading