ADAS Subroutine e1spln
SUBROUTINE E1SPLN( NTDIM , NDDIM , & ITA , IDA , ITVAL , & TETA , TEDA , TEVA , DIN , & SXB , SXBA , & LTRNG , LDRNG & ) C----------------------------------------------------------------------- C C ****************** FORTRAN77 SUBROUTINE: E1SPLN ********************* C C PURPOSE: C PERFORMS CUBIC SPLINE ON LOG(TEMPERATURE AND DENSITY) C VERSUS LOG(IONIZATIONS PER PHOTON) C INPUT DATA FOR A GIVEN WAVELENGTH DATA-BLOCK. C C USING TWO-WAY SPLINES IT CALCULATES THE IONIZATIONS/PHOTON C FOR 'ITVAL' PAIRS OF ELECTRON TEMPERATURES AND DENSITIES C FROM THE TWO-DIMENSIONAL TABLE OF TEMPERATURES/DENSITIES READ C IN FROM THE INPUT FILE. IF A VALUE CANNOT BE INTERPOLATED C USING SPLINES IT IS EXTRAPOLATED VIA 'XXSPLE'. C C CALLING PROGRAM: ADAS501/SSXB C C C SUBROUTINE: C C INPUT : (I*4) NTDIM = MAX NUMBER OF ELECTRON TEMPERATURES ALLOWED C INPUT : (I*4) NDDIM = MAX NUMBER OF ELECTRON DENSITIES ALLOWED C C INPUT : (I*4) ITA = INPUT DATA FILE: NUMBER OF ELECTRON TEMPERA- C TURES READ FOR THE DATA-BLOCK BEING ASSESSED C INPUT : (I*4) IDA = INPUT DATA FILE: NUMBER OF ELECTRON DENSIT- C IES READ FOR THE DATA-BLOCK BEING ASSESSED C INPUT : (I*4) ITVAL = NUMBER OF ISPF ENTERED TEMPERATURE/DENSITY C PAIRS FOR WHICH IOINIZATIONS PER PHOTON C ARE REQUIRED FOR TABULAR/GRAPHICAL OUTPUT. C C INPUT : (R*8) TETA() = INPUT DATA FILE: ELECTRON TEMPERATURES (EV) C FOR THE DATA-BLOCK BEING ASSESSED. C DIMENSION: ELECTRON TEMPERATURE INDEX C INPUT : (R*8) TEDA() = INPUT DATA FILE: ELECTRON DENSITIES (CM-3) C FOR THE DATA-BLOCK BEING ASSESSED. C DIMENSION: ELECTRON DENSITY INDEX C INPUT : (R*8) TEVA() = USER ENTERED: ELECTRON TEMPERATURES (EV) C DIMENSION: TEMPERATURE/DENSITY PAIR INDEX C INPUT : (R*8) DIN() = USER ENTERED: ELECTRON DENSITIES (CM-3) C DIMENSION: TEMPERATURE/DENSITY PAIR INDEX C C C INPUT : (R*8) SXB(,) =INPUT DATA FILE: FULL SET OF IONIZATIONS PER C PHOTON VALUES FOR THE DATA-BLOCK BEING C ANALYSED. C 1ST DIMENSION: ELECTRON TEMPERATURE INDEX C 2ND DIMENSION: ELECTRON DENSITY INDEX C OUTPUT: (R*8) SXBA() = SPLINE INTERPOLATED OR EXTRAPOLATED IONIZ- C ATIONS/PHOTON FOR THE USER ENTERED ELECTRON C TEMPERATURE/DENSITY PAIRS. C DIMENSION: TEMPERATURE/DENSITY PAIR INDEX C C OUTPUT: (L*4) LTRNG()= .TRUE. => OUTPUT 'SXBA()' VALUE WAS INTER- C POLATED FOR THE USER ENTERED C ELECTRON TEMPERATURE 'TEVA()'. C .FALSE. => OUTPUT 'SXBA()' VALUE WAS EXTRA- C POLATED FOR THE USER ENTERED C ELECTRON TEMPERATURE 'TEVA()'. C DIMENSION: TEMPERATURE/DENSITY PAIR INDEX C C OUTPUT: (L*4) LDRNG()= .TRUE. => OUTPUT 'SXBA()' VALUE WAS INTER- C POLATED FOR THE USER ENTERED C ELECTRON DENSITY 'DIN()'. C .FALSE. => OUTPUT 'SXBA()' VALUE WAS EXTRA- C POLATED FOR THE USER ENTERED C ELECTRON DENSITY 'DIN()'. C DIMENSION: TEMPERATURE/DENSITY PAIR INDEX C C (I*4) NIN = PARAMETER = MAX. NO. OF INPUT TEMP/DENSITY C VALUES. MUST BE >= 'ITA'&'IDA' C (I*4) NOUT = PARAMETER = MAX. NO. OF OUTPUT TEMP/DENSITY C PAIRS. MUST BE >= 'ITVAL' C (I*4) L1 = PARAMETER = 1 C C (I*4) IED = ARRAY SUBSCRIPT USED INPUT FILE ELECTRON C DENSITIES. C (I*4) IET = ARRAY SUBSCRIPT USED INPUT FILE ELECTRON C TEMPERATURES. C (I*4) IT = ARRAY SUBSCRIPT USED FOR USER ENTERED C TEMPERATURE/DENSITY PAIRS . C (I*4) IOPT = DEFINES THE BOUNDARY DERIVATIVES FOR THE C SPLINE ROUTINE 'XXSPLE', SEE 'XXSPLE'. C (VALID VALUES = <0, 0, 1, 2, 3, 4) C C (L*4) LSETX = .TRUE. => SET UP SPLINE PARAMETERS RELATING C TO 'XIN' AXIS. C .FALSE. => DO NOT SET UP SPLINE PARAMETERS C RELATING TO 'XIN' AXIS. C (I.E. THEY WERE SET IN A PREVIOUS C CALL ) C (VALUE SET TO .FALSE. BY 'XXSPLE') C C (R*8) R8FUN1 = FUNCTION - (SEE ROUTINES SECTION BELOW) C C (R*8) XIN() = 1) LOG( DATA FILE ELECTRON DENSITIES ) C 2) LOG( DATA FILE ELECTRON TEMPERATURES ) C (R*8) YIN() = LOG( DATA FILE IONIZATIONS/PHOTON ) C (R*8) XOUT() = 1) LOG( SCALED USER ENTERED ELECTRON DENS. ) C 2) LOG( SCALED USER ENTERED ELECTRON TEMPS.) C (R*8) YOUT() = LOG( OUTPUT GENERATED IONIZATIONS/PHOTON ) C (R*8) YPASS(,)= LOG( IONIZATIONS/PHOTON) INTERMEDIATE ARRAY C WHICH STORES INTERPOLATED/EXTRAPOLATED C VALUES BETWEEN THE TWO SPLINE SECTIONS. C SECTIONS. C (R*8) DF() = SPLINE INTERPOLATED DERIVATIVES C C C NOTE: C C ROUTINES: C ROUTINE SOURCE BRIEF DESCRIPTION C ------------------------------------------------------------ C XXSPLE ADAS SPLINE SUBROUTINE (EXTENDED DIAGNOSTICS) C R8FUN1 ADAS REAL*8 FUNCTION: ( X -> X ) C C AUTHOR: PAUL E. BRIDEN (TESSELLA SUPPORT SERVICES PLC) C K1/0/37 C JET EXT. 2520 C C DATE: 30/04/91 C C UNIX-IDL PORT: C C VERSION: 1.1 DATE: 02-03-95 C MODIFIED: LALIT JALOTA (TESSELLA SUPPORT SERVICES PLC) C - FIRST VERSION C C VERSION: 1.2 DATE: 03-03-95 C MODIFIED: LALIT JALOTA C - C C VERSION: 1.3 DATE: 15-04-96 C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC) C - INCREASED PARAMETER NIN 20 -> 26 (CURRENT JET C VERSION HAS 35 BUT THIS WOULD CAUSE PROBLEMS WITH C IDL AT MOMENT). C C VERSION: 1.4 DATE: 22-04-96 C MODIFIED: TIM HAMMOND C - INCREASED PARAMETER NIN 26 -> 35 IN LINE WITH JET. C C VERSION: 1.5 DATE: 9-10-97 C MODIFIED: Martin O'Mullane C - INCREASED PARAMETER NOUT 20 -> 35. C C VERSION: 1.6 DATE: 9-09-99 C MODIFIED: RICHARD MARTIN C - INCREASED NOUT 35 -> 100; NIN 30 -> 100 C C----------------------------------------------------------------------- C C----------------------------------------------------------------------- INTEGER IDA, ITA, ITVAL, NDDIM INTEGER NTDIM LOGICAL LDRNG(ITVAL), LTRNG(ITVAL) REAL*8 DIN(ITVAL), SXB(NTDIM,NDDIM) REAL*8 SXBA(ITVAL), TEDA(IDA), TETA(ITA) REAL*8 TEVA(ITVAL)