The OUT input data file contains the specifications for a variety of
different plots. Many of the inputs to these simply consist of either the
ionisation state to be plotted or the ring number (for plots along a
contour line) or both. In addition, the first entries in the file contain
some general details and options that may apply to some or all of the
plots. The LOS plots and the ADAS based plots both require additional
lines of data defining either the line of sight and viewing scope in the
case of the LOS plots or the data regarding which section of the ADAS
atomic physics package is to be accessed in the case of the ADAS plots.
Some plots require both sets on ancillary information and will accordingly
be followed by two additional lines of data. Descriptions of the contents
of these lines can be found under plot 201 for the LOS cases and under
plot 125 for ADAS.

Enter a title line for the OUT case that is being run. This item is not
actually used anywhere and is just here for reference perhaps in
describing the types of plots that are requested in this particular OUT
data file. The title specified for the DIVIMP run is passed over to OUT
and used instead of this one as the title of the various plots.

This option tells the OUT program either to calculate the XY indexing
grids or to read them in from a file. In the past, this XY grid was used
in DIVIMP to facilitate following the neutral impurity particles. However,
these XY grids are no longer used for normal operation and running of
DIVIMP on grids for which polygon information is available. They are now
only used to make the plotting routines easier in OUT, and so the code to
calculate these was moved to the OUT program. A value of zero indicates
that OUT should calculate the grids and a value of 99 indicates that they
should be read from an attached data file. As in DIVIMP, this file is
normally attached to FORTRAN unit 13 if the file is in use. This option is
usually set to 0. (Note: The XY grid is an evenly spaced rectangular grid
that covers the entire plasma region. It is used in some cases to map
contour plots for passing to the plotting routines.

This directive instructs OUT to write the plot data for XY plots (as
opposed to contour plots) out to a file, rather than generating a plot for
it. This is useful when extracting data from multiple cases for inclusion
on one plot or for extracting the output data for use in a spreadsheet or
if it is necessary to look at the actual numbers because the plot does not
effectively display the information.

The calculation of PLRPs (Particular Line Radiation Profiles) used to be
performed in DIVIMP. This code was moved to OUT since it seemed more
appropriate that it be included as part of the post-processor. This switch
selects between using the original DIVIMP code to calculate the PLRPs -
which is based on a set of coefficients that are hard-coded in the PLRP
module - and the use of alternative code that calculates a limited number
of PLRPs by using the ADAS pls files. Currently, the only lines supported
by the ADAS option are for Boron. This option does NOT affect the function
of the plots that ask for additional ADAS data in order to generate the
plots - it ONLY affects options with the PLRP module itself - which
controls the information that is placed into the PLRPS array.

This option was used to test some plot options by assigning a decaying
exponential to the set of values to be plotted as a function of S. i.e.
f(S) = exp( - fact * S). A value of zero turns this off. It is only
operational in combination with some of the regular and log plots of
impurity density along the field lines.

This specifies a Z extent for the divertor region. All values of Z less
than the given value are outside the divertor region for an X-point up
configuration. This is used to generate the plot of density versus the
reference line for the areas outside the divertor region. (For an X-point
down configuration, the region of Z > Zd specifies the area away from
the Divertor.)

This option applies to generating contour plots. It generates a false
colour plot of bin densities instead of the usual contour plot. This is
useful because the resolution of the simulation is no better than the grid
underlying it and the false colour plot may suppress misleading trends due
to the effects of the underlying XY grid on the contour plot. When plotted
in black and white the false colour is implemented by changing half-tone
densities and fill patterns. Also, when plotting false colour in black and
white, it has been found that the best option for the number of
contours/false colour scales is 7.

Contour Level Option 2: Contours are logarithmic based on powers of 2.

Contour Level Option 3: User Defined. The contour routine will use the
set of contour levels specified in the input file. These values are
specified as a list of numbers in the range (0,1]. The description of this
entry is found below.

This general entry specifies the number of contour lines or the number
of colours to be used on a contour plot. This value must always be
specified. This number is the N that is used in the formulae describing
the contouring methods that are found above.

This input specifies a set of user-defined contour levels that should be
used on the contour plots. The format used to input the values is the
standard format for reading a real array into DIVIMP. The entry in the
data file consists of a descriptive line that is a character value
followed by a line that contains an integer. This integer value line
specifies how many contour levels should be read from the input data file.
This number and the values read will replace the number specified in the
previous entry for the number of contour lines. The numbers should be
listed in ascending order and the last entry should be 1.0.

This is a simple switch specifying whether close-up plots near the
target will be printed for along the ring plots if they are available for
the various plot options.

Zoom Plot Option 0: Off - Do not do close ups of the near-target regions
for along rings plots.

Zoom Plot Option 1: On - If close ups of the near target regions are
available for an along ring plot then they will be plotted. The value used
for the zoom or magnification is specified in the next entry.

This input specifies the range to be plotted on the close-up or zoom
plots. It is specified as a fraction of SMAX for the specific ring being
plotted. For example, an input value of 0.1 would select plots along the
ring over the close-up plotting ranges of [0,0.1 * SMAX ] and [0.9 * SMAX,
SMAX]. Similarly an input value of 0.01 would produce near target plots of
the regions [0.0,0.01 * SMAX] and [0.99 * SMAX, SMAX]. These close ups are
available for many but not all of the along the ring plots.

One of the contour plot options is to select a near X-point region for
plotting. The two values for R and Z ranges define the region that will be
plotted. The R-range that is shown on the near X-point plots is Rx +/-
Rrange = [Rx-Rrange,Rx+Rrange]. This may be modified on a particular grid
to maximize the grid area displayed.

One of the contour plot options is to select a near X-point region for
plotting. The two values for R and Z ranges define the region that will be
plotted. The Z-range that is shown on the near X-point plots is Zx +/-
Zrange = [Zx-Zrange,Zx+Zrange]. This may be modified on a particular grid
to maximize the grid area displayed.

This defines the scaling factor that is applied to some plots. A value
of 1.0 leaves all plots as they would normally be produced. A scale factor
of 1.0 sets the scaling factor to the ABSFAC source strength
calculated in DIVIMP. A value for the scale factor greater than 0.0 sets
the scaling factor to that value and a value for the scale factor less
than 0.0 set the scale factor to be ABSFAC/|Scale factor|.

This number is the Z-coordinate used when LOS plots are selected to be
plotted vs. the R-coordinate instead of angle. The R-coordinate used for a
specific plotting angle is determined by the intersection of that angle
with the value of Z specified here.

Some plots have the ability to include experimental datasets in the
figure. Most of these routines have an input specifier that indicates
which experimental dataset should be included. However, some of the
older plots did not have this ability. In order to add this capability
for some of these plots - this general input specifies an experimental
data set that should be plotted in addition to the calculated data if
the feature is available for the plot. Only one dataset can be specified
in this manner for these types of plots for any one input file.

There are a wide variety of plotting options available from the OUT
package. Many of the plots (e.g. the LOS plots) can be configured to
replicate the actual functioning of a specific reactor diagnostic. Others
can provide information that can not be obtained from any reactor
diagnostic and can lead to a better understanding of what may be occurring
within the reactor (e.g. the leakage plots).

In the following numbering system for plots there a few common ideas and
a number of exceptions. Here are a few of these. The even numbered contour
plots are usually used to specify the near X-point plots, while the odd
numbers will give the entire grid. (e.g. 11,12). Even numbered along the
ring plots will often request the plot to be made as a function of the
poloidal distance P rather than the along the field line distance S.
Furthermore, many of the contour plots will accept only the one value of
input - this usually is the ionisation state of the species to be plotted
- or in some cases - a simple on/off switch. For these types of plots - a
value of 99 turns them off. The other type accepts a 0,1
off/on switch where 0 is off and 1 is on. Many of these will have extra
plotting information included in the character string describing the plot.
This may define the ionisation state or the ring to be plotted.

Overall, the best way to select a plot is to examine an already working
plot file and look at the options that are set there and how they are set.
Some examples are included in the following document.

* A new feature has been added as a plot input. If the 4th character in
the plot specification is an & the code will read the
block of text from position 24 to 44 and try to extract 4 numbers. These 4
numbers will be used to calculate the visible plotting range for 2D
contour plots. This mechanism is useful to obtain close-up contour plots
of specific portions of the grid. The four number are interpreted as
follows  Xcenter Xcenter Dx Dy. The contour plot will then be
produced displaying a range of
[Xcenter-Dx:Xcenter+Dx,Ycenter-Dy:Ycenter+Dy].

Various plots are available to show the K contour system in full or in
detail near the X point. Plots 11 and 12 plot the polygon grid structure,
full scale and near X-point. Plots 13 and 14 overlay the XY grid
structure.

$

$ Ref Description Option 0/1'

$ -----------------------------------------------------

' 11 Equilibrium grid, full range ' 0

' 12 Equil grid close up near X pt ' 0

' 13 K contours and rectangular grid ' 0

' 14 K contours and grid near X pt ' 0

The following two plots are the same as 11 and 12 except that they use
an older grid superposition routine that does not take advantage of
polygon information,

' 15 Equilibrium grid, full range ' 0

' 16 Equil grid close up near X pt ' 0

The following two plots are also the same as 11 and 12 except that in this
case the wall segments are numbered on the plot with the values used to
identify the wall segments in the code.

The temperatures etc. can be plotted along R for a given Z position. The
Z position required is included in the character string in the last 6
locations and is read in with an F7.3 format specifier. Typical examples
would be Z = -1.0, 1.0, 1.5. Plot 36 is the same as 31 except that it uses
a different internal implementation involving the CUT
subroutine. Plot 36 would be the recommended choice. Plot 32 is the same
plot adapted to the Asdex Upgrade geometry. Plot 33 plots the particle count
Zeff and K values along a given line.

This plots the electron and ion collisional mean free path lengths
against S for a specified ring. The plot also includes the electron and
ion temperature scale lengths and the mean free paths multiplied by 5.0
and 500.0 on the same plot. Plot 43 plots these quantities vs. S and plot
44 will plot them vs. P.

These plots include both the EDGE2D and DIVIMP calculated SOL values so
that they may be directly compared for each field line. These plots are
only useful if DIVIMP has calculated the background plasma while at the
same time the EDGE2D plasma has also been read in for reference.

This graph plots the conduction and convection terms contributing to the
calculation of the background plasma in SOL options 12 to 22. The four
plots produced are 5NVkT, Convection terms, 1/2mV3, and the sum of the
first two all as a function of S along a specific ring.

This plots the S poloidal and Z values of the bins on a specific ring as
a function of their equivalent S values. The purpose of this plot is to
assess the position of the bins in differing co-ordinate systems; this
plot is a map between these systems.

This option will plot various values that are useful in calculating the
Neuhauser retention criterion for a particular field line. Included is the
ratio of Lii to Lti and the Mach number as a function of S.

If this graph is selected, plots of the electric field, drift velocity,
ion temperature, electron temperature density, etc. are generated for the
selected ring. They are plotted as a function of S. Fine scale as well as
large scale plots are produced.

If this graph is selected, plots of the electric field, drift velocity,
ion temperature, electron temperature density, etc. are generated for the
selected ring. They are plotted as a function of S. Fine scale as well as
large scale plots are produced.

These plot data passed from a PIN run through DIVIMP to the OUT program.
It is plotted as a function of S along a specified ring. It can easily be
expanded to produce the plots as a function of the poloidal co-ordinate
instead of S. The three quantities plotted here are Hydrogenic Ionization,
Hydrogen Neutrals and Molecular Hydrogen densities.

For these two plots the normal off/on or 0/1 switch is not used.
Instead, the integer entered alongside either of these options determines
how many points will be used to plot the graph. When the DIVIMP2 program
is run, the target area is split up into 500 points for purposes of
erosion / deposition, and entering a value of 1 here results in a plot
using the full 500 points. Any value greater than 1 results in a combining
operation of adjacent points, giving a smoothing effect to the plots. For
example, a value of 3 indicates that points are to be grouped into blocks
of threes. Typical values used are 5 and 10.

These four plots are an aid to locating where exactly the neutrals and
ions enter the main plasma and where they leave it. The figures given
alongside the plots should tie up with the figures printed in the DIVIMP2
output for "number of neutrals entering main plasma" etc.

This plots the contents of the leakage array which was specified as an
input to DIVIMP. It records the flux of ions travelling along the SOL to
the mid-plane. The particles are recorded only once for each distance they
pass.

The basic output from the program. In general, plots with references
greater than 100 are either for "full scale" contour plots (odd
references) or "plots near the X point" (even references).
Additionally, in some cases they are broken down into the normal steady
state results, and results at a series of specified time points. Hence for
plots of Density, four options are available :- Ref 101 gives the Steady
State density full scale contour plot, Ref 102 gives the Steady State
density contour plot near the X point, Ref 103 gives the densities at a
series of time points, Ref 104 gives the densities at the time points near
the X point.

These plots are of density against distance along contour, S. These are
plotted for the ring selected. Ref 111 and 112 give the plots at the set
of time points, with the weighted averages smoothing technique applied to
Ref 112. The remaining options, 113 and 114, give the integrated density
along the given contours, with and without smoothing. These plots are very
useful for testing purposes when Dperp = 0.0 and ionisation is switched
off, since the ions are then constrained to run back and forth along their
launch contours.

This plot displays a contour plot of the ratio between any
two spectral lines that can be obtained from ADAS data. The plot input
consists of the identifier line that activates the plot - a value of
zero will turn off the plot - followed by two lines of ADAS data specifications.
This plot only works for species for which density data is available
from the corresponding DIVIMP run.

The following example plots the Dalpha/Dgamma ratio which can be indicative
of the prescence of detached plasma conditions. The ADAS data input
lines are described below in plot 125 - however, there are two additional
pieces of data for these ADAS input lines that are not present in the
standard ADAS specification. The last two items on the input line
are the charge state and mass of the species emitting the spectral line.
This information is required so that OUT can determine which density data
to use in calculating the specitral line.

Contour plots for both impurity and hydrogenic radiation as calculated
by ADAS are available through these plot options. The specific ADAS data
to be used to calculate the plots is selected using the Selector input
line which is described below.

'125 Contour Integrated PLRP (ADAS) ' 99

'000 ADAS' '/u/adas/ldh' 93 'pju' 1 0 0 0

The line of additional information required for these plots is described
below with an example.

'000 ADAS' '/u/adas/ldh' 93 'pju' 1 0 0 0

The first three digits are a blank index number for the routine that
generally reads in the entries in the data file. The next entry '/u/adas/ldh'
specifies a directory (for a UNIX environment or a USER ID on the JET mainframe) where the
ADAS data can be found (A * can be used to indicate that the
default ADAS central database is to be utilized for the calculations).
This entry can easily be adjusted for a mainframe environment by having this
string set to the mainframe user ID where the data can be found. The next number specifies
which year of the ADAS data should be used and the following string specifies which
subset of the ADAS data for this element in this year should be accessed.
The next three numbers are ADAS specific indices that specify which data is to be
retrieved from the ADAS database. The first (ISELE) is a selector number
which identifies the data block corresponding to emission due to
excitation. If ISELE = 0 then emission from this process is set to zero.
The next selector (ISELR) identifies the data block corresponding to
emission due to recombination. If ISELR = 0 then emission from this
process is set to zero. Finally, the third selector (ISELX) identifies the
data block corresponding to emission due to charge exchange. If ISELX = 0
then the emission from this process is set to zero. The fourth specifier is
an OUT program value (ISELD) that is an index into an experimental data file for
the specific case and shot being examined. If this value is non-zero then OUT will
plot the experimental result referred to by this index on the same plot as the
calculated result.

Plots 135 to 138 are the same as 125 to 128 - the difference is that the units
of the contours are in photons/s - total emission - rather than emission density as
in the 125 to 128 plots with units of photons/m3s.

Contour plots of net power loss (POWLS) and absolute power losses
(ABSFAC * POWLS) for both impurity and hydrogenic losses (HPOWLS) are
available in contour plots , full range or near X point. Plots 147 and 148
are always done in false colour. Plots 149 and 150 are calculated
from impurity data supplied by a fluid code if one was loaded as
part of the DIVIMP run.

Contour plots of line radiation (LINES) for both impurity and hydrogenic
losses (HLINES) are available in contour plots , full range or near X
point. This plots the
portion of the total power loss that is due to all line radiation. In many
cases this is the dominant contribution to the total power losses. Plots 155
and 156 are based on fluid code results if any were loaded with the
DIVIMP run.

These options produce contour plots of the bremsstrahlung radiation
calculated using the routine LDBREM. All the plots assume a wavelength of
5235.0 A. Plots 157 and 158 include Bremsstrahlung contributions from
impurities while 159 and 160 do not and 139,140 include only the free-free
contribution without impurities. Any option value in the range from -2 to NIZS+1
will activate these plots - though the specific value is not significant at this
time.

These contour plots map the sources of particles that leak into specific
regions. It also plots the contours of the tp for each of the cells of
origin. These two pieces of information can be used to identify which
regions the impurity ions tend to come from and the regions from which the
particles that stay in the plasma the longest come from. The plasma is
divided into five regions for these plots - the core, the edge (main SOL +
divertor SOL), the private plasma, the main SOL (above the X-point) and
the divertor SOL (below the X-point). The sources of particles reaching
each of these regions can be plotted and analysed using these plots.

Plot of Densities averaged along each contour, plotted against the
intersections of each contour with the Reference Line. The plots at each
for each time interval are produced. The reference line is located at the
mid-point along the separatrix field line from the two targets. The
ionization state to be plotted must be specified.

Plot of Densities averaged along each contour, plotted against the
intersections of each contour with the Reference Line. The reference line
is located at the mid-point along the separatrix field line from the two
targets.

Plot of Densities averaged along each contour, plotted against the
intersections of each contour with the Reference Line. This sums the
density contributions only for cells with a Z-co-ordinate above the
X-point in a grid configuration with the X-point at the bottom or for
cells with Z < Zd for grids with the X-point at the top.

This plots the total impurity density along a specified IK grid line. The starting
point is the specified knot on the wall ring. The plot then steps inward on the grid
following the contour of connected cells across the grid. The axis on the plot is
the total distance from the starting knot working step-wise across the grid.

Plots 176 and 177 display ADAS PEC data for specific spectral lines at four
densities and over a range of temperatures. Plot 176 covers a range of 1 to 200eV
while 177 runs from 0.5 to 10eV. The input
option specified is the desired charge state while the mass of the species
is specified in the description string.

Plots 178 and 179 display the same type of information as 176 and 177 except that
the information is the Bremsstrahlung coefficients instead of PEC data. Plot 178 covers
1 to 200eV while 179 covers 1 to 10eV.

With this item it is possible to follow the precise trajectories of the
first few ions. An array is dimensioned in DIVIMP (to say 5000) and used
to record the (X,Y) co-ordinates of an ion at every timestep until it is
absorbed. If there is space left in the array the trajectory of the next
ion is similarly recorded after the first ions details, and so it is
possible to record details for perhaps 10 or 20 ions in the array
(dependent on the timestep and the dimension of the array). Entering a
value N other than 0 alongside this option permits N graphs to be plotted,
one for each trajectory. It is wise to restrict N to (say) 10, and hope
that an interesting trajectory occurs within the first 10 plots. If not,
try N = 20, etc.

These plots display the distribution of total radiated power from the
plasma - summing together all the impurity radiation from the various
states and including the contributions from the hydrogenic background.
Calculating the background contribution would require that PIN be run in
combination with DIVIMP to obtain reasonable profiles of the hydrogen ion
and neutral distributions. (Plot 188 is full scale and 189 is near the
X-point.)

These options plot the impurity ion density or radiated power for a
specified ionization sate. (Specifying a value one greater than the
maximum ionization state will produce a plot containing the integrated
total). The plots are organised as follows, 191 and 192 are ion density
versus S or P respectively, 193 and 194 are Zi power loss versus S and P,
195 and 196 are identical to 191 and 192 except for being LOG plots of the
density, 197 and 198 are the same as 193 and 194 except for also being LOG
plots, finally 199 is a plot of the ion density divided by the bin width
and plotted versus S.

The set of plots in the 200 series represent a change from the typical
plots produced by the other options. All of the 200 series have a
reasonably standard input. The only difference is the quantity being
examined. The unique feature of the 200 series plots is that they
represent a LOS integrated observation of the various quantities based on
the modelling results stored in the various data arrays. These plots thus
model the observations of specific quantities from specific observation
positions and instruments. This allows the modelling results to be
compared directly with the actual experimental observations perhaps giving
some further insight into the processes taking place. There are two plots
of each type, the first uses a LOS integration method dependent on an
underlying evenly spaced XY grid which although less exact, will work when
only incomplete available about the R,Z bin system. The second set of LOS
integration routines utilises the bin vertices and a path-length in bin
calculation to yield the contribution to the LOS integral for a particular
line segment. This should yield more accurate results at the cost of not
being useable by all the shot geometries available to DIVIMP. In addition,
the second type of PLRP plots also utilise the ADAS package for the atomic
physics data and thus require an additional input line as described under
plot 126. The specifications for either one of these otherwise plots
requires two lines. The meaning of the various parameters is described
below.

'201 Density LOS plot - Vertical KT1 ' 0

'000 Data' 3.430 -3.992 95.0 0.395 0.001 43 5 3 1 1 0

The data line is interpreted as one of the following:

For 201 based series LOS plots:

R Z A dA dR npts avpts smoth izmin izmax norm

For 206 based series LOS plots:

R Z A dA Res npts avpts smoth izmin izmax norm

The difference is the interpretation of the fourth input parameter - for 201 series plots this
is interpreted as the integration step size along each LOS - which is necessary for plots
that do not take advantage of the polygonal grid. However, for 206 series plots, this
parameter is interpreted as the instrument width or resolution. Each signal data point that
is plotted is generated by averaging over "smoth" individual lines of sight distributed
evenly over an angular width of size "Res" which is centered on the viewing angle for the current
point being calculated. The following paragraphs describe the other parameters in more detail.

The number on the first line can take one of three values (0,1,2). Zero
turns the plot off, 1 will generate an unnormalized plot and 2 will
generate a plot with values normalized to a maximum of 1.0. R and Z
represent the observation position of the instrument, relative to the
co-ordinate system in which the plasma grid is defined. "A"
represents the angle for the initial point of the plot (in degrees),
relative to the positive R axis - which would be zero. "dA" is
the width (again in degrees) between each of the points to be plotted. "dR"
is the step size radially out from the observation position which will be
used for the integration. Npts specifies the number of points to be
plotted - thus the maximum angle is A + npts * dA. "Avpts" is
the number of LOS integrations that are made and their results averaged to
produce the value for each plotted point. A LOS integration involves
stepping along an observation path at steps of size dR until all
contributions across the plasma have been included. The reason to have
multiple chords for each point is so that significant contributions from
small areas far from the instrument will not be missed - however the
result is integrated and averaged in a manner similar to an expected
instrument operation so that the results can (hopefully) be expected to
bear some reasonable relationship to reality. The "smoth"
quantity allows for the results to be further smoothed by averaging the
values of consecutive points to produce a modified value for the central
point. This quantity specifies the number of such points to take into the
average. The quantities izmin and izmax specify the limits of the
ionization states to be plotted on the graph. Finally, the quantity norm
specifies one of four possible normalization options to allow the absolute
values of the data to conform to the experimental results - depending on
what type of instrument is in use. The four scale factors options
currently in use are:

Note: For many of these LOS plots there are two choices (e.g.
201 or 206) that will generate the same plot. This is due to two distinct
and parallel implementations for calculating the LOS plots. In general,
the 6 plots utilise an algorithm for integration that relies
on the existence of an underlying polygonal grid. This was not always the
case for DIVIMP. As such, the original routines (201,231 ...) will work
with or without a polygonal grid. They are still compatible with the cell
centred based grids for which DIVIMP was originally implemented. These
plot options are still included for compatibility with these older grids.
In general, it is probably better to use the LOS plots that are based
directly on the polygonal grid structure. However, either type of plot
should work. Please note that in the case of radiation based plots
involving particular line radiation, there is no exact match in the
plotting routines. The routines that use the newer methods of calculating
the LOS integrals also use ADAS to calculate the radiation. Similarly, the
older integration routines are not available for ADAS based radiation
data.

As above except that the integration is performed for PLRP radiation.
Plot 211 performs the LOS calculations on the PLRPS radiation array that
is calculated by OUT using hard-coded photon efficiencies for specific
lines. Plot 216 performs the same type of LOS calculations on ADAS
calculated radiation arrays.

This LOS integration plot has the same input specifications as above. It
requires the ADAS data to be used in the calculation to be properly
defined. This plot calculates the LOS integrated radiation for lines of
hydrogenic species only.

As previous descriptions. Integration is performed for the POWLS array -
Power Loss. Plot 231 and 236 use different subroutines for performing the
LOS calculations. Plot 236 is the one recommended for general use.

These plots are the same as above except that the quantity calculated is
weighted by a second array. In this case the impurity temperature is used
as a weight factor in calculating the integrated PLRP profile what is
obtained is a temperature profile based on spectroscopic emissions. Plot
246 uses ADAS to calculate the Particular Line Radiation Profiles (PLRP).
These plots could be useful in comparing Doppler temperature results for a
specific spectroscopic line within a LOS cone.

This plot is the same as above except that the LOS integration is based
on the impurity density instead of PLRP using the impurity Ti as a weight
function. This gives a density weighted as opposed to spectroscopically
weighted temperature profile. This is useful for seeing exactly where the
ions are the hottest within a viewing cone because radiation efficiency is
also a function of temperature. Plot 256 uses a different method to
calculate the profiles and its use is recommended.

These plots are the same as the (241,246) plots except that in this case
the background ion temperature is used as a weight factor in calculating
the integrated PLRP profile. The result obtained is a background
temperature profile weighted by spectroscopic emissions. This can be used
to diagnose the background conditions within a particular LOS cone from
which most of the radiative emission is occurring. Plot 266 uses ADAS to
calculate the Particular Line Radiation Profiles (PLRP).

These plots are the same as the previous (261,266) plots except that in
this case the background electron temperature is used as a weight factor
in calculating the integrated PLRP profile. The result obtained is a
background electron temperature profile weighted by spectroscopic
emissions. This can be used to diagnose the background conditions within a
particular LOS cone from which most of the radiative emission is
occurring. Plot 276 uses ADAS to calculate the radiation.

This produces a LOS plot where the impurity densities are used to give a
weighted average for the K values along each line-of-sight. This plot
gives an idea of the depth into the plasma which particles, within this
LOS cone, reach.

The following set of plots produce LOS integral graphs of the
Bremsstrahlung signals calculated in a variety of different ways.

Bremsstrahlung Plot (297):

This plot option uses the following relatively simple
formula to calculate the bremsstrahlung radiation and then performs
a LOS integration.

Bremsstrahlung Plot (298):

This produces a LOS plot of the calculated Bremsstrahlung emission
inside the viewing cone. It uses the routine LDBREM to calculate the
Bremstrahlung emission and the Gaunt factors in a more comprehensive way.

'298 Brem - KS3 Outer -NEW' 0

'000 Data' 2.781 4.328 270.3 0.000 3.575 1 10 -1 0 0 3

'298 Bremsstrahlung plot- KL2 -NEW' 0

'000 Data' 3.390 3.701 258.7 0.075 0.000 101 1 -1 0 0 0

Bremsstrahlung Plot (299):

This produces a LOS plot of the calculated Bremstrahlung emission inside
the viewing cone using the assumption that Z-effective is equal to 1.0
everywhere for the calculation. The reason for this plot is to avoid
statistical variation in the calculation of Z-effective within the case
and to allow the calculation of the Bremsstrahlung even when impurities
are not followed in the case. (i.e. Hydrogenic Bremsstrahlung emissions.)

'299 Bremsstrahlung plot- KL2 -NEW' 0

'000 Data' 3.390 3.701 258.7 0.075 0.000 101 1 -1 0 0 0

Bremsstrahlung Plot (300):

This produces a LOS plot of the Bremstrahlung which is calculated including
the free-free portion of the radiation.

Plots 311, 313 and 315 are all specifically designed for DIIID. Plot 311 plots
Hydorgen emission only. Plot 313 is for impurity emission and 315 sums the two
contribuitions. Each of the plots reads in a file in a specific format whose name must
be specified in the input. This matrix file contains a list of numbers detailing
the fractional contributions from each cell of the EFIT grid to each bolometer
channel. These coeffieicents are multiplied by the actual emission from each cell
to obtain the bolometer signal. The OUT code maps the results on the DIVIMP grid
to the rectangular grid used by the matrix in order to calculate the signals.

The number on the second input line after the matrix coefficient file name is
the index for any stored experimental data that should be included on the same plot.

Plot 331 is a generalized LOS plot. Each and every chord of the LOS integration can
be independenly specified in terms of location, angle, angular width and total line
length over which the integration should take place. This routine can be used to
model both LOS type diagnostics as well as generate integrated signal plots spaced
along any set of viewing lines. The details of the input are described in the comments
from the input file that are listed below.

At present there are seven different quantities that may be selected for
integration - this will likely increase as more useful quantities are found. In addition, this
plot can be used as a substitute for almost all of the LOS integration plots that currently
exist in the OUT program and at a future revamp of the OUT code - they may all be replaced
by the code for this routine.

This plot extracts a cross-section of data that is tabulated on the magnetic
grid used in DIVIMP for particle accounting. As a result the plot may show step like
artifacts that are caused by the finite size of the cells on the grid.

The cross-section is performed from the specified start to end positions with
a total of NPTS sampled along the length.

These plots use the multiple plot per page utilities to
produce a set of plots intended to compare OSM data sampled
from a specific cross-section of the grid to a set of
experimental data that were taken by a probe operating at the
equivalent position in the actual reactor.

The direct comparison of the results may not coincide however
due to problems with the magnetic grid not actually matching the
experimental locations of the actual magnetic flux surfaces. These
differences are compensated for by allowing an offset to be imposed.
This offset shifts the horizontal scale of the experimental data.

Each set of plots includes the four quantities Ne, Te, Ti and Pressure
comparing the OSM and RP results. Plot 353 is the same as 351 except
that it contains 16 plots showing each of the four quantities at four
different values of the offset.

I believe this produces a 3-D toroidal projection of a viewing line
cutting through the torus toroidally for the PIN H-Alpha emission. It
projects the 2-D poloidal results which are obtained from the DIVIMP and
PIN runs and then projects these values around the torus in a circle to
generate a 3-D distribution and then calculates which part of the grid a
toroidal observation line cuts - to calculate the contribution to the 3-D
LOS plot. (Note: I am not certain that this is what is done.)

The input routine for these plots reads two lines of data containing the
following information.

Line 1: Robs Zobs Cx1 Cy1 Cz1 Cx2 Cy2 Cz2 qres

These values are interpreted as the R,Z position of the start of the
LOS. The values (Cx1,Cy1,Cz1) and (Cx2,Cy2,Cz2) are the directional
cosines of the extremes of the viewing fan. The value qres is the width of
each of the LOS integrals that will be performed for each LOS between the
two extremes of the viewing fan.

Line 2: Nq Avpts Smooth Izmin Izmax Atype

Nq is the number of viewing chords that will make up the fan. The
direction cosines of each of these LOS between the two extremes of the fan
are calculated. Avpts is the number of LOS that will be averaged over for
each of these primary LOS. There will be 2*Avpts -1 lines calculated over
an angle of qres for each of the viewing LOS. Since this plot is intended
solely to plot PIN H-alpha, the value for Izmin is set to zero and the
value of Izmax is ignored. The code for this plot could be used as a
template for further 3D plot development and calculation. (Assuming that
the code works for more than a specific subset of cases and geometries.)

These are standard LOS plots for the Asdex Upgrade Boundary Layer
Spectrometer or other similar instrument. The only difference between
these and the standard LOS plots (201) is that the zero degree line is defined
as the negative X axis instead of the positive X axis in the previous LOS
plots. This is in accordance with the reference system in use at Asdex
Upgrade for defining the instrument's LOS. These plots produce
observations of integrated densities and PLRP's respectively.

These are special plots designed for one specific instrument on Asdex
Upgrade. The Lower Spectrometer is composed of 16 discrete lines of view.
As a result the plotted output is composed of the results from 16
discrete, single element, LOS integrations, taking into account the
instrument viewing angle. These are the plotted against the perpendicular
distance from the outer plate of each of these lines of sight with the
perpendicular drawn from the mid-point or separatrix strike point on the
target. Plot 421 is for LOS integrated PLRPs while 431 is LOS
integrated impurity density and 491 is LOS integrated PIN H-alpha
contributions.

These generate contour plots both for the whole grid and near the
X-point for the electron temperature (Te), the ion temperature (Ti), the
electron density (Ne), the bulk plasma flow velocity (Vb), the Electric
field (E) and the mean impurity charge state. These are contour plots of values
that are calculated by DIVIMP or read in from an external source and then
used for following the impurity ions.

This set of plots was developed by Peter Schwanke as part
of his Master's thesis to examine in detail the force balance on
impurity particles. In particular, the plots can be used in
conjunction with the Reiser force formulation for ion
transport to look at the differences between this formulation and
the standard DIVIMP methodology. These plots can also be used as
a diagnostic tool for looking at some general characteristics of
the impurity particle behaviour, trapping and parallel transport
in particular.

The first series of plots present contour depictions of the various
forces and force balances including the frictional, temperature
gradient and velocity gradient forces.

The following series of plots were also developed by Peter
Schwanke. In this case they display the balance of forces for
a specifiec impurity charge state. The impurity ion velocity is
required to produce a specific and accurate plot. Two different
possibilities can be chosen. Two different plots display two
simplified velocity assumptions. Vimp = 0 and Vimp = Vb. As can
be seen in the examples - both the ring number (fkux tube) and
the charge state of the impurity are inputs to these plots.

If PIN has been run from inside DIVIMP and these results are available,
these options will produce contour plots of a variety of the data produced
by PIN, both full scale and near the X-point. (In general the X-point
plots are even numbered.) The following lists the numbers and the
respective PIN quantity plotted.

These plots display the forces acting on a particle along the field
line. It includes the four main forces - the frictional force, the
electric field force, the ion temperature gradient force and the electron
temperature gradient force. It also includes the calculated net force on
the particle. These plots can be very useful for looking for potential
particle traps in a background plasma and for examining the relative
importance of the four forces. Plot 660 includes the entire ring as well
as close-ups of the near target regions while plot 661 is just the entire
ring. Both the ionization state and the ring must be specifed for the
plots.

These are plots of the Lagrange points for the balance of forces in the
Inner (plot 662) and Outer SOL (plot 664). The LaGrange point is defined
as the S-value at which the net forces acting on the particle at that
charge state are equal to zero. The ionization state for the plot must be
specified.

This option produces a contour plot of the net force on the specified impurity charge state.
The option value is interpreted as the charge state of the impurity for which the plot should be
produced. A value of zero turns off the plot.

These are contour plots of fluid code results that have been loaded with the
DIVIMP run. Plots 671, 672 display hydrogen neutral densities while 673, 674
display the impurity neutral density. These plots will only work correctly if
appropriate fluid code results were properly loaded when the DIVIMP case was run.

The 700 series of plots have a completely different format than the
previous plots available in OUT. These graphs place mulitple independent
plots on each page - including axes, data and labels. These plots also
include a number of different scaling options. The original purposes of
these plots was to produce a compressed output of comparative data for
EDGE2D background results relative to DIVIMP OSM modelling. However, these
plots can be used to display DIVIMP background data for multiple rings and
with varying zoom factors even when EDGE2D data has not been loaded. A
typical input line looks like the following:

The first line contains the identifcation number and description of the
plot type. The integer on the first line indicates whether the plot should
be generated and the type of scaling that should be used. This is the list
of the scaling options:

Scaling Option 1: ON - All plots on the page share the same scaling. The
minimum and maximum values for all data to be plotted are calculated and
are used for scaling the axes.

Scaling Option 2: ON - The minimum and maximum are calculated for each
plot on the page and these values are used to scale the axes for each of
the plots independently.

Scaling Option 3: ON - The maximum is calculated from all data to be
plotted. The minimum is set to 0.0 unless there are values in the data
which are less than zero in which case these values become the minimum
values for the scaling.

Scaling Option 4: ON - The maximum is calculated for each plot on the
page separately. The minimum for all plots is set to zero unless the data
values to be plotted cross the axis.

Scaling Option 5: ON - Logarithmic Scaling. The log10 of all data values
are plotted on the graphs. The maximum is the largest log10 value for all
data to be plotted. The minimum is zero unless the data crosses the axis.

Scaling Option 6: ON - Logarithmic Scaling. The log10 of all data values
are plotted on the graphs. The maximum is the largest log10 value on each
plot on the page. The minimum is zero unless the data crosses the axis.

Scaling Option 7: ON - Externally imposed scaling. The scale values for
the axes of each plot are externally imposed. At this time this means that
they must be hard-coded in the out.o4a module and the values passed to the
DRAWM subroutine that actually constructs the plots.

The second line of data describes all of the other characteristics of
the plots.

Ng - Number of Graphs on each page. Plots are formatted into two columns
and thus typical numbers for this quantity would be 2,4,6, or 8. The plots
get much smaller as the number on each page increases. In this example - 6
graphs/page have been selected.

Tp - Total Number of Plots to be generated. In the example above, three
pages of plots would be produced with 6 plots on each page. The first page
will always contain the maximum possible. Thus, if ten plots were
selected, the first page would contain six and the second four.

Zf - Zoom factor. This specifies the zoom factor that should be applied
to all graphs in this set of plots. A value of 0.0 indicates that no zoom
factor should be applied and all plots should be displayed over the entire
range of each field line. A value less than zero (e.g. -0.05) specifies
that all the plots produced should be close-ups near the target at the
start of the field line from 0.0 m to |Zf| * SMAX. In this case, if
Zf=-0.05, the plots would be close-ups from 0.0 to 0.05 * SMAX. If the
value of Zf is greater than zero then the close-ups are made at the other
end of the ring from (1.0-|Zf|) * SMAX to SMAX.

Rings- This entry specifies the list of rings for which the plots of the
specified quantity should be produced. There should be exactly as many
rings listed as the Total Number of Plots requested (Tp). These rings can
be from any area of the grid and there is no requirement that they share
the same X-axis scaling.

In all of these plots, both the values saved for the DIVIMP results and
the EDGE2D data (if loaded for comparison) will be plotted. If the EDGE2D
data has not been loaded in DIVIMP, then the EDGE2D data plots will be
zero - just the DIVIMP ones will be non-zero. However, since these plots
still plot the DIVIMP background plasma data, they provide an efficient
method of examining the details and variations of the background plasma
that has been used for the DIVIMP run. In addition, there are a number of
Along the field line quantites that are generated by DIVIMP
that could profitably be displayed using this type of plot. (The impurity
density along the field lines as a function of charge state is one example
that comes to mind.) However, development of these alternate plot options
has been left for a future date, the existing code may be used as a basis
for addig these plot types if they prove to be needed.

There are seven different plots in this series. Each plot displays the
same basic information - the values of Dperp and Xperp found by the Dperp
extractor for the background plasma used for this case. Dperp and Xperp
are calulated for each ring in its entirety and for each half of a ring
(Inner and Outer) calculated independently. Each of these diferent numbers
can be displayed. They are plotted as a function of the ring separation at
the outside mid-plane of the reactor (for JET) - inside mid-plane
otherwise. Please note that the INSIDE/OUTSIDE terminology used here is
dependent on the grid used in the case. The following plots are available:

751 One graph containing both Dperp and Xperp(E,I,Total) plotted with a
common axis.

763 Two graphs/page multi-plot containing Dperp and Xperp(T) calculated
for the whole ring.

793 Four graphs/page displaying the whole ring values of the transport
coeffcients against the R-coordinate at the outer mid-plane. Scaling for
Dperp is fixed at [0.0,0.3] and scaling for Xperps is set to [0.0,3.0]

These are a specific set of plots for various quantities that use the
plotting format developed for the 701 to 723 series plots. These plots
diplay the radial variation of a variety of quantities at every knot along
all the rings of the SOL. Each individual graph uses the distance of cell
centre separation, starting with the zero point being the centre of the
cell lying on the separatrix, and proceeding outward radially for constant
knot values, as the horizontal plotting axis. These plots produce graphs
for every knot in the SOL - thus there are usually 40 or more graphs
produced with 8 graphs plotted on each page. The plots can be very
revealing when comparing OSM vs. EDGE2D solutions. In addition, they can
be quite useful for analysing the cross-field gradients that one would
expect would be responsible for the cross-field particle source flows. The
quantities that can be plotted in this manner are Ne, Te, Ti, ÑcfNe,
ÑcfTe, and ÑcfTi.

This sequence of charts presents details describing the sources of particles
in the simulation and the contribution of each of these sources to the core contamination.
This data, presented in the form of a bar chart, is grouped by region and source type
(inner and outer target, main wall, private plasma wall and physically or checmically sputtered) for
the summary plot. The detailed plot lists the source and leakage on an element by element basis looking
at the entire wall.

Plots 811 to 815 look at the erosion and deposition on wall elements as opposed to looking at the
contribution from each segment to core leakage.

Ion power plot, with the PIN ion power term (qi), the ion equipartition term (pei), the cross-field ion source (cfi), and the net ion power (net). Note that pei is only available if the equipartition opion ...=... was used in DIVIMP, and that cfi is only available if ...=... was used. [NOT CERTIFIED]

8

PIN power term plot with the electron Phelpi term (qe Phelpi), the ion charge exchange term (qi CX), the electron recombination power loss term (qe rec), the ion recombination power loss term (qi rec), and the net power (net). [NOT CERTIFIED]

NOTE: This sample file does not contain examples of every possible plot. However,
ones that are not represented here will have a similar format. All plots
may be repeated in the file as many times as desired with different plot
attributes. For convenience, only one sample is shown in most cases.