ADAS Subroutine cdsum
SUBROUTINE CDSUM( INUNIT ,INFILE ,TERAY ,ITCOUNT, & INCOUNT ,IECOUNT ,TEREF ,NEREF , & EBREF ,ITREF ,IEREF ,INREF , & ITA ,IEA ,INA ,EBRAY , & NERAY , MAXTE ,MAXEB ,MAXNE ) C----------------------------------------------------------------------- C C ****************** FORTRAN77 SUBROUTINE: CDSUM ********************* C C PURPOSE: TO FETCH A SUMMARY OF THE DATA CONTAINED IN THE C BUNDLE-NL POPULATION STRUCTURE FILES OF TYPE ADF26. C C CALLING ROUTINE : ADAS313 C C INPUT : C C (CHR) INFILE : FILENAME FOR WHICH DATA HAS C TO BE EXTRACTED FROM. C (I*4) INUNIT : FILENAME STREAM. C (I*4) MAXNE : MAXIUM NUMBER OF DENSITIES C (I*4) MAXEB : MAXIMUM NUMBER OF BEAM C ENERGIES. C (I*4) MAXTE : MAXIMUM NUMBER OF TARGET C TEMPERATURES C C OUTPUT : C C (R*8) TERAY() : TARGET TEMPERATURES (eV). C (R*8) NERAY() : ELECTRON DENSITY ( cm-3). C (R*8) EBRAY() : NEUTRAL BEAM ENERGY (eV/amu). C (R*8) TEREF : REFERENCE TEMPERATURE ( eV ). C (R*8) NEREF : REFERENCE DENSITY ( cm-3). C (R*8) EBREF : REFERNCE ENERGY ( eV amu-1 ). C (I*4) INA() : REFERENCE ARRAY FOR DENSITY. C (I*4) IEA() : REFERENCE ARRAY FOR ENERGY. C (I*4) ITA() : REFERENCE ARRAY FOR TEMPERATURE. C (I*4) INREF : ARRAY INDEX OF REFERENCE DENSITY. C (I*4) ITREF : ARRAY INDEX OF REFERENCE TEMP. C (I*4) IEREF : ARRAY INDEX OF REFERENCE ENERGY. C (I*4) INCOUNT : NUMBER OF TARGET DENSITIES. C (I*4) IECOUNT : NUMBER OF BEAM ENERGIES. C (I*4) ITCOUNT : NUMBER OF TEMPERATURES. C C C ADDITIONAL ROUTINES: C C ROUTINE SOURCE BRIEF DESCRIPTION C ------------------------------------------------------------ C CCFIND ADAS312 ISOLATE DATA IN ADF26 TYPE FILE. C CCFILL ADAS312 USED TO ORDER AND SORT ARRAYS. C CCSORT ADAS312 USED TO ORDER AND SORT ARRAYS. C C C C CONTACT : HARVEY ANDERSON C UNIVERSITY OF STRATHCLYDE C ANDERSON@PHYS.STRATH.AC.UK C C DATE : 07/05/98 ( FIRST VERSION ) C C VERSION: 1.1 DATE: 16-03-99 C MODIFIED: RICHARD MARTIN C - PUT UNDER SCCS CONTROL. C C VERSION: 1.2 DATE: 13-10-99 C MODIFIED: Martin O'Mullane C - With certain compilers array dimension variables C must be declared before they are used. Move the C integer declerations before the array definitions. C C----------------------------------------------------------------------- C CHARACTER*80 INFILE INTEGER IEA(MAXNE), IECOUNT, IEREF INTEGER INA(MAXNE), INCOUNT, INREF, INUNIT INTEGER ITA(MAXTE), ITCOUNT, ITREF, MAXEB INTEGER MAXNE, MAXTE REAL*8 EBRAY(MAXEB), EBREF REAL*8 NERAY(MAXNE), NEREF REAL*8 TERAY(MAXTE), TEREF