Versions Compared

Key

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

...

Argument

Type

Intent

Description

idxintegerinindex of the I/O unit attached to the IMAS database
imas_controlstype(imas_control_panel)inparameters of the IMAS database and basic information to be put to IDS
grid_controlstype(grid_control_panel)inparameters controlling the grid saving

edge_profiles_data

type(edge_profiles_data_set)

in

structure that contains holding the names of the input files and accepts the data read from the filesdistributions of physical quantities

eirene_gridtype(triangular_grid)instructure keeping holding the EIRENE triangular grid

...

Get all physical quantities from the edge_profiles IDS, putting them to a type(edge_profiles_data_set) structure. If required, get the triangular grid.

Uses the subroutines: put_quantity_to_ids (module imas_data_io), put_eirene_grid_toget_triangular_grid_from_ids (module triangular_grid_ids_io), putget_ionsquantities_tofrom_edge_profiles (this module).

Argument

Type

Intent

Description

idxintegerinindex of the I/O unit attached to the IMAS database
grid_controlstype(grid_control_panel)inparameters controlling the grid saving/recovering
fetch_gridlogicalinswitches on reading the grid

edge_profiles_data

type(edge_profiles_data_set)

out

the structure holding the data found in the edge_profiles IDS (except for the grid)

eirene_gridtype(triangular_grid)inoutstructure containing the grid; if fetch_input=.true., it is filled with data read from the IDS; otherwise, it remains unchanged.

...

  • deallocate_equilibrium_data
    Deallocate all components of the structure.
  • initiate_equilibrium_data_for_input
    Read the part of the command file that controls saving the EIRENE data to the equilibrium IDS.
  • collect_data_for_equilibrium_input
    Read the EIRENE input data intended for the equilibrium IDS from files,
  • transform_equilibrium_for_ids
    Transform the magnetic field data to the form suitable for the equilibrium IDS.
  • save_input_to_equilibrium
    Put EIRENE input to the equilibrium IDS.
  • fetch_input_from_equilibrium
    Get all physical quantities from the equilibrium IDS.
  • get_quantities_from_equilibrium
    Get all physical quantities from the equilibrium IDS.
  • transform_equilibrium_for_eirene

  • write_input_data_from_equilibrium_ids

...

Argument

Type

Intent

Description

equilibrium_data

type(equilibrium_data_set)

inout

structure that holds all magnetic field data

...


subroutine save_input_to_equilibrium (idx, imas_controls, grid_controls, equilibrium_data, eirene_grid)

Put EIRENE input to the equilibrium IDS. The input consists of (1) a triangular grid; (2) a set of quantities (characteristics of several plasma species) defined on this grid. The first item is provided in 'eirene_grid'; the second one, in 'equilibrium_data'. 

Uses the subroutines: put_quantity_to_ids (module imas_data_io), put_eirene_grid_to_equilibrium (module triangular_grid_ids_io), transform_equilibrium_for_ids (this module).

Argument

Type

Intent

Description

idxintegerinindex of the I/O unit attached to the IMAS database
imas_controlstype(imas_control_panel)inparameters of the IMAS database and basic information to be put to IDS
grid_controlstype(grid_control_panel)inparameters controlling the grid saving

equilibrium_data

type(equilibrium_data_set)

inout

structure holding the distributions of physical quantities

eirene_gridtype(triangular_grid)instructure keeping the EIRENE triangular grid


subroutine fetch_input_from_equilibrium (idx, grid_controls, fetch_grid, equilibrium_data, eirene_grid)

Get all physical quantities from the equilibrium IDS, putting them to a type(equilibrium_data_set) structure. If required, get the triangular grid.

Uses the subroutines: get_triangular_grid_from_equilibrium (module triangular_grid_ids_io), get_quantities_from_equilibrium (this module), transform_equilibrium_for_eirene (this module).

Argument

Type

Intent

Description

idxintegerinindex of the I/O unit attached to the IMAS database
grid_controlstype(grid_control_panel)inparameters controlling the grid saving/recovering
fetch_gridlogicalinswitches on reading the grid

equilibrium_data

type(equilibrium_data_set)

out

the structure holding the data found in the equilibrium IDS (except for the grid)

eirene_gridtype(triangular_grid)inoutstructure containing the grid; if fetch_input=.true., it is filled with data read from the IDS; otherwise, it remains unchanged.


function get_quantities_from_equilibrium (ggd, grid_ggd_aos) result (equilibrium_data)

Get all physical quantities from the equilibrium IDS, putting them to a type(equilibrium_data_set) structure.

Argument

Type

Intent

Description

equilibrium_datatype(equilibrium_data_set)resultthe structure holding the obtained data
ggdtype(ids_equilibrium_ggd)inggd AoS element where the quantities are written
grid_ggd_aostype(ids_generic_grid_dynamic), dimension(:)inAoS containing the GGD grids


subroutine transform_equilibrium_for_eirene (equilibrium_data)

Transform the magnetic field data obtained from the equilibrium IDS into form suitable for EIRENE. On entry, only a part of the 'equilibrium_data' structure is filled. The subroutine fills the rest.

The input files must contain b_x, b_y, b_z (b is the mag. field unit vector), and B_total. The equilibrium IDS accepts B_R, B_Z, B_phi. Here x=R, y=Z (vertical), z=phi (toroidal).

Argument

Type

Intent

Description

equilibrium_data

type(equilibrium_data_set)

inout

structure that holds all magnetic field data


subroutine write_input_data_from_equilibrium_ids (equilibrium_data, equilibrium_files)

Write the data extracted from the edge_profiles IDS to files in the format of EIRENE input tallies.

The names of the generated files are taken from the 'equilibrium_files' structure.

Argument

Type

Intent

Description

equilibrium_datatype(equilibrium_data_set)inthe structure holding the obtained data
equilibrium_filestype(equilibrium_file_set)inthe structure containing the file names


Module global_parameters

??????????????

...