In contrast to the plot output described so far, which can be handled more or less automatically, the creation of plots with AVS requires programming a so-called network by using the AVS network editor to design the plot layout. Details are not given here because it is assumed that the user is familiar with AVS.
Output of 3d volume data requires to set at least two parameters: first, the temporal interval of the output time (run parameter dt_do3d) and second the names of the quantities for which volume data output is wanted (data_output). The parameter nz_do3d can be used to limit data output in vertical direction up to a certain grid point. If no value has been assigned to data_output or if the value given for dt_do3d is larger than the simulated time (see end_time), then there will be no output! By default, data is output in 32-bit real format. Alternatively, for parallel runs, data can also be output in compressed format using 32-bit integers. This yields a loss of accuracy, but the file size is clearly reduced. The output of compressed data is described in more detail in chapter 4.5.6.
Data, whether compressed or uncompressed, is output into the local file PLOT3D_DATA. This file must be linked with a permanent file by using a file connection statement in the mrun configuration file (see e.g. chapter 3.2). At the end of the run the local file is copied to this file. Additionally, mrun creates a file containing some coordinate informations about the 3d data, which also has to be copied. The statements can look like this:
PLOT3D_DATA out:loc:tr avs ~/PLOT/$fname _avs
PLOT3D_COOR out:loc:tr avs ~/PLOT/$fname _coor .
If the respective mrun call is like
mrun -d test -r “avs”…
then the local file PLOT3D_DATA
is copied to the permanent file ~/PLOT/test/test_avs
.
However, the character string “avs”
activating the file connection staement (see third column of the
statement) must be given in the mrun call as
argument of the
option -r (and/or -o). If
this
is forgotten by mistake, the model outputs the data to the local
file, but this is not copied to the permanent file and thus the data
are not available for the user after the run has finished.
The created data file can be used as input file for the plot software AVS although for parallel runs another step is necessary which is described at the end of this chapter. However, after starting AVS (by executing the command “avs”), these data file is not read immediately. First, the user has to load a suitable network (created by the network editor). This module usually contains the module “read field”, which requires an input file in the so-called "fld-format", which in turn refers to the two files specified above (containing the volume data and coordinate informations) and describes their exact structure. This fld file is also generated by PALM by creating two different local files with the names PLOT3D_FLD and PLOT3D_FLD_COOR, which must be combined into one file by a so-called output command:
OC:[[ -f PLOT3D_FLD ]] && cat PLOT3D_FLD_COOR >> PLOT3D_FLD
The new file PLOT3D_FLD also needs a file connection statement:
PLOT3D_FLD out:loc:tr avs ~/PLOT/$fname _fld fld
The above mrun call then copies the local file PLOT3D_FLD to the permanent file ~/PLOT/test/test_fld.fld . In this case the entry “fld” in the sixth column of the file connection statement is very important because this ensures that the permanent file name gets the suffix ” .fld ". The AVS module “read field” expects all files to have this suffix. (Note: With this file connection statements files with cycle numbers receive the names ”… _fld.<number of cycle>.fld ".)
The file connection statements must guarantee that all three permanent files (volume data, coordinates, fld file) lie in the same directory. The names of the volume data file and coordinate file may not be changed after creation of the files, since they are registered in the fld file and otherwise cannot be found by the "read field" module. Sometimes it may happen that incorrect file names are registered into the fld file. In such cases the user must edit and correct the fld file accordingly.
After the AVS module “read fields” has read in the data, the content of this file is listed in a separate AVS window where each quantity is represented by its name and output time.
With parallel runs each PE outputs the volume data of its subdomain to a separate file with the name PLOT3D_DATA_<processor-Id>, whereby <processor-Id> is a four digit number (e.g. PLOT3D_DATA_0000). These files are not suitable for AVS, but after the end of a run they can be combined to one file readable by AVS. This is done via a further output command in the configuration file:
OC:[[$ ( echo $localhost | cut -c1-3 ) = ibmh ]] && combine_plot_fields.x
The program combine_plot_fields.x
collects the data from the individual processor files and outputs it
into the local file PLOT2D_DATA
which can be processed by AVS.
Using this call, possibly existing
files of 2d cross sections (xy, xz, yz) are
also combined. The tool writes
informative messages about the actions accomplished into the job
protocol, even if no files were found (i.e. the output command
may remain in the configuration file, even if no appropriate files
are created during the simulation).
Note: AVS can process 64 arrays at maximum in one file (with vector representations even only 25). If more arrays should be output, surplus arrays must be removed from the fld file (see PLOT3D_FLD) manually.
Last change: $Id: chapter_4.5.5.html 62 2007-03-13 02:52:40Z kanani $