Web page interface - in
plot3d, when "www" is
entered, it generates plots (converted to GIF) for all
fields, plot types and times, and web pages with which you
can view your run results. The resulting .zip file
can be downloaded and the run results viewed with your web
browser. This is useful for viewing multiple fields
at once, which can help debugging.
More visualization
information
quick-links:
Plotting
For program #6 we abandon the habit of creating plots
while the program is
executing (for larger programs and data sets,
this should really only be considered for per-time-step
plots such as max W time series, which
is not required for your
assignment).
Instead we now call a routine -
putfield - from
within your main program, in the same way that you
previously called plot routines.
Putfield
stores data to disk in native binary format, which is fast
though not necessarily portable. So the I/O cost at
runtime for our domain sizes is negligible (for very large
domains, parallel I/O and filesystems are preferred).
So, the sequence to look at your simulation data is now:
- Compile putfield in with your
program, and put calls to it from your main routine
where you used to call plot routines directly.
- Run your program; it should create RunHistory.dat
and write your model output to that file.
- Run program plot3d (on Stampede at
~tg457444/502/Tools) to read the RunHistory.dat binary data
file and create plots for you.
plot3d calls
the ncar idt program from within it.
You can get a copy of the
putfield C or
Fortran routines on Stampede at
~tg457444/502/Pgm6 [in subdirectory /C
or /Fortran].
In that directory you will find
putfield.f90, putfield.c and demonstration programs
that call them:
demo-write.f90
and
demo-write.c.
When you have compiled
your
program with putfield.f90 or putfield.c and run it,
you should find a file named
RunHistory.dat in the directory from
which your program ran. This file can then be read
by the program
plot3d, which
is already compiled and available to you.
To use
plot3d, please
create a symbolic
link from my directory to yours by typing:
ln
-s ~tg457444/502/Tools/plot3d
. (don't
omit this trailing period "." -- it is important)
I have put the binary output from two of the Program 6
test runs -
TestA2 and
TestD - on Stampede at
~tg457444/502/Pgm6
... so, even before you try the demonstration programs
above, or compile
putfield into your program, you
can try running
plot3d on the above data
set. To do so, start X-windows, and after making a
link of my plot3d program in your directory, run
plot3d ~tg457444/502/Pgm6/plot3d_testA2.dat
Note that usually you just run "
plot3d" with no arguments; it looks for
the file named "
RunHistory.dat"
by default. If you rename RunHistory.dat, or
otherwise want to read a different binary file, you need
only pass it as an argument to
plot3d when
starting.
Final note: when called,
putfield needs an array,
the dimensions, and the name of each field; please use
U and
V for those wind
component names, which clues
plot3d where to
look for the wind fields with which to compute vorticity
for you as an additional field for plotting.
For
more details and examples of using
plot3d, check
this web page,
which also includes
information on
vis5d and
other visualization tools.