ualconnector - visualizing CPOs in VisIt

ualconnector is a tool that allows the visualization of grids and data stored in CPOs using the general grid description with VisIt (https://wci.llnl.gov/codes/visit/).

Basic usage cycle of ualconnector:

  • Launch ualconnector, specifying one or more CPOs on the command line
  • After initializing, ualconnector will launch a VisIt instance
  • Use VisIt to visualize the data from the CPOs
  • ualconnector is running in the background and can be controlled via text commands
  • When done, stop ualconnector (‘quit’) and close VisIt

Warning: ualconnector is currently not very polished. On invalid input it typically crashes, and some plots with large grids might take a while to come up. Nevertheless, enjoy.

Launching ualconnector

A public version is currently available at

/afs/efda-itm.eu/imp3/user/klingshi/bin/itm-grid/ualconnector

or, shorter

~klingshi/bin/itm-grid/ualconnector

You can also check out your own version of the Grid Service Library, which includes ualconnector. Details are at https://www.efda-itm.eu/ITM/html/imp3_gridservicelibrary.html

Command line options

Selecting CPOs

CPOs are added by specifying pairs of -s and -c options.

  • -s, –shot shotnum/runnum/time - add cpo from shot with given shot and run number at timeslice time (CLOSEST_SAMPLE time interpolation is used). For non-time dependent CPOs omit the time.
  • -c, –cpo cponame - from shot selected with -s, add cpo with the given name. Note: with 4.09a, the only CPO that supports the general grid description is ‘edge’.

Environment

By default, ualconnector uses the default user, tokamak name and data version currently set in the environment variables. This can be changed using the following options

  • -u, –user - user name (c.f. environment variable USER)
  • -t, –tokamak - tokamak name (c.f. environment variable TOKAMAKNAME)
  • -v, –version - UAL data version (c.f. environment variable DATAVERSION)
  • –hdf5 - access the HDF5 UAL backend. If this option is given, the u/t/v options have no effect

Commands

When started, ualconnector presents a command prompt (command>). If you can’t see it because the terminal is cluttered with messages, hit return a couple of times.

The following commands are available:

  • quit - quit ualconnector. Note that this will not terminate the associated VisIt session.
  • reload - reload all CPOs from the database to get the latest data. Also triggers an update of all plots in VisIt.
  • list - print a list of all CPOs with available geometry and coordinate transformations.
  • geometry i j - switch CPO with index i to use its geometry j. The CPO and geometry indices can be read from the output of list. Triggers an update of all plots in VisIt.
  • transform i j - apply coordinate transformation with index j to CPO i. The CPO and geometry indices can be read from the output of list. Triggers an update of all plots in VisIt.

Examples

Grid Service Library examples

Assuming you checked out and set up the Grid Service Library yourself, running the test will have created some example edge CPOs in your private database. To plot the standard example grid #1 described at https://www.efda-itm.eu/ITM/html/imp3_gridexamples.html do

ualconnector -s 9001,1,0.0 -c edge

Edge plasma examples

To get output created by SOLPS5.0, do

ualconnector -s 17151,899,1000.0 -c edge -u klingshi -t aug -v 4.09a

Core plasma examples

To get output created by ETS and converted to an edge CPO, do

ualconnector -s 17151,898,1000.0 -c edge -u klingshi -t aug -v 4.09a

The grid in this example contains two geometries: the primary geometry in R/Z and one alternate geometry in psi/theta. To switch to psi/theta do

geometry 0 1

To switch back to R/Z do

geometry 0 0

Core/Edge simulation + wall geometry data

Run

ualconnector -s 17151,898,1000.0 -c edge -s 17151,899,1000.0 -c edge -s 2,1,0.0 -c edge -u klingshi -t aug -v 4.09a

CPO 17151/899 contains the results of the SOLPS5.0 edge simulation, 17151/898 contains the results of the coupled ETS core simulation written to the edge CPO. Shot 2/1 contains the wall geometry in R/phi/Z, you will have to transform it to X/Y/Z using the command

transform 2 1