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

Feature/202410 update #40

Merged
merged 103 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
0607026
change nodata_value to -99999 in topotools
rjleveque Apr 14, 2024
803816a
Merge pull request #599 from rjleveque/topo99999
mandli Apr 14, 2024
481b2b9
Fix bug related to tracking pressure at gauges
mandli Apr 19, 2024
ec7682d
Merge pull request #600 from mandli/rm-pressure-gauge-adjustment
rjleveque Apr 21, 2024
d87ca99
simplify make_fgout_animation.py use of update_artists
rjleveque Apr 26, 2024
e01df84
use image backend Agg in make_fgout_animation.py so animation size ag…
rjleveque Apr 26, 2024
5c6ea17
set blit=False and auto-detect number of fgout frames
rjleveque Apr 27, 2024
5b17562
clean up make_fgout_animation.py
rjleveque Apr 27, 2024
7917432
added new chile2010_fgmax-fgout/make_fgout_animation_with_transect.py
rjleveque Apr 27, 2024
19ba0ff
Add dZ_format parameter to DTopography.write function
rjleveque Apr 27, 2024
9c8ac0d
Merge pull request #602 from rjleveque/chile2010_fgout_animation
mandli Apr 30, 2024
183d913
Merge pull request #603 from rjleveque/dtopo_dZ_format
mandli Apr 30, 2024
dc82bc0
handle 0 radius
bolliger32 May 1, 2024
556e182
fix type on set_pressure
bolliger32 May 1, 2024
4dce9de
fix duplicate r
bolliger32 May 1, 2024
5cd4424
make comparison fp-safe
bolliger32 May 3, 2024
d683a20
handle underflow
bolliger32 May 4, 2024
843a0e8
avoid underflow in wind setting too
bolliger32 May 7, 2024
8b6bc84
point to riemann/src for Riemann solvers
rjleveque May 8, 2024
4148a02
Remove Riemann solvers from src/2d/bouss, Makefile.common points to r…
rjleveque May 8, 2024
2ef5b58
Merge pull request #604 from ClimateImpactLab/bugfix/zero-radius
mandli May 8, 2024
924237b
Initial CI GitHub action script
mandli May 10, 2024
08cfa95
Update testing.yml
mandli May 10, 2024
322831e
Add checking out of clawpack and geoclaw
mandli May 10, 2024
56fa638
Add lint and testing to CI
mandli May 10, 2024
2181d25
Disable linting for the time being
mandli May 10, 2024
cf0f3c9
Re-enable linting but only for geoclaw
mandli May 10, 2024
80e0804
Exclude old_topotools.py
mandli May 10, 2024
b6b6308
initial commit of xarray backends and example use file
kbarnhart May 17, 2024
3119ed5
Merge branch 'master' into add_xarray_backends
kbarnhart May 17, 2024
ef4c778
remove extra words
kbarnhart May 17, 2024
744e0e6
relax assumption of where command is issued (no longer needs to be in…
kbarnhart May 18, 2024
1bd6508
Fix up gauge plotting for storm surge
mandli May 22, 2024
c678e33
Add dry gauge plotting
mandli May 22, 2024
51c0d27
create gauge filenames that allow more than 5 digits in gauge number
rjleveque May 30, 2024
794e751
cleaner way to zero pad only if fewer than 5 digits using I0.5 format
rjleveque May 30, 2024
b975fef
Merge pull request #615 from rjleveque/gauge_filenames
mandli May 30, 2024
fb77742
Merge pull request #612 from mandli/update-surge-gauge-plot
mandli May 30, 2024
aabfe24
Cleanup and reimplement reading of ATCF and writing of GeoClaw storms
mandli May 30, 2024
e2dde74
Minor string comparison bug fix
mandli May 30, 2024
4579554
Extract name of storm from file name
mandli May 30, 2024
9a7be84
Merge pull request #607 from rjleveque/bouss_rp
rjleveque May 31, 2024
860ba23
Minor tweaks and fixes
mandli Jun 3, 2024
37d24dc
Fix missing comma
mandli Jun 3, 2024
a716f4c
AutoPEP8 surge code
mandli Jun 3, 2024
9925e7c
add more information about rioxarray
kbarnhart Jun 5, 2024
51fb840
better import error for rioxarray
kbarnhart Jun 5, 2024
a8bc42c
add B and level
kbarnhart Jun 5, 2024
ff1ce7c
add fgout output_style parameter and support for array of output_times
rjleveque Jun 5, 2024
564cbbc
remove trailing whitespaces in fgout_module.f990
rjleveque Jun 5, 2024
bcc4288
Refactor fgout_module.f90 so it works for either GeoClaw or D-Claw
rjleveque Jun 6, 2024
3d3db46
Use geoclaw module rho
mandli Jun 6, 2024
f2a1c93
Remove module level parameters that were not needed or were specific
mandli Jun 6, 2024
12f4233
Initial implementation of rotation control
mandli Jun 6, 2024
8179cb4
Merge branch 'improve-storm-io' into add-hemisphere-control
mandli Jun 6, 2024
c122f6a
Minor bugfixes and rearranging
mandli Jun 6, 2024
e7b24e5
Fix bugs in the non-spherical coordinates for storms"
mandli Jun 7, 2024
8636c04
Merge pull request #616 from mandli/improve-storm-io
mandli Jun 10, 2024
1f8fe48
Merge pull request #617 from rjleveque/fgout_tarray
rjleveque Jun 11, 2024
972d838
Merge branch 'clawpack:master' into add_xarray_backends
kbarnhart Jun 14, 2024
5fa6561
fix fgout_tools.FGoutGrid.read_fgout_grids_data for time array
rjleveque Jun 19, 2024
918a696
Add kwargs to Topography reading
mandli Jun 28, 2024
dc0c37e
Add radii to plotting options
mandli Jun 28, 2024
25c5ea6
Add plotting of storm tracks
mandli Jun 28, 2024
0386136
Merge pull request #621 from rjleveque/fgout_tarray_read
rjleveque Jul 1, 2024
3021760
Merge branch 'clawpack:master' into add-track-plotting
mandli Jul 1, 2024
dac2a2b
add clip example
kbarnhart Jul 5, 2024
a930916
Merge branch 'add_xarray_backends' of https://github.com/kbarnhart/ge…
kbarnhart Jul 5, 2024
d83bd23
return ds
kbarnhart Jul 5, 2024
556c769
Allow specifying which components of q to output on each fgout grid
rjleveque Jul 14, 2024
5379059
Merge pull request #622 from mandli/add-track-plotting
mandli Jul 15, 2024
b5c898a
working on dclaw variables
rjleveque Jul 17, 2024
70ee91e
Fix fgout_tools.py to support fgout.q_out_vars also for Boussinesq or…
rjleveque Jul 18, 2024
7f4d10c
Update topo_module.f90
mandli Jul 18, 2024
851b719
Merge pull request #625 from clawpack/lengthen-netcdf-var-names
rjleveque Jul 18, 2024
981ab8c
fix data_file -> data_path
rjleveque Jul 24, 2024
9378f12
add FGoutGrid.read_fgout_grids_data_pre511 for reading legacy fgout_g…
rjleveque Jul 29, 2024
665bbda
add to doc string for pre511
rjleveque Jul 29, 2024
f373e23
print more helpful error msg if fgout_grids.data seems to be pre511
rjleveque Jul 29, 2024
6c849f2
force user to call read_fgout_grids_data before read_frame
rjleveque Jul 29, 2024
178403e
Fix chiles2010_fgmax-fgout scripts to make fgout animations
rjleveque Jul 29, 2024
1ec2512
Leave output_format as an argument to FGoutGrids.__init__ but not that
rjleveque Jul 29, 2024
6e67973
fix qmap=='geoclaw-bouss' mapping
rjleveque Jul 29, 2024
26607fa
Merge pull request #624 from rjleveque/fgout_q_vars
rjleveque Jul 30, 2024
c0ba204
wip
kbarnhart Aug 20, 2024
f51f2f6
Merge branch 'master' into add_xarray_backends
kbarnhart Aug 20, 2024
e21b294
first pass at using revised fgout data structure with backends.
kbarnhart Aug 20, 2024
eb3cd20
add a few more comments.
kbarnhart Aug 20, 2024
92375ff
name updates
kbarnhart Aug 21, 2024
f69c708
bdiff->bdif
kbarnhart Aug 21, 2024
145233c
remove vestigial _qelements
kbarnhart Aug 21, 2024
66d0d63
Add example that should work with/without dask
kbarnhart Aug 21, 2024
eb7981e
improve drytol handling
kbarnhart Aug 21, 2024
d4079f8
don't specify error type.
kbarnhart Aug 21, 2024
61460c1
switch from hard coded drytol to user-specified drytol
kbarnhart Aug 21, 2024
f61d155
update use of dry_tolerance
kbarnhart Aug 21, 2024
987417a
fix exceptions.
kbarnhart Aug 21, 2024
88cdbc7
Merge pull request #611 from kbarnhart/add_xarray_backends
rjleveque Aug 23, 2024
afc7ff9
update examples/tsunami/chile2010/setplot.py
rjleveque Aug 25, 2024
3ac6822
Merge pull request #626 from rjleveque/chile2010_setplot
rjleveque Aug 25, 2024
3ede3d3
Fix src/bouss/amr2.f90 call to set_fgout, adding nvar
rjleveque Aug 25, 2024
3303883
Merge pull request #627 from rjleveque/bouss_set_fgout_fix
rjleveque Aug 26, 2024
d8aa463
Merge branch 'master' of https://github.com/clawpack/geoclaw into fea…
bolliger32 Oct 9, 2024
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
6 changes: 6 additions & 0 deletions examples/bouss/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

GeoClaw Boussinesq solver examples

The radial_flat subdirectory contains one example using the Boussinesq
solver introduced in Clawpack v5.10.0.

Expand All @@ -14,8 +16,12 @@ OpenMP along with MPI. Some flags have to be set as environment variables
or directly in the application Makefile, e.g. see the lines commented out in
radial_flat/Makefile.

The file setenv.sh illustrates how you might set some environment
variables for the bash shell.

A file petscMPIoptions is also required to set some PETSc parameters for the
iterative method used to solve the large sparse linear systems that arise at
each refinement level when the Boussinesq equations are solved.
One of the environment variables mentioned above points to this file, and a
sample is included in this directory.

9 changes: 9 additions & 0 deletions examples/bouss/radial_flat/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ A Gaussian hump of water at the origin spreads out over a flat bottom,
as specified by the topo file `flat100.txt` (uniform water depth 100 m).
The equations are solved in Cartesian coordinates with the SGN equations.

Running the GeoClaw Boussinesq solvers requires PETSc and MPI.
For more details see the documentation
https://www.clawpack.org/bouss2d.html
and
$CLAW/geoclaw/examples/bouss/README.txt
Run
make check
in this directory to check if things seem ok for running this code.

A flagregion specified by `RuledRectangle_Diagonal.data` (that is created by
code in `setrun.py` is used to allow flagging for refinement to
level 2 only near the diagonal (for abs(x-y) < 1000). The code is set up to
Expand Down
67 changes: 33 additions & 34 deletions examples/tsunami/chile2010/setplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,14 @@ def addgauges(current_data):

# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes('pcolor')
plotaxes.title = 'Surface'
plotaxes.scaled = True

def fixup(current_data):
import pylab
addgauges(current_data)
t = current_data.t
t = t / 3600. # hours
pylab.title('Surface at %4.2f hours' % t, fontsize=20)
pylab.xticks(fontsize=15)
pylab.yticks(fontsize=15)
plotaxes.afteraxes = fixup
plotaxes.title = 'Surface at time h:m:s'
plotaxes.aspect_latitude = -30.
plotaxes.xticks_fontsize = 10
plotaxes.yticks_fontsize = 10
plotaxes.xlabel = 'longitude'
plotaxes.ylabel = 'latitude'

plotaxes.afteraxes = addgauges

# Water
plotitem = plotaxes.new_plotitem(plot_type='2d_pcolor')
Expand All @@ -78,6 +74,8 @@ def fixup(current_data):
plotitem.pcolor_cmin = -0.2
plotitem.pcolor_cmax = 0.2
plotitem.add_colorbar = True
plotitem.colorbar_shrink = 0.8
plotitem.colorbar_extend = 'both'
plotitem.amr_celledges_show = [0,0,0]
plotitem.patchedges_show = 1

Expand Down Expand Up @@ -114,18 +112,37 @@ def fixup(current_data):

# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = 'auto'
plotaxes.ylimits = 'auto'
plotaxes.time_scale = 1/3600. # convert to hours
plotaxes.xlimits = [0, 9]
plotaxes.ylimits = [-0.3, 0.3]
plotaxes.title = 'Surface'
plotaxes.title_fontsize = 15
plotaxes.time_label = 'time (hours)'
plotaxes.ylabel = 'surface elevation (m)'
plotaxes.grid = True

def add_obs(current_data):
from pylab import plot, legend
gaugeno = current_data.gaugeno
if gaugeno == 32412:
try:
tgauge = TG32412[:,0] / 3600. # convert to hours
plot(tgauge, TG32412[:,1], 'r', linewidth=1.0)
legend(['GeoClaw','Obs'],loc='lower right')
except: pass

plotaxes.afteraxes = add_obs

# Plot surface as blue curve:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 3
plotitem.plot_var = 3 # eta
plotitem.plotstyle = 'b-'
plotitem.kwargs = {'linewidth':1.8}


# Plot topo as green curve:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.show = False
plotitem.show = False # not being used

def gaugetopo(current_data):
q = current_data.q
Expand All @@ -137,24 +154,6 @@ def gaugetopo(current_data):
plotitem.plot_var = gaugetopo
plotitem.plotstyle = 'g-'

def add_zeroline(current_data):
from pylab import plot, legend, xticks, floor, axis, xlabel
t = current_data.t
gaugeno = current_data.gaugeno

if gaugeno == 32412:
try:
plot(TG32412[:,0], TG32412[:,1], 'r')
legend(['GeoClaw','Obs'],loc='lower right')
except: pass
axis((0,t.max(),-0.3,0.3))

plot(t, 0*t, 'k')
n = int(floor(t.max()/3600.) + 2)
xticks([3600*i for i in range(n)], ['%i' % i for i in range(n)])
xlabel('time (hours)')

plotaxes.afteraxes = add_zeroline


#-----------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
fgno = 1 # which fgout grid

outdir = '_output'
format = 'binary' # format of fgout grid output

if 1:
# use all fgout frames in outdir:
Expand All @@ -48,7 +47,8 @@
fgframes = range(1,26) # frames of fgout solution to use in animation

# Instantiate object for reading fgout frames:
fgout_grid = fgout_tools.FGoutGrid(fgno, outdir, format)
fgout_grid = fgout_tools.FGoutGrid(fgno, outdir)
fgout_grid.read_fgout_grids_data()


# Plot one frame of fgout data and define the Artists that will need to
Expand Down
Loading
Loading