plasma_state(1)

NAME
PLASMA_STATE - programs for plasma representation

  jsocdf2ps
Write a Plasma State file from JSolver eqdsk data

  geq2ps
Load Plasma State from geqdsk file

  ps2geq
Write geqdsk file from Plasma State

  ps2jso
Write eqdska file for JSolver from Plasma State

  ps2xplasma
Create an xplasma file from a Plasma State file

  update_state:
Create a new state.

  ps_nbline_driver:
Example driver program for nbline

DESCRIPTION

A set of programs to write/extract Plasma States from plasma equilibriums and viseversa.

  jsocdf2ps
this program UPDATES a plasma state with MHD equilibrium representation from a Jsolver output file. The JSolver grids are used as given; therefore, the sqrt(tor.flux) grid is unevenly spaced.

SYNOPSIS:
      jsocdf2ps jso-path ps-path [ -new_state...]

ARGUMENTS:

jso-path
    path (including filename) to the Jsolver NetCDF file;

ps-path
    path for the output plasma state file written by this program; a writable path must be provided.

-new_state If -new_state is specified, the following additional argument are required:

-Jccw:<Y|N>
    Y or Yes or T or True to indicate J flows counter-clockwise as viewed from above;

-Bccw:<Y|N>
    Y or Yes or T or True to indicate B_phi points counter-clockwise as viewed from above;

OPTIONS:
       additional optional arguments for labeling/identification: -shot:<shot-number>

-time:<time-in-seconds>

-tok:<tokamak-ID>

  geq2ps
this program creates or modifies a plasma state with MHD equilibrium representation from a file or MDS+ G-eqdsk dataset. This includes a mapping of the g-eqdsk Psi(R,Z) direct representation of the tokamak MHD equilibrium to an "inverse representation" [R,Z](rho,theta), g(rho), q(rho), P(rho).

SYNOPSIS:
    geq2ps geq-path ps-path [ options... ] ARGUMENTS:

geq-path
    file path or an MDS+ path if the argument starts with "MDS+:" it is the latter.
    MDS path examples:
        MDS+:europa.pppl.gov:8501:EFIT01(104370;t=1.0e-1)
        MDS+:cmoda.psfc.mit.edu:EFIT09(123456789;t=2.3)
    generally: MDS+:<server>:<tree>(shot;t=<time-of-interest>)

ps-path
    path for the output plasma state file written by this program; a writable path must be provided.

-nrho:<#-off-rho-surfaces>
    defaults to 51 radial surfaces (counting axis and boundary) equally spaced in rho = normalized sqrt(enclosed toroidal flux) covering [0:1] (minimum of 11 radial grid points enforced).

    Example: "-nrho:101" -- no imbedded blanks, please.

-nth:<#-poloidal-angle-grid-pts>
    defaults to 101 poloidal grid points -- equal arc poloidal angle coordinate is used covering [-pi:pi] (minimum of 41 poloidal grid points enforced).

    Example: "-nth:151" -- no imbedded blanks, please.

-c_ratio:<curvature-ratio>
    dimensionless quantity specifying the "minimum curvature ratio" allowed along the flux surface selected as the boundary of the equilibrium inverse representation. The local curvature ratio is the numerically estimated radius of curvature of the boundary, divided by the plasma midplane half-width. If a boundary surface comes near a separatrix, its curvature ratio near the separatrix has a local minimum-- indeed is zero if the surface passes directly through the separatrix. Setting a limit on how small this minimum value can be, determines what surface inside the separatrix can be used as a boundary surface.

-new_state...
    forces creation of a new state containing ONLY the equilibrium data; if this is not specified, the program will try to read an existing state at <ps-path> and insert the equilibrium into it, while leaving all other data items unchanged.

OPTIONS:
 additional optional arguments for labeling/identification:

-shot:<shot-number>

-time:<time-in-seconds>

-tok:<tokamak-ID>

  ps2jso
reads a plasma state and writes data needed by Jsolver in a format understood by Jsolver, in a file named: eqdska

SYNOPSIS:
     ps2jso ps-path [ options... ]

ARGUMENTS:

ps-path
    path for the input plasma state file

OPTIONS:

-npsi:<#-of-desired-psi-surfaces>
    default = -npsi:91

-nbdy:<#-of-desired-bdy-points>
    default = -nbdy:271

OUTPUT:
    file named "eqdska"

  ps2geq
this program writes a geqdsk file from the data contained in a plasma state. The plasma state must contain an equilibrium description and related data including:
        Psi(R,Z)
        [R,Z](rho,theta)
        P(rho)
        q(rho)
        limiter [R,Z] closed contour
These are all normal elements of the plasma state definition, but, not every plasma state instance has all of them defined. If this program receives a state with required elements missing, it will report an error.

SYNOPSIS:
     ps2geq ps-path geq-path

ARGUMENTS:

ps-path
    path for the input plasma state file

geq-path
    path for the G-eqdsk output file. If geq-path ends in "/", the state variable ps%eqdsk_file sets the name.

  ps2xplasma
this program writes an xplasma NetCDF file from the data contained in a plasma state NetCDF file.

SYNOPSIS:
     ps2xplasma ps-path xplasma-path

ARGUMENTS:

ps-path
    path for the input plasma state file

xplasma-path
    path for the output xplasma netCDF file

  ps_nbline_driver:
demo program for ps_nbline
     (a) setup of a random number generator (rng);
     (b) access to a Plasma State with an NBI machine description plus
         powers, voltages, and energy fractions;
     (c) fetch and print N randomly chosen starting coordinates for
         beam neutrals: (R,phi,Z,v_R,v_phi,v_Z) (m,rad,m,m/s,m/s,m/s)

   command line arguments control the rng seed, the state input file,
   and the number N

SYNOPSIS:
     ps_nbline_driver -ps:<file> -seed:<str> -N:<number>

ARGUMENTS:

-ps:<plasma_state_file>
    name of netCDF file

-seed:<seed_str>
    random number seed in form of a character string

-N:<number>
    sample size. With larger sample sizes, you get closer to the expected energy fraction and co/ctr mixes.

    Example: ps_nbline_driver -ps:tftr_nbline.cdf -seed:abc -n:20

  update_state
this program applies a state update file or list of update files to an existing state, to create a new state.

SYNOPSIS:
      update_state

SEE ALSO
plasma_state(3) trxpl(1)

http://w3.pppl.gov/NTCC/PlasmaState