Versions Compared

Key

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

...

Put a quantity to a given IDS slot (sub-AoS of the ggd AoS intended for the storage of a single physical quantity). The AoS is allocated with the size of 2 in order to save values attached to two grid subsets: the subset of all triangles and the subset organized to store the averages. These subsets are found by their identifier names, which are given by the module constants main_subset_label and average_subset_label, respectively.

Argument

Type

Intent

Description

quantity

type(eirene_data)

in

structure holding the quantity to be saved

grid_subsettype(ids_generic_grid_dynamic_grid_subset), dimension(:)inAoS, grid subsets
grid_indexintegerinindex of the grid used in the grid_ggd AOS (must be put to IDS)
quantity_aostype(ids_generic_grid_scalar), dimension(:)pointerAoS (IDS slot) where the quantity should be written
code_to_imas_unit_ratioreal(ids_real)inratio of the quantity unit in the code to that in IMAS


function get_quantity_from_ids (grid_ggd_aos, quantity_aos, code_to_imas_unit_ratio) result (quantity)

Get a quantity from a given IDS slot (sub-AoS of the ggd AoS intended for the storage of a single physical quantity). The subroutine scans the slot, investigating the identifier names of the grid subsets to which the slot array elements are attached (the 'grid_index' and the 'subset_index' components of the element are used to reach this subset). The subroutine obtains the value arrays attached to two grid subsets: the subset of all triangles and the subset organized to store the averages. These subsets are found by their identifier names, which are given by the module constants main_subset_label and average_subset_label, respectively. The obtained arrays are put into the components 'main_data' and 'average' of the function result. Not suitable for the 'equilibrium' IDS (use get_quantity_from_equilibrium for this IDS).

Argument

Type

Intent

Description

quantity

type(eirene_data)

result

structure holding the obtained quantity

grid_ggd_aostype(ids_generic_grid_aos3_root), intent(in), dimension(:)ingrid_ggd (AoS holding the description of GGD grids)
quantity_aostype(ids_generic_grid_scalar), dimension(:)inAoS (IDS slot) whence the quantity should be taken
code_to_imas_unit_ratioreal(ids_real)inratio of the quantity unit in the code to that in IMAS


function get_quantity_from_equilibrium (grid_ggd_aos, quantity_aos, code_to_imas_unit_ratio) result (quantity)

Get a quantity from a given IDS slot (sub-AoS of the ggd AoS intended for the storage of a single physical quantity) of the 'equilibrium' IDS. The subroutine scans the slot, investigating the identifier names of the grid subsets to which the slot array elements are attached (the 'grid_index' and the 'subset_index' components of the element are used to reach this subset). The subroutine obtains the value arrays attached to two grid subsets: the subset of all triangles and the subset organized to store the averages. These subsets are found by their identifier names, which are given by the module constants main_subset_label and average_subset_label, respectively. The obtained arrays are put into the components 'main_data' and 'average' of the function result. Use get_quantity_from_ids for IDS other than 'equilibrium'.

Argument

Type

Intent

Description

quantity

type(eirene_data)

result

structure holding the obtained quantity

grid_ggd_aostype(ids_generic_grid_aos3_root), intent(in), dimension(:)ingrid_ggd (AoS holding the description of GGD grids)
quantity_aostype(ids_generic_grid_scalar), dimension(:)inAoS (IDS slot) whence the quantity should be taken
code_to_imas_unit_ratioreal(ids_real)inratio of the quantity unit in the code to that in IMAS


subroutine put_quantity_for_single_subset (quantity, ids_slot, code_to_imas_unit_ratio, grid_subset, grid_index, subset_label)

Write a quantity given as array to a given IDS slot, attaching it to a grid subset with a given name. The array size must coincide with the size of the grid subset.

Argument

Type

Intent

Description

quantity

type(eirene_data)

result

structure holding the obtained quantity

ids_slottype(ids_generic_grid_scalar)outAoS (IDS slot) whence the quantity should be taken
code_to_imas_unit_ratioreal(ids_real)inratio of the quantity unit in the code to that in IMAS
grid_subsettype(ids_generic_grid_dynamic_grid_subset), dimension(:)inarray of grid subsets
grid_indexintegerinindex of the grid used in the grid_ggd AOS (must be put to IDS)
subset_labelcharacter(len=*)inidentifier name of the grid subset


subroutine get_quantity_for_single_subset (ids_slot, subset_label, code_to_imas_unit_ratio, grid_ggd_aos, quantity, grid_index, subset_index)

Get from a given IDS slot a quantity given as an array attached to the grid subset with a given name (not suitable for the 'equilibrium' IDS).

Argument

Type

Intent

Description

ids_slottype(ids_generic_grid_scalar)inAoS (IDS slot) whence the quantity should be taken
subset_labelcharacter(len=*)inidentifier name of the required grid subset
code_to_imas_unit_ratioreal(ids_real)inratio of the quantity unit in the code to that in IMAS
grid_ggd_aostype(ids_generic_grid_aos3_root), dimension(:)ingrid_ggd AOS
quantityreal(ids_real), dimension(:), allocatableoutvalues of the quantity at a grid subset
grid_indexintegeroutindex of the used grid in grid_ggd AOS
subset_indexintegeroutindex of the grid subset in the 'subset' AoS.


subroutine get_quantity_for_single_subset_in_equilibrium (ids_slot, subset_label, code_to_imas_unit_ratio, grid_ggd_aos, quantity, grid_index, subset_index)

Get from a given IDS slot a quantity given as an array attached to the grid subset with a given name (suitable onlyfor the 'equilibrium' IDS).

Argument

Type

Intent

Description

ids_slottype(ids_generic_grid_scalar)inAoS (IDS slot) whence the quantity should be taken
subset_labelcharacter(len=*)inidentifier name of the required grid subset
code_to_imas_unit_ratioreal(ids_real)inratio of the quantity unit in the code to that in IMAS
grid_ggd_aostype(ids_generic_grid_dynamic), dimension(:)ingrid_ggd AOS
quantityreal(ids_real), dimension(:), allocatableoutvalues of the quantity at a grid subset
grid_indexintegeroutindex of the used grid in grid_ggd AOS
subset_indexintegeroutindex of the grid subset in the 'subset' AoS.

Module edge_profiles_io

The module provides tools for information exchange with the 'edge_profiles' IDS.

Data types provided

type ion_file_set
    character(len=32) :: n, T !, vx, vy, vz ! To be added
end type ion_file_set

This structure holds the collection of names of data files that store characteristics for one ion sort.

type ion_data_set
    type(eirene_data) :: n, T  !, vx, vy, vz ! To be added
end type ion_data_set

This structure holds the collection of data for one ion sort.

type ion_parameters
    character(len=ids_string_length) :: label
    real(ids_real) :: mass, Z_ion, Z_element
    type(ion_file_set) :: files
    type(ion_data_set) :: data
end type ion_parameters

All parameters characterizing an ion sort?????

Module equilibrium_io

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

...