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

Auto detect file format, second attempt #222

Closed
wants to merge 9 commits into from

Conversation

rjleveque
Copy link
Member

This requires clawpack/pyclaw#581.

The default ClawPlotData.format value is now None, indicating that pyclaw should figure it out for itself.

I added a function ClawPlotData.getframe_time that is now used in plotpages.py to only grab the times, in place of the deprecated OutputController function.

While I was at it, I also added a function ClawPlotData.getframe_list that returns a list of all the framenos found in plotdata.outdir and the corresponding time, and a function to Iplotclaw so that this can be easily invoked at the interactive PLOTCLAW> prompt, with output like this:

PLOTCLAW > list
Frames found in _output:
Frame number 0 at time t = 0
Frame number 1 at time t = 0.25
Frame number 2 at time t = 0.5
Frame number 3 at time t = 0.75
Frame number 4 at time t = 1

I've been meaning to do this for a long time!

@mandli
Copy link
Member

mandli commented Aug 30, 2017

Looks good to me. I really like the listing!

@ketch
Copy link
Member

ketch commented Aug 31, 2017

There is actually a read_t() function in the pyclaw/fileio/*.py files; it might be nice to use that here so that we don't need to maintain two functions that do the same thing. Should make this code simpler, too. And petclaw/fileio/petsc.py has a read_t() function too, so this should also then work for those files.

* master: (43 commits)
  Merge and cleanup of geoplot.py
  cleaned out some old code
  fix old bug with some plotaxes code not properly indented,
  removed title() in plotgauge1 and moved xlabel()  out of plotgauge1
  change plotaxes.time_scale to multiplicative factor, consistent with kml_time_scale
  add plotaxes.time_label_kwargs parameter
  improve time axis on gauge plots
  More updating to formatting to get rid ofextraneous semi-colons, etc
  Strip ghost cells from binary data in both 2d and 3d
  Get rid of minor warnings Matlab complains about
  Check that dimensions agree
  Fix last warning
  Fix warnings; pre-allocate amrdata
  Supply default tol_lower and tol_upper
  Renderer is lower case 'opengl'
  Fix warnings in syntax and usage
  Add binary reader for amrclaw
  Minor formatting updates
  Minor formatting updates
  Fix bug in KML gauge visibility
  ...
@rjleveque
Copy link
Member Author

File format is now specified in the fort.t* files, see the discussion at clawpack/geoclaw#533.

So there is no need to try to auto-detect it.

@rjleveque rjleveque closed this Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants