pkGetSpecies

Name

pkGetSpecies -- Gets the values of chemical species properties

Description

The subroutine pkGetSpecies returns the value of a given property for one species or the values of that property for a sequence of species.

Syntax

pkGetSpecies( Property, Value, SpeciesN[, STAT] )

NameDescriptionData type and attributes
PropertyCase sensitive name of propertyCHARACTER(len=*), INTENT(IN)

{Value | Value(:)}

Values(s) of property

{CHARACTER(20) | INTEGER | REAL(double)}

, INTENT(OUT)
SpeciesN

{Index of Species | starting index of Species}

INTEGER, INTENT(IN)
STATExecution status indicatorINTEGER, OPTIONAL, INTENT(OUT)

Results

The Value argument can be a scalar or an array. In the first case the value of Property of Species(SpeciesN) is the value returned. In the last case the values returned are the Property values from consecutive species from Species(SpeciesN) to Species(SpeciesN+SIZE(Value)-1).

When the properties are of a derived type, the result depends on the intrinsic type of the dummy argument Value and is the derived-type component with the same type as Value.

STAT = 0: no errors; STAT = n: error number.

Examples

Example E-9. pkGetSpecies: Reading the names of all species into an array.

  CHARACTER(20), ALLOCATABLE :: SpcName(:)                                (1)
  ...
  ALLOCATE( SpcName(NSpecies) )
  ...
  CALL pkGetSpecies( 'name', SpcName, 1 )                                 (2)
(1)
The array SpcName will hold the names of all species
(2)
The names of all species are assigned to the array SpcName following the order used by PLASMAKIN

Example E-10. pkGetSpecies: Example showing how the returned values depend on the data type of the Value argument.

  CHARACTER(20) :: SpcFileName                                            (1)
  INTEGER       :: SpcFileIndex                                           (2)
  ...
  NAMELIST /TransportData/ Vd, D
  ...
  ! Reads transport properties in an external file
  DO i = NnC+1, NnC+NnTV
    CALL pkGetSpecies( 'data_file', SpcFileName, i )                      (3)
    CALL pkGetSpecies( 'data_file', SpcFileIndex, i )                     (4)
    OPEN( IOUnit, SpcFileName, ACTION='READ' )
    DO j = 1, SpcFileIndex      ! Reads file until finding the correct index
      READ( IOUnit, NML=TransportData, IOSTAT )
    END DO
    CLOSE( IOUnit )
END DO
(1)
The variable SpcFileName will hold the name of the external file listing the transport parameters for the inquired Species.
(2)
The variable SpcFileIndex indexes the transport data for each Species in the external file.
(3)
In this case the value returned is a character string.
(4)
In this case the value returned is an integer.