SUMMARY:
NSTX EFIT running under the present version of PHOENIX uses standard K EQDSK files for input, and G and A EQDSK files for output. NSTX has enough EFIT reconstructions now (I stopped counting at 0.5 million EFITs generated) to require that most of these files be purged from local disk space. At present, reconstructions are held on local shared UNIX cluster disk space only for shots taken in the past two months.
Many people have use for these files. For example, the input EQDSK files are used for MFIT analysis of CHI plasmas, while the output eqdsks are used for any plasma physics analysis involving the plasma equilibrium.
To serve this need, a stand-alone utility has been written that will reconstruct an entire shot list of EQDSK files in a user's local space.
Note that this utility is written in the IDL language, and so you must run the utility on a machine that can run IDL.
INSTRUCTIONS:
On the PPPL UNIX cluster, copy the archive file to a directory in your filespace:
cp /u/sabbagh/public/plasma/phoenix/utilities/writekagfromdb/writekagfromdb.tar .
Use the tar command to unpack the archive:
tar -xf writekagfromdb.tar
The following files are contained in the archive:
writekagcontrol.dat: The main control file for the utility.
eshotlist.dat: File containing the list of shots to process.
fbeVars.dat: EFIT tree variable mapping. DON'T alter this file.
writekagfromdb.*: These files make up the executable. DON'T alter them.
The following variables are used to control the utility:
writeKfile: Set to 'y' to write K eqdsk files.
writeAfile: Set to 'y' to write A eqdsk files.
writeGfile: Set to 'y' to write G eqdsk files.
kagFileVerbose: Set to '1' for extra information during A and G file builds.
aFileVersion: '1' corresponds to the standard A EQDSK file format prior to May 1997. '2' corresponds to the standard EQDSK file format since May 1997. The latter contains four array dimensions in the center of the file. Use the version that applies to your code. More detail can be found at the general EFIT web site here.
process1outdir: Directory in which the reconstructed EQDSK files will be stored.
FEshotFile: File name containing a shot list for batch processing.
MDSconnectTo: Connect to this MDS+ server:port.
treeName10: Name of the EFIT tree to read data from.
addTreeSuffix: Appends the EFIT tree name to the end of the storage directory.
A column of shot numbers can be given. The utility will produce the requested K, A, and G EQDSK files for all times for the given shots.
The following command runs the utility:
writekagfromdb.x
The K, A, and G EQDSK files requested to be written are saved in directories labelled as (SHOT_NUMBER)(TRY). Optionally, the suffix "_(EFIT tree name)" is appended based on the value of the control variable addTreeSuffix. Each of these shot directories are saved in the directory specified by the control variable process1outdir.
SUMMARY:
Several EFIT variables are written as functions of normalized poloidal flux. In many instances, it is desirable to have these variables available as functions of major radius.
An IDL code fragment is available to show you how to perform this mapping using a simple mapping function that you can download.
INSTRUCTIONS:
On the PPPL UNIX cluster, copy the following files to a directory in your filespace:
cp /u/sabbagh/public/plasma/phoenix/utilities/varmapping/mapfgx1.pro .
cp /u/sabbagh/public/plasma/phoenix/utilities/varmapping/qvsR_example.pro .
MAPFGX1.pro: This file contains the function of the same name that is called to perform the mapping. Read the comments in this file to understand what it does.
qvsR_example.pro: This file contains a code fragment that you can use as an example of how to use the MAPFGX1 procedure. If you are reading data from the NSTX EFIT MDS+ database, you will have to set up the signals in a form in which the mapping procedure understands. This code fragment will show you an example of this setup.