Versions Compared

Key

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

...

subroutine put_quantity_to_ids (quantity, grid_subset, grid_index, quantity_aos, code_to_imas_unit_ratio)

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 subsets: 'pol3' (subset of all triangles) and 'average' (subset organized to store the averages)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.

Argument

Type

Intent

Description

quantity

type(eirene_data)

inresult

structure holding the obtained quantity to be saved

grid_subsetggd_aos(ids_generic_grid_dynamic_grid_subset), intent(in), 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

...

  • Code parameters
  • Headers of data files
  • Extend the list of input quantities
  • IMASification of EIRENE output
  • Try to adjust the processing of exceptions to GSL practices (if worth whileworthwhile)