GNU mesh plot Q & A #1585
DanBrox
started this conversation in
SPECFEM2D [General]
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Q: Trying to follow the SPECFEM2D user guide to visualize the mesh created by xmeshfem2D. On page 13, the user guide suggests:
within gnuplot, type ‘plot "OUTPUT_FILES/gridfile.gnu" w l’
but there is no gridfile.gnu file in the OUTPUT_FILES directory created by executing the ./bin/xmeshfem2D command, just a Database00000.bin file. Possible to instruct on how the mesh specified by Database00000.bin can be visualized?
A:the gridfile gets produced when you turn on this setting in Par_file:
..
output_grid_Gnuplot = .true. # generate a GNUPLOT file containing the grid, and a script to plot it
..
and the xmeshfem2D tool only is able to create the file if the mesh is not coming from external mesh files (read_external_mesh = .false.).
if the above won’t work for you, a quick way of looking at the mesh is also to turn on the postscript output and run a simulation to produce a few snapshots:
..
output_postscript_snapshot = .true. # output Postscript snapshot of the results every NTSTEP_BETWEEN_OUTPUT_IMAGES time steps or not
..
meshvect = .true. # display mesh on PostScript plots or not
..
btw, the Database***.bin files are storing everything for the solver, not just mesh infos, but all kinds of additional variables, so it is usually tricky to get something specific like a mesh or velocity model out of there. more often, we use the SAVE_MODEL = gll setting to store the model velocities in a binary format and then visualize those, e.g., with a script like utils/Visualization/plot_model_from_gll_or_binary_file.py. that’s helpful when doing FWI and updating model velocities.
Beta Was this translation helpful? Give feedback.
All reactions