Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1.  Introduction
  2. DYON output
    1. Files provided
    2. Running the scripts
    3. The main files
    4. IDS core_profiles
    5. IDS core_sources
    6. IDS equilibrium
    7. IDS gas_injection
    8. IDS magnetics
    9. IDS radiation
    10. IDS wall
    11. Service functions
  3. DYON input

Introduction

This page contains a description of MATLAB scripts supporting the storage of DYON input and output data files in IMAS. 

...

Now the output data are placed into 5 7 IMAS IDS's (Interface Data Structures - sections of the IMAS DD describing tokamak subsystems or tokamak physics chapters): core_profiles, core_sources, equilibrium, gas_injection, magnetics, radiation, and magneticswall. The allocation of the data in the IDS's and the functions supporting it are described below.

...

File name Content
put_to_IMAS.mFunction saving IMAS output data to IMAS
get_from_IMAS.mFunction reading IMAS output data from IMAS
test_put_to_IMAS.mSample script invoking the function put_to_IMAS
test_get_from_IMAS.mSample script that invokes the function get_from_IMAS and compares the recovered data with the initial ones
put_core_profiles.mFunction saving data to the core_profiles IDS
put_core_sources.mFunction saving data to the core_sources IDS
put_equilibrium.mFunction saving data to the equilibrium IDS
put_gas_injection.mFunction saving data to the gas_injection IDS
put_magnetics.mFunction saving data to the magnetics IDS
put_radiation.mFunction saving data to the radiation IDS
put_wall.mFunction saving data to the wall IDS
get_core_profiles.mFunction recovering the saved data from the core_profiles IDS
get_core_sources.mFunction recovering the saved data from the core_sources IDS
get_equilibrium.mFunction recovering the saved data from the equilibrium IDS
get_gas_injection.mFunction recovering the saved data from the gas_injection IDS
get_magnetics.mFunction recovering the saved data from the magnetics IDS
get_radiation.mFunction recovering the saved data from the radiation IDS
get_wall.mFunction recovering the saved data from the wall IDS
arrange_ion_densities.m
arrange_neutral_density.m
arrange_radiation.m


Running the scripts

To launch the test scripts, do the following:

1. Enter:

module load imasenv/<IMASversion> 

Here <IMASversion> is 3.37.0 or higher.

2. The scripts in its present form use the IMAS database 'step'. If you are planning to use it and this database is non-existent, enter the following command to create the database:
imasdb step

You can replace 'step' with another IMAS database name, but do not forget to create it and change the variable 'machine' in test_put_to_IMAS.m and test_get_from_IMAS.m.

3. Enter either 
     matlab
  or
     matlab -nodesktop -nosplash

In the nodesktop mode, MATLAB should work faster (I did not notice big difference). Using the nodesktop mode, do not forget to run quit() to end the session (otherwise, a dangling MATLAB session may remain).

4. To save data from the available DYON output MAT-file, run test_put_to_IMAS.m

...

(you can change shot, run, IDS comments etc. by changing the parameters in this script).

5. Type 'viz' (on a console with imasenv loaded) to see the content of the IMAS database.

6. To get the DYON output data back, run test_get_from_IMAS.m. 

The main files

IDS  IDS core_profiles

 IDS IDS core_sources

 IDS IDS equilibrium

 IDS IDS gas_injection

...

IDS magnetics

IDS radiation

IDS wall

Service functions

 DYON input

Description of the script saving the DYON input (to be done).