You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GeoClaw has a parameter to adjust the sea_level. I am not sure how to really get this into the function, maybe provide a key word argument for the sea level and default to 0?
When we run at different tide levels to incorporate tidal uncertainty in PTHA this is an issue and we need to adjust the color scale to be symmetric about the sea_level used. I've done this by adding something like the following to setplot, where clim_ocean was the cmax value to use over the ocean and clim_CC was to use in a different figure where we zoomed in on Crescent City:
try:
tsudata = open(plotdata.outdir+'/geoclaw.data').readlines()
for line in tsudata:
if 'sea_level' in line:
sea_level = float(line.split()[0])
print "sea_level = ",sea_level
except:
print "Could not read sea_level, setting to 0."
sea_level = 0.
clim_ocean = 0.2
clim_CC = 0.5
cmax_ocean = clim_ocean + sea_level
cmin_ocean = -clim_ocean + sea_level
cmax_CC = clim_CC + sea_level
cmin_CC = -clim_CC + sea_level
I think reading in of the geoclaw.data file should work via the ClawData framework so you could do that. Also, we could replace the function in geoplot in the setplot function to get this working:
but this would require adding the key-word argument. This is a bit shorter and allows this to be set once for the entire script but is a bit less scrutable to someone new at Python. If nothing else this does provide an indication that a user may need to be careful about this.
GeoClaw has a parameter to adjust the
sea_level
. I am not sure how to really get this into the function, maybe provide a key word argument for the sea level and default to 0?I am also not certain what the real effect of this on plotting is and whether there are cases where we could see this.
The text was updated successfully, but these errors were encountered: