...
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_subset | type(ids_generic_grid_dynamic_grid_subset), dimension(:) | in | AoS, grid subsets |
grid_index | integer | in | index of the grid used in the grid_ggd AOS (must be put to IDS) |
quantity_aos | type(ids_generic_grid_scalar), dimension(:) | pointer | AoS (IDS slot) where the quantity should be written |
code_to_imas_unit_ratio | real(ids_real) | in | ratio 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_aos | type(ids_generic_grid_aos3_root), intent(in), dimension(:) | in | grid_ggd (AoS holding the description of GGD grids) |
quantity_aos | type(ids_generic_grid_scalar), dimension(:) | in | AoS (IDS slot) whence the quantity should be taken |
code_to_imas_unit_ratio | real(ids_real) | in | ratio 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_aos | type(ids_generic_grid_aos3_root), intent(in), dimension(:) | in | grid_ggd (AoS holding the description of GGD grids) |
quantity_aos | type(ids_generic_grid_scalar), dimension(:) | in | AoS (IDS slot) whence the quantity should be taken |
code_to_imas_unit_ratio | real(ids_real) | in | ratio 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_slot | type(ids_generic_grid_scalar) | out | AoS (IDS slot) whence the quantity should be taken |
code_to_imas_unit_ratio | real(ids_real) | in | ratio of the quantity unit in the code to that in IMAS |
grid_subset | type(ids_generic_grid_dynamic_grid_subset), dimension(:) | in | array of grid subsets |
grid_index | integer | in | index of the grid used in the grid_ggd AOS (must be put to IDS) |
subset_label | character(len=*) | in | identifier 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_slot | type(ids_generic_grid_scalar) | in | AoS (IDS slot) whence the quantity should be taken |
subset_label | character(len=*) | in | identifier name of the required grid subset |
code_to_imas_unit_ratio | real(ids_real) | in | ratio of the quantity unit in the code to that in IMAS |
grid_ggd_aos | type(ids_generic_grid_aos3_root), dimension(:) | in | grid_ggd AOS |
quantity | real(ids_real), dimension(:), allocatable | out | values of the quantity at a grid subset |
grid_index | integer | out | index of the used grid in grid_ggd AOS |
subset_index | integer | out | index 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_slot | type(ids_generic_grid_scalar) | in | AoS (IDS slot) whence the quantity should be taken |
subset_label | character(len=*) | in | identifier name of the required grid subset |
code_to_imas_unit_ratio | real(ids_real) | in | ratio of the quantity unit in the code to that in IMAS |
grid_ggd_aos | type(ids_generic_grid_dynamic), dimension(:) | in | grid_ggd AOS |
quantity | real(ids_real), dimension(:), allocatable | out | values of the quantity at a grid subset |
grid_index | integer | out | index of the used grid in grid_ggd AOS |
subset_index | integer | out | index 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
????????????
...