PALM permits simultaneous output xy, xz and yz cross sections. Since the output of all three cross section plots is steered in the same way, only the creation of xy plots is described.
Output of xy cross
sections requires to set at least two parameters: first, the temporal
interval of the output time (run parameter dt_do2d_xy)
and second
the names of the quantities for which cross section output is wanted (data_output).
The string '_xy'
must be appended to these name strings in either case. Output times
cannot be defined
directly but only via the output time interval, starting from the
beginning of the initial 3d run (t=0, but no cross sections are
written at the time t=0; exceptions see do2d_at_begin).
The exact location (height level) of the cross
section(s) can be defined with run parameter section_xy.
If no values have been assigned to data_output and section_xy
or
if the value given for dt_do2d_xy is
larger than the simulated time (see end_time),
then there will be no output!
Data is output in binary format into the local file PLOT2D_XY. 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. Such a statement can look like this:
PLOT2D_XY out:loc:tr pxy ~/PLOT/$fname _pxy_in.
If the respective mrun call is like
mrun -d test -r “pxy”…
then the local file PLOT2D_XY is copied to the permanent file ~/PLOT/test/test_pxy_in . However, the character string “pxy” activating the file connection statement (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 directly used as input file for the plot software iso2d. However, this requires the user to assign data_output_2d_on_each_pe = .FALSE. (see also at the end of this chapter) . iso2d needs another file, the so-called parameter file, which specifies the plot layout. This file contains a so-called global parameter set which applies to all plots as well as a local parameter set which is valid for each individual plot. These global and local parameter sets are also created by PALM and output into two different local files named PLOT2D_XY_GLOBAL and PLOT2D_XY_LOCAL. These must be combined to one file via a so-called output command in the configuration file. The resulting file also needs a file connection statement:
OC: [[ -f PLOT2D_XY_GLOBAL]] && cat PLOT2D_XY_LOCAL >> PLOT2D_XY_GLOBAL
PLOT2D_XY_GLOBAL out:loc:tr pxy ~/PLOT/$fname _pxy_par.
The output command (corn shell syntax) tests whether the file PLOT2D_XY_GLOBAL exists and if so the file PLOT2D_XY_LOCAL is appended via the "cat" command to the file PLOT2D_XY_GLOBAL which then contains all parameters needed by iso2d. This relatively pedantic proceeding is due to the fact that PALM can produce the file PLOT2D_XY_GLOBAL only at the end of the simulation (when the final value of the global iso2d-parameter planz is known), while the local parameter sets are written continuously to the file PLOT2D_XY_LOCAL during the run. A consequence is, that in case of aborts of a run the file PLOT2D_XY_GLOBAL has possibly not been created and thus a visualization of the data - although they may be available - is not possible (in such a case, the user may create the parameter file manually).
If you are in the directory ~/PLOT/test, the data can be plotted by entering
iso2d -d test _pxy_in -p test_pxy_par
By default plot layout as specified in the parameter file is as follows: for each cross section of each individual quantity a seperate plot is created using isolines. Isolines with negative values are displayed in red color. The axes do not have labels and the units are [m]. For identification, each plot is provided with a title, which contains the model version number, the run identifier (base file name + number of the restart run), the name of the host where the run was executed, and the date and time of the beginning of the run. Furthermore each plot carries a caption where the name of the displayed quantity, the output time (starting from beginning of the 3d simulation, t=0) and the location of the cross sections (as height level and grid point number) is noted.
The layout of the plots can be varied by editing the parameter file (according to the various features of iso2d: color shading, vector plots, streamlines, etc.). For a detailed description of the iso2d parameters see the iso2d manual (only in German).
With parallel runs and choice of data_output_2d_on_each_pe = .T. each PE outputs the data of its subdomain to a separate file with the name PLOT2D_XY_<processor-Id>, whereby <processor-Id> is a four digit number (e.g. PLOT2D_XY_0000). These files are not suitable for iso2d, but after the end of a run they can be combined to one file readable by iso2d. This is done via a further output command in the configuration file:
OC:[[$ ( echo $localhost | cut -c1-3 ) = imbh ]] && 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_XY
which can be processed by iso2d.
Using this call, possibly existing
files of the other cross sections (xz, yz) and of 3d volume data 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: due to internal
restrictions of iso2d the file PLOT2D_XY
may not contain more than 99 cross sections. This restriction does not
apply
for the production of video clips via iso2d.
Last change: $Id: chapter_4.5.4.html 62 2007-03-13 02:52:40Z kanani $