...
Only a part of input quantities is now processed. ?????????The storage of velocities will become possible after IMAS 3.38 is implemented.
Structure of EIRENE input files
...
READ (IFILE,'(A72)') TL Text_header1
READ (IFILE,'(A72)') TLText_header2
READ (IFILE,'(A72)') T1Text_header3
READ (IFILE,'(A24)') T2Text_header4
READ (IFILE,'(A24)') T3Text_header5
READ (IFILE,'(A72)') TLText_header6
READ (IFILE,'(A72)') TLText_header7
READ (IFILE,*) NR,NP,NT,NB,NTT
DO IRAD=1,NTT,5
READ (IFILE,*) (PROF(IR),IR=IRAD,IRAD+4)
END DO
Here NR=NTRI+1, NTRI is the number of grid triangles, NP=1, NT=1, NB=1, NTT = total number of cells including the additional cells outside of the triangle grid, see below. The extra The additional array element No. with the index NR usually contains the average over all cells.
??????????
Module eirene_data_io
This module provides tools for dealing with files containing EIRENE input data.
Data types provided
type eirene_data
real(ids_real), allocatable :: main_part(:)
real(ids_real) :: average
real(ids_real), allocatable :: extra_data(:) ! To be implemented yet
logical :: extra_data_present ! Shows if extra_data is filled
end type eirene_data
This type is intended for storage ?????????????????
Methods provided
The module contains the following routines:
...
Further extra elements with indices NR+1, ..., NTT correspond to extra cells outside the implemented triangular mesh (i.e., cells in pump ducts). These elements are not processed now.
The text headers are comments describing the file content, system units etc. It is agreed with the EIRENE team that (a) when reading a data file, the wrapper will consider all lines starting with '*' or '!' as a header line and will not store in IMAS the header texts; (b) when writing a fata file, the wrapper will generate new reasonable headers anew. The headers are not implemented yet.
Module eirene_data_io
This module provides tools for dealing with files containing EIRENE input data (see the file format in Section 6.1).
Data types provided
type eirene_data
real(ids_real), allocatable :: main_part(:)
real(ids_real) :: average
real(ids_real), allocatable :: extra_data(:) ! To be implemented yet
logical :: extra_data_present ! Shows if extra_data is filled
end type eirene_data
This structure item 'main_part' is intended for storage of array elements 1, ..., NTRI, which correspond to grid triangles (see Section 6.1). The item 'average' is to contain average (element NTRI+1). The item 'extra_data' is intended for storing the extra elements NTRI+2, ..., NTT if they are available, with the item 'extra_data_present' showing if the extra elements are present.
Methods provided
The module contains the following routines:
- deallocate_data_set
Dallocate the components of a type(eirene_data) variable. - read_quantity_from_file
Read an EIRENE input file holding a distribution of a physical quantity. - write_quantity_to_file
Write an EIRENE input file holding a distribution of a physical quantity.
subroutine deallocate_data_set (quantity)
Arrange a special subset for storing 2d averages. The subset gets the name 'average'.
Argument | Type | Intent | Description |
---|---|---|---|
quantity | type(eirene_data) | inout | Structure to be deallocated |
subroutine read_quantity_from_file (file_name, quantity, report, io_unit)
Arrange a special subset for storing 2d averages. The subset gets the name 'average'.
Argument | Type | Intent | Description |
---|---|---|---|
file_name | character(len=*) | in | File name |
quantity | type(eirene_data) | out | Structure to be filled with data from the file |
report | logical, optional (=false) | in | Turns on info about each step |
io_unit | integer, optional (=69) | in | I/O unit to be used |
subroutine write_quantity_to_file (file_name, quantity, report, io_unit)
Arrange a special subset for storing 2d averages. The subset gets the name 'average'.
Argument | Type | Intent | Description |
---|---|---|---|
file_name | character(len=*) | in | File name |
quantity | type(eirene_data) | in | Structure holding data to be saved |
report | logical, optional (=false) | in | Turns on info about each step |
io_unit | integer, optional (=69) | in | I/O unit to be used |
...
Module imas_data_io
The module contains???
...
Things to be done
- 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 while)
...