clawpack / geoclaw

Version of Clawpack for geophysical waves and flows
http://www.clawpack.org/geoclaw
BSD 3-Clause "New" or "Revised" License
75 stars 87 forks source link

`problem generating colorbar` using a setup derived from chile2010a #500

Closed Thomas-Ulrich closed 3 years ago

Thomas-Ulrich commented 3 years ago

Hi,

I hope it's the right place to write this issue. I m Thomas Ulrich, a Postdoc from LMU, Munich. I'm trying to set up a tsunami simulation of the Sumatra 2004 earthquake, with initial displacement from a 3d dynamic rupture model (Actually, I already run tsunami simulations for this earthquake using Samoa, a code developed by TUM, but I would like to account also for non-hydrostatic gradient, which Samoa does not support actually).

I've tried to build upon the example chile2010a, which works well on my laptop. (so far, I'm accounting for a dummy source, based on chile2010a). Unfortunately, I m unable to generate the animation (which work without problem for chile2010a):

    Reading  Frame 0 at t = 0  from outdir = /home/ulrich/clawpack/apps/notebooks/geoclaw/chile2010test/_output
*** problem generating colorbar
Frame 0 at time t = 0.0
    Reading  Frame 1 at t = 60  from outdir = /home/ulrich/clawpack/apps/notebooks/geoclaw/chile2010test/_output
*** problem generating colorbar
Frame 1 at time t = 60.0
    Reading  Frame 2 at t = 120  from outdir = /home/ulrich/clawpack/apps/notebooks/geoclaw/chile2010test/_output
*** problem generating colorbar
(etc)

The only difference with chile2010a is the domain, and the bathymetry:

(base) ulrich@ulrich-ThinkPad-T490s:~/clawpack/apps/notebooks/geoclaw/chile2010test$ diff maketopo.py ../chile2010a/
37,38c37
<         topo = topotools.Topography('gebco_10.esri', topo_type=3)
---
>         topo = topotools.Topography(os.path.join(scratch_dir,topo_fname), topo_type=2)
67,68c66,67
<     usgs_subfault.longitude = 95
<     usgs_subfault.latitude = 5
---
>     usgs_subfault.longitude = -72.668
>     usgs_subfault.latitude = -35.826
82,83c81,82
<         x = numpy.linspace(90, 100, 100)
<         y = numpy.linspace(0, 10, 100)
---
>         x = numpy.linspace(-77, -67, 100)
>         y = numpy.linspace(-40, -30, 100)
(base) ulrich@ulrich-ThinkPad-T490s:~/clawpack/apps/notebooks/geoclaw/chile2010test$ diff setrun.py ../chile2010a/setrun.py 
76a77,82
>     clawdata.lower[0] = -120.0      # west longitude
>     clawdata.upper[0] = -60.0       # east longitude
> 
>     clawdata.lower[1] = -60.0       # south latitude
>     clawdata.upper[1] = 0.0         # north latitude
> 
78,81d83
<     clawdata.lower[0] = 85.0      # west longitude
<     clawdata.upper[0] = 105.0       # east longitude
<     clawdata.lower[1] = -10.0       # south latitude
<     clawdata.upper[1] = 10.0         # north latitude
84,85c86,87
<     clawdata.num_cells[0] = 120
<     clawdata.num_cells[1] = 120
---
>     clawdata.num_cells[0] = 30
>     clawdata.num_cells[1] = 30
130c132
<         clawdata.tfinal = 300.
---
>         clawdata.tfinal = 5*3600.
337d338
<     rundata.regiondata.regions.append([3, 3, 0., 1e9, 85, 105, -10, 10])
401,407c402,403
<     topo_path = '/home/ulrich/clawpack/apps/notebooks/geoclaw/tohoku/gebco_2019_n25.0_s-21.0_w55.0_e110.0.nc'
<     #topo_data.topofiles.append([4, 1, 3, 0., 1.e10, topo_path])
<     from clawpack.geoclaw import topotools
<     topo10 = topotools.read_netcdf(topo_path, coarsen=10)
<     topo10.write('gebco_10.esri', topo_type=3, Z_format='%.0f')
<     topo_data.topofiles.append([3, 1, 3, 0., 1.e10, 'gebco_10.esri'])
< 
---
>     topo_path = os.path.join(scratch_dir, 'etopo10min120W60W60S0S.asc')
>     topo_data.topofiles.append([2, 1, 3, 0., 1.e10, topo_path])

(Note that when adding a gauge output, I get some tsunami waves). The netcdf bathymetry is from gebco, and has the following structure:

(base) ulrich@ulrich-ThinkPad-T490s:~/clawpack/apps/notebooks/geoclaw/chile2010test$ ncdump ../tohoku/gebco_2019_n25.0_s-21.0_w55.0_e110.0.nc -h
netcdf gebco_2019_n25.0_s-21.0_w55.0_e110.0 {
dimensions:
        lat = 11040 ;
        lon = 13200 ;
variables:
        double lat(lat) ;
                lat:standard_name = "latitude" ;
                lat:long_name = "latitude" ;
                lat:units = "degrees_north" ;
                lat:axis = "Y" ;
                lat:sdn_parameter_urn = "SDN:P01::ALATZZ01" ;
                lat:sdn_parameter_name = "Latitude north" ;
                lat:sdn_uom_urn = "SDN:P06::DEGN" ;
                lat:sdn_uom_name = "Degrees north" ;
        double lon(lon) ;
                lon:standard_name = "longitude" ;
                lon:long_name = "longitude" ;
                lon:units = "degrees_east" ;
                lon:axis = "X" ;
                lon:sdn_parameter_urn = "SDN:P01::ALONZZ01" ;
                lon:sdn_parameter_name = "Longitude east" ;
                lon:sdn_uom_urn = "SDN:P06::DEGE" ;
                lon:sdn_uom_name = "Degrees east" ;
        float elevation(lat, lon) ;
                elevation:standard_name = "height_above_reference_ellipsoid" ;
                elevation:long_name = "Elevation relative to sea level" ;
                elevation:units = "m" ;
                elevation:sdn_parameter_urn = "SDN:P01::ALATZZ01" ;
                elevation:sdn_parameter_name = "Sea floor height (above mean sea level) {bathymetric height}" ;
                elevation:sdn_uom_urn = "SDN:P06::ULAA" ;
                elevation:sdn_uom_name = "Metres" ;

// global attributes:
                :Conventions = "CF-1.6" ;
                :title = "The GEBCO_2019 Grid - a continuous terrain model for oceans and land at 15 arc-second intervals" ;
                :institution = "On behalf of the General Bathymetric Chart of the Oceans (GEBCO), the data are held at the British Oceanographic Data Centre (BODC)." ;
                :source = "The GEBCO_2019 Grid is the latest global bathymetric product released by the General Bathymetric Chart of the Oceans (GEBCO) and has been developed through the Nippon Foundation-GEBCO Seabed 2030 Project. This is a collaborative project between the Nippon Foundation of Japan and GEBCO. The Seabed 2030 Project aims to bring together all available bathymetric data to produce the definitive map of the world ocean floor and make it available to all." ;
                :history = "Information on the development of the data set and the source data sets included in the grid can be found in the data set documentation available from https://www.gebco.net" ;
                :references = "DOI: 10.5285/836f016a-33be-6ddc-e053-6c86abc0788e" ;
                :comment = "The data in the GEBCO_2019 Grid should not be used for navigation or any purpose relating to safety at sea." ;
                :node_offset = 1. ;
}

(and I m running

commit 9374909900ce7e10b420c6dc0f0a5ff72a0d3661 (HEAD -> master, tag: v5.7.1, origin/master, origin/HEAD)

) Any idea to fix my problem is welcome ;-) Thomas.

Thomas-Ulrich commented 3 years ago

I found out: plotaxes.xlimits and ylimits have to be adapted to the setup et setplots... Sorry about this issue, but I was blocked since yesterday on that mistake!

mandli commented 3 years ago

Glad you figured it out @Thomas-Ulrich!