ADAS Subroutine e6data
SUBROUTINE E6DATA( IUNIT , NDLEV , NDTEM , NDTRN , & ELEM , IZ , IZ0 , IZ1 , & IL , & IA , CSTRGA , ISA , ILA , XJA , & NV , & TEA , DENSA , PRESA , RNHNE , TMA , & ITRAN , & I1A , I2A , APWL , SWL , GFT , & LVALID , INDX & ) C----------------------------------------------------------------------- C C ****************** FORTRAN77 SUBROUTINE: E6DATA ********************* C C PURPOSE: TO FETCH DATA FROM INPUT GFT DATA SET OF TYPE ADF20. C C CALLING PROGRAM: ADAS506 C C THE UNITS USED IN THE DATA FILE ARE TAKEN AS FOLLOWS: C C ELECTRON TEMPERATURE: KELVIN C ELECTRON DENSITY : CM-3 C ELECTRON PRESSURE : K CM-3 C TIME : NOT SPECIFIED C WAVELENGTH : ANGSTROM C GFT COEFFT. : CM3 SEC-1 C C C SUBROUTINE: C C INPUT : (I*4) IUNIT = UNIT TO WHICH INPUT FILE IS ALLOCATED C INPUT : (I*4) NDLEV = MAXIMUM NUMBER OF LEVELS THAT CAN BE READ C INPUT : (I*4) NDTEM = MAXIMUM NUMBER OF TEMPERATURES C INPUT : (I*4) NDTRN = MAX. NUMBER OF TRANSITIONS THAT CAN BE READ C C OUTPUT: (C*2) ELEM = ELEMENT SYMBOL. C OUTPUT: (I*4) IZ = RECOMBINED ION CHARGE READ C OUTPUT: (I*4) IZ0 = NUCLEAR CHARGE READ C OUTPUT: (I*4) IZ1 = RECOMBINING ION CHARGE READ C (NOTE: IZ1 SHOULD EQUAL IZ+1) C C OUTPUT: (I*4) IL = INPUT DATA FILE: NUMBER OF ENERGY LEVELS C C OUTPUT: (I*4) IA() = ENERGY LEVEL INDEX NUMBER C OUTPUT: (C*18) CSTRGA()= NOMENCLATURE/CONFIGURATION FOR LEVEL 'IA()' C OUTPUT: (I*4) ISA() = MULTIPLICITY FOR LEVEL 'IA()' C NOTE: (ISA-1)/2 = QUANTUM NUMBER (S) C OUTPUT: (I*4) ILA() = QUANTUM NUMBER (L) FOR LEVEL 'IA()' C OUTPUT: (R*8) XJA() = QUANTUM NUMBER (J-VALUE) FOR LEVEL 'IA()' C NOTE: (2*XJA)+1 = STATISTICAL WEIGHT C C OUTPUT: (I*4) NV = INPUT DATA FILE: NUMBER OF TEMP/DENS/PRESS/ C TIME SETS C OUTPUT: (R*8) TEA() = INPUT DATA FILE: ELECTRON TEMPERATURES (K) C OUTPUT: (R*8) DENSA() = INPUT DATA FILE: ELECTRON DENSITIES (CM-3) C OUTPUT: (R*8) PRESA() = INPUT DATA FILE: ELECTRON PRESSURES (K CM-3) C OUTPUT: (R*8) TMA() = INPUT DATA FILE: TIMES OR ARBITRARY (S ?) C C OUTPUT: (I*4) ITRAN = INPUT DATA FILE: NUMBER OF TRANSITIONS C C OUTPUT: (I*4) I1A() = TRANSITION: C LOWER ENERGY LEVEL INDEX C OUTPUT: (I*4) I2A() = TRANSITION: C UPPER ENERGY LEVEL INDEX C OUTPUT: (R*8) APWL() = APPROXIMATE TRANSITION WAVELENGTH (A) C OUTPUT: (R*8) SWL() = EXACT TRANSITION WAVELENGTH (A) (IF SET) C OUTPUT: (R*8) GFT(,) = GFT COEFFICIENT FOR TRANSITION (CM3 S-1) C 1ST DIMENSION - TEMPERATURE 'TEA()' C 2ND DIMENSION - TRANSITION INDEX C OUTPUT: (L*4) LVALID = .TRUE. DATA SET READ AND APPEARS VALID C = .FALSE. ERROR DETECTED IN READING DATA SET C# C# OUTPUT: (I*4) INDX() = TRANSITION INDEX (USED IN DEM CODES) C C C (I*4) I4UNIT = FUNCTION (SEE ROUTINE SECTION BELOW) C (I*4) I4FCTN = FUNCTION (SEE ROUTINE SECTION BELOW) C (I*4) I4EIZ0 = FUNCTION (SEE ROUTINE SECTION BELOW) C (I*4) I = GENERAL USE. C (I*4) IABT = RETURN CODE FROM 'I4FCTN' C (I*4) J = GENERAL USE. C (I*4) K = GENERAL USE. C (I*4) NVAL = GENERAL USE C (I*4) IRECL = RECORD LENGTH OF INPUT DATASET (<=128) C C C (C*1) CSLASH = '/' - DELIMITER FOR 'XXHKEY' C (C*4) C4 = GENERAL USE FOUR BYTE CHARACTER C (C*5) IONNAM = EMITTING ION READ FROM DATA SET C (C*7) CKEY1 = 'NLEVELS' - INPUT HEADER KEY C (C*6) CKEY2 = 'NKNOTS' - INPUT HEADER KEY C (C*6) CKEY3 = 'NLINES' - INPUT HEADER KEY C (C*3) TITLED = ELEMENT SYMBOL INCLUDING '+' C (C*80) CLINE = CURRENT ENERGY LEVEL INDEX PARAMETER LINE C (C*127)BUFFER = GENERAL STRING BUFFER STORAGE C C C ROUTINES: C ROUTINE SOURCE BRIEF DESCRIPTION C ------------------------------------------------------------- C XXWORD ADAS EXTRACT POSITION OF NUMBER IN BUFFER C I4UNIT ADAS FETCH UNIT NUMBER FOR OUTPUT OF MESSAGES C R8FCTN ADAS CONVERTS FROM CHARACTER TO REAL VARIABLE C I4FCTN ADAS CONVERTS CHARACTER STRING TO INTEGER C I4EIZ0 ADAS RETURNS Z0 FOR GIVEN ELEMENT SYMBOL C C C ROUTINES: NONE C C AUTHOR: H. P. SUMMERS, JET C K1/1/57 C JET EXT. 4941 C C DATE: 07/04/94 C C UPDATE: APR18-95 C# A. C. LANZAFAME, DPAP UNIVERSITY OF STRATHCLYDE C# TRANSITION INDEX (INDX) ADDED. USED IN DEM CODES C# TO IDENTIFY THE TRANSITION C# C# CHARACTER CSTRGA(NDLEV)*(*) changed to CHARACTER*18 CSTRGA(NDLEV) C# after experinced unstable behaviour on Sun workstation C C UPDATE: C VERSION: 1.2 DATE: 09-11-95 C MODIFIED: Alessandro Lanzafame C - Commented out superfluous variables C C C VERSION: 1.3 DATE: 06-06-2003 C MODIFIED: Martin O'Mullane C - Warn user that the routine is now deprecated C and that xxdata_20 should be used instead. C C----------------------------------------------------------------------- C----------------------------------------------------------------------- CHARACTER*18 CSTRGA(NDLEV) CHARACTER*2 ELEM INTEGER I1A(NDTRN), I2A(NDTRN), IA(NDLEV), IL INTEGER ILA(NDLEV), INDX(NDTRN), ISA(NDLEV), ITRAN INTEGER IUNIT, IZ, IZ0, IZ1 INTEGER NDLEV, NDTEM, NDTRN, NV LOGICAL LVALID REAL*8 APWL(NDTRN), DENSA(NDTEM) REAL*8 GFT(NDTEM,NDTRN), PRESA(NDTEM) REAL*8 RNHNE(NDTEM), SWL(NDTRN) REAL*8 TEA(NDTEM), TMA(NDTEM), XJA(NDLEV)