clawpack / visclaw

Clawpack visualization tools
http://www.clawpack.org
BSD 3-Clause "New" or "Revised" License
29 stars 47 forks source link

kml plots of only gauges? #236

Open rjleveque opened 5 years ago

rjleveque commented 5 years ago

@donnaaboise: I'm trying to make kml files for only the gauges -- it's very convenient to be able to click on the gauge and see the plot for that gauge in situations where we have dozens of gauges, even if I don't want to view animations of the solution on Google Earth. It would be nice to be able to just make the kml's for the gauge plots.

I'm running into a few problems. Not high priority since I figured out how to produce what I want working around these things, but next time you are working on kml tools, this is something to add to the wish list.

  1. It works ok if I also make at least one frame plot and open _GoogleEarth.kmz. But if I unzip this and then try to open only gauges.kml it doesn't find the images properly unless I edit this file to change ../../images to ./images. In general it would be nice to be able to easily create a small directory with just these gauge files and images to share with someone.

  2. If I set

     plotdata.print_framenos = [] 

    in setplot.py, so it shouldn't produce any frames, only the gauges (I hoped) then make plots dies with the error

    File "/Users/rjl/git/clawpack/visclaw/src/python/visclaw/plotpages.py", line 1282, in plotclaw2kml
    frameno = framenos[-1]
    IndexError: list index out of range
  3. If I set

     plotdata.print_framenos = [0] 

    say, so it just works on 1 frame, and set

    plotfigure.use_for_kml = False

    for all the figures that make frame plots (hoping to not generate the kml for these), then opening the resulting kmz file still shows all the grid patches because a levels.kml file is still created.

donnaaboise commented 5 years ago

@rjleveque I'll take a look at this - it sounds like nice feature to have.