Skip to content

Variables

Click here for more information on the variables handling in duqtools.

Definition

Variable for describing variables specific to Jetto, The lookup table can be defined as a JettoVar under the lookup key.

type
Discriminator for the variable type.
name
Name of the variable. Used for the lookup table to find actual fields.
lookup
Description of the fields that have to be updated for a Jetto Variable

The lookup field is defined by a so-called Jetto Variable, which maps to one or more locations in the jetto system configs (e.g., jetto.jset, or jetti.in).

These describe the jetto variables.

doc
Docstring for the variable.
name
Name of the variable.
type
Type of the variable (str, int, float)
dimension
keys
Jetto keys to update when this jetto variable is requested

The exact fields to write to are defined under the keys section, which takes the file to write to, the section (if applicable) and field the variable is mapped to.

Example:

duqtools.yaml
extra_variables:
- name: major_radius
  type: jetto-variable
  lookup:
    name: major_radius
    doc: Reference major radius (R0)
    type: float
    keys:
    - field: EquilEscoRefPanel.refMajorRadius
      file: jetto.jset
    - field: RMJ
      file: jetto.in
      section: NLIST1

Default variables

jetto-variables

b_field

lookup:
  dimension: null
  doc: B-field (B0)
  keys:
  - field: EquilEscoRefPanel.BField.ConstValue
    file: jetto.jset
  name: b_field
  type: float
name: b_field
type: jetto-variable

major_radius

lookup:
  dimension: null
  doc: Reference major radius (R0)
  keys:
  - field: EquilEscoRefPanel.refMajorRadius
    file: jetto.jset
  - field: RMJ
    file: jetto.in
    section: NLIST1
  name: major_radius
  type: float
name: major_radius
type: jetto-variable

t_end

lookup: null
name: t_end
type: jetto-variable

t_start

lookup: null
name: t_start
type: jetto-variable

IDS2jetto-variables

ids-b_field

default: null
name: ids-b_field
paths:
- ids: equilibrium
  path: vacuum_toroidal_field/b0/0
- ids: equilibrium
  path: time_slice/0/global_quantities/magnetic_axis/b_field_tor
type: IDS2jetto-variable

ids-major_radius

default: null
name: ids-major_radius
paths:
- ids: equilibrium
  path: vacuum_toroidal_field/r0
- ids: equilibrium
  path: time_slice/0/global_quantities/magnetic_axis/r
type: IDS2jetto-variable

ids-t_start

default: null
name: ids-t_start
paths:
- ids: equilibrium
  path: time/0
- ids: core_profiles
  path: time/0
type: IDS2jetto-variable