Skip to content

Variables

To access different variables, imas2xarray must know how to navigate the IMAS specification. The variable lookup table maps variable names, and specifies their dimensions. The lookup file is stored in yaml format, typically with the name variables.yaml. Imas2xarray includes a default variables.yaml, but you can also define your own.

Imas2xarray looks for the variables.yaml file in the following locations, in this order:

  1. Via environment variable $IMAS2XARRAY_VARIABLES
  2. If not defined, look for $XDG_CONFIG_HOME/imas2xarray/variables.yaml
  3. If $XDG_CONFIG_HOME is not defined, look for $HOME/.config/imas2xarray/variables.yaml
  4. If not defined, fall back to the included variables.yaml, which contains a sensible list of defaults.

Squashing data

In the list below, you will find variables prefixed $. This means that these variables are squashed when loaded by imas2xarray to make sure that their dimensions are consistent. For example, grid variables like rho_tor_norm differ slightly between time steps. Therefore we first assign this to a placeholder dimension by prefixing $: $rho_tor_norm. Imas2xarray knows to squash this dimension and make rho_tor_norm consistent for all time steps. It does this by rebasing all data to the grid of the first time step. We call this squashing, because it removes a dimension from the dataset and turns it into a coordinate.

Default variables

The default imas2xarray variables are listed below.

IDS: core_profiles

collisionality

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: collisionality
path: profiles_1d/*/electrons/collisionality_norm
type: IDS-variable

e_par

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: e_par
path: profiles_1d/*/e_field/parallel
type: IDS-variable

e_r

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: e_r
path: profiles_1d/*/e_field/radial
type: IDS-variable

j_ni

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: j_ni
path: profiles_1d/*/j_non_inductive
type: IDS-variable

j_ohm

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: j_ohm
path: profiles_1d/*/j_ohmic
type: IDS-variable

j_tot

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: j_tot
path: profiles_1d/*/j_total
type: IDS-variable

n_e

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: n_e
path: profiles_1d/*/electrons/density_thermal
type: IDS-variable

n_e_tot

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: n_e_tot
path: profiles_1d/*/electrons/density
type: IDS-variable

n_i

dims:
- time
- ion
- $rho_tor_norm
ids: core_profiles
name: n_i
path: profiles_1d/*/ion/*/density_thermal
type: IDS-variable

n_i_tot

dims:
- time
- ion
- $rho_tor_norm
ids: core_profiles
name: n_i_tot
path: profiles_1d/*/ion/*/density
type: IDS-variable

n_n

dims:
- time
- neutral
- $rho_tor_norm
ids: core_profiles
name: n_n
path: profiles_1d/*/neutral/*/density
type: IDS-variable

omega_tor

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: omega_tor
path: profiles_1d/*/rotation_frequency_tor_sonic
type: IDS-variable

p_e

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: p_e
path: profiles_1d/*/electrons/pressure
type: IDS-variable

p_i

dims:
- time
- ion
- $rho_tor_norm
ids: core_profiles
name: p_i
path: profiles_1d/*/ion/*/pressure
type: IDS-variable

q

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: q
path: profiles_1d/*/q
type: IDS-variable

rho_tor_norm

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: rho_tor_norm
path: profiles_1d/*/grid/rho_tor_norm
type: IDS-variable

smag

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: smag
path: profiles_1d/*/magnetic_shear
type: IDS-variable

t_e

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: t_e
path: profiles_1d/*/electrons/temperature
type: IDS-variable

t_i_ave

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: t_i_ave
path: profiles_1d/*/t_i_average
type: IDS-variable

time

dims:
- time
ids: core_profiles
name: time
path: time
type: IDS-variable

zeff

dims:
- time
- $rho_tor_norm
ids: core_profiles
name: zeff
path: profiles_1d/*/zeff
type: IDS-variable

IDS: core_sources

energy_e_src

dims:
- time_src
- $rho_tor_norm_src
ids: core_sources
name: energy_e_src
path: source/0/profiles_1d/*/electrons/energy
type: IDS-variable

energy_i_src

dims:
- time_src
- ion_src
- $rho_tor_norm_src
ids: core_sources
name: energy_i_src
path: source/0/profiles_1d/*/ion/*/energy
type: IDS-variable

energy_i_tot_src

dims:
- time_src
- $rho_tor_norm_src
ids: core_sources
name: energy_i_tot_src
path: source/0/profiles_1d/*/total_ion_energy
type: IDS-variable

j_par_src

dims:
- time_src
- $rho_tor_norm_src
ids: core_sources
name: j_par_src
path: source/0/profiles_1d/*/j_parallel
type: IDS-variable

particles_e_src

dims:
- time_src
- $rho_tor_norm_src
ids: core_sources
name: particles_e_src
path: source/0/profiles_1d/*/electrons/particles
type: IDS-variable

particles_i_src

dims:
- time_src
- ion_src
- $rho_tor_norm_src
ids: core_sources
name: particles_i_src
path: source/0/profiles_1d/*/ion/*/particles
type: IDS-variable

rho_tor_norm_src

dims:
- time_src
- $rho_tor_norm_src
ids: core_sources
name: rho_tor_norm_src
path: source/0/profiles_1d/*/grid/rho_tor_norm
type: IDS-variable

tau_tor_src

dims:
- time_src
- $rho_tor_norm_src
ids: core_sources
name: tau_tor_src
path: source/0/profiles_1d/*/momentum_tor
type: IDS-variable

time_src

dims:
- time_src
ids: core_sources
name: time_src
path: time
type: IDS-variable

IDS: equilibrium

area_surf_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: area_surf_eq
path: time_slice/*/profiles_1d/surface
type: IDS-variable

area_xs_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: area_xs_eq
path: time_slice/*/profiles_1d/area
type: IDS-variable

beta_n_eq

dims:
- time_eq
ids: equilibrium
name: beta_n_eq
path: time_slice/*/global_quantities/beta_normal
type: IDS-variable

beta_p_eq

dims:
- time_eq
ids: equilibrium
name: beta_p_eq
path: time_slice/*/global_quantities/beta_pol
type: IDS-variable

beta_pol_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: beta_pol_eq
path: time_slice/*/profiles_1d/beta_pol
type: IDS-variable

beta_t_eq

dims:
- time_eq
ids: equilibrium
name: beta_t_eq
path: time_slice/*/global_quantities/beta_tor
type: IDS-variable

delta_lower_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: delta_lower_eq
path: time_slice/*/profiles_1d/triangularity_lower
type: IDS-variable

delta_upper_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: delta_upper_eq
path: time_slice/*/profiles_1d/triangularity_upper
type: IDS-variable

f_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: f_eq
path: time_slice/*/profiles_1d/f
type: IDS-variable

ip_eq

dims:
- time_eq
ids: equilibrium
name: ip_eq
path: time_slice/*/global_quantities/ip
type: IDS-variable

j_par_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: j_par_eq
path: time_slice/*/profiles_1d/j_parallel
type: IDS-variable

j_tor_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: j_tor_eq
path: time_slice/*/profiles_1d/j_tor
type: IDS-variable

kappa_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: kappa_eq
path: time_slice/*/profiles_1d/elongation
type: IDS-variable

li3_eq

dims:
- time_eq
ids: equilibrium
name: li3_eq
path: time_slice/*/global_quantities/li_3
type: IDS-variable

p_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: p_eq
path: time_slice/*/profiles_1d/pressure
type: IDS-variable

psi_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: psi_eq
path: time_slice/*/profiles_1d/psi
type: IDS-variable

q_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: q_eq
path: time_slice/*/profiles_1d/q
type: IDS-variable

r_inner_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: r_inner_eq
path: time_slice/*/profiles_1d/r_inboard
type: IDS-variable

r_outer_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: r_outer_eq
path: time_slice/*/profiles_1d/r_outboard
type: IDS-variable

rho_tor_norm_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: rho_tor_norm_eq
path: time_slice/*/profiles_1d/rho_tor_norm
type: IDS-variable

smag_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: smag_eq
path: time_slice/*/profiles_1d/magnetic_shear
type: IDS-variable

time_eq

dims:
- time_eq
ids: equilibrium
name: time_eq
path: time
type: IDS-variable

volume_eq

dims:
- time_eq
- $rho_tor_norm_eq
ids: equilibrium
name: volume_eq
path: time_slice/*/profiles_1d/volume
type: IDS-variable

wmhd_eq

dims:
- time_eq
ids: equilibrium
name: wmhd_eq
path: time_slice/*/global_quantities/energy_mhd
type: IDS-variable