Source file movie.F90
The source file movie.F90 provides routines to write 2-D planes
of a distributed data array or the complete 3-D volume to a file. The resulting
data files can be directly viewed and processed by standard graphics software,
e.g. IDL.
-
Subroutines moviexy, moviexz, movieyz:
These subroutines write an xy, xz, or yz plane, respectively,
to disc. The procedure call call moviexy(f,z0,unit1,unit2) writes
the xy plane with z=z0 (0 <= z0 < nz*pez) to
unit1 in byte or integer scale form and stores the minimum and maximum
value in unit2. Saving of the minimum and maximum values allows for later
reconstruction of the physical values. Normally one byte per grid point
is produced with values ranging from 0 to 255. In case the switch double_byte
is used for each grid point a two byte signed integer value is extracted
which ranges between from -32768 to 32767. It is assumed that the
files denoted by unit1, and unit2 are already open.
-
Subroutine volume:
Like the subroutines movie... the subroutine volume writes
byte or integer scaled data to a file. However instead of treating a selected
plane it stores the entire 3-D volume.
Remarks:
-
To obtain maximum flexibility the calls to the movie routines are not coded
directly into the main time loops in p3d.F90,
p3d-hybrid.F90,
and p3d-twofluid.F90 but encapsulated in header
files as movie2d.h. These header files consist of four sections
which are inserted by the preprocessor cpp at the appropriate locations
in the main programs. In the first section
movie_variables variables
needed for the movie generation are defined, this part is included in the
definition of variables in the main program. The section movie_open
is
included before the main time loop starts, the movie files should be opened
in this section. The section movie_write controls the output of
the movie data and is included into the main time loop. The final section
movie_close is used at termination of the code to close the movie
files.
-
In case the switch double_byte is active an integer number is created
for each grid point which consists of two bytes. Unfortunately there exists
no standard which one of the two bytes is stored first in the file. Depending
on the type of workstation used for viewing the data the bytes need to
be swaped. Note, that for this purpose a standard IDL routine called "byteorder"
is available.
Movie related switches:
-
movie_header: The switch movie_header determines which movie
header file is used. If no movie output is to be produced use #define
movie_header "movieempty.h". For 2-D particle simulations #define
movie_header "movie2db.h" , #define movie_header "movie2d.h"
or #define movie_header "movie2dnoions.h" would be good choices.
For 3-D particle simulations movie3d.h could be used. Since the
movie output contains a substantial amount of serial work, movie production
is not recommended in very large runs (thus use movieempty.h). In
this case the complete data files should be post-processed. For 2-D hybrid
simulations the header file movie2dhybrid.h is available and
for 2-D two-fluid runs use movie2dtwofluid.h.
-
movieout: In most movie header files the variable movieout
determines the time interval after which a new set of movie frames is produced.
For simulations in which phenomena on an ion cyclotron time scale are studied
#define
movieout 0.5 would be a reasonable choice.
-
double_byte: As default one byte per grid point is produced (byte
scaled data). With the switch #define double_byte active two bytes
per grid point (integer scaled data) are stored.