PHOENIX Utilities

This page contains instructions to download and use stand-alone utilities for the PHOENIX code. These utilities are presently located in the filespace /u/sabbagh/public/plasma/phoenix/utilities on the PPPL UNIX cluster.



EFIT Utilities

  • Reconstruction of EFIT EQDSK files
  • Mapping a flux function to major radius

    1. Reconstruction of EFIT EQDSK files

    2. 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:

      1. DOWNLOAD the utility:
      2. 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 .

      3. UNPACK the archive:
      4. Use the tar command to unpack the archive:

        tar -xf writekagfromdb.tar

      5. EXAMINE the files:
      6. 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.

      7. SETUP the control files:
      8. The following variables are used to control the utility:

      9. RUN the utility and examine results:
      10. 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.


    3. Mapping a flux function to major radius

    4. 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:

      1. DOWNLOAD the files:
      2. 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 .

      3. EXAMINE and USE the files:
      4. 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.