TYPE DATA_COLUMN CHARACTER(20) :: name ! Name of datafile INTEGER :: index ! Data index (column or block nº) END TYPE
DATA_COLUMN derived type is used in the input file to
address data located in other files. The string represents a file name and the
index identifies the location of the data in that file.
Frequently the index is used to identify a single column or data block. However, if more than one column or data block must be read - as in the case of (x1[, x2, ...], y) values - the calling program is responsible for selecting the correct columns or data blocks based on this index. Usually the values are organized in consecutive columns or data blocks but the user is free to choose how to organize the data. The drawback is that he is also responsible then for reading this data.
In the following example the variable
DATA_COLUMN type and is used to input the filename
'eTransport.txt' and the index value 1. In this
particular case the file holds the electron transport properties (mobility and
diffusion coefficient) as a function of the reduced electrical field.
&CHEM_SPECIES name = 'e', charge = -1, data_file = 'eTransport.txt',1 /