ADAS Subroutine b1spln
SUBROUTINE B1SPLN( LOSEL , & NV , MAXT , NPSPL , & SCEF , TOA , TOSA , & GAMMA , GAMOA , GAMOSA , & LTRNG & ) C----------------------------------------------------------------------- C C ****************** FORTRAN77 SUBROUTINE: B1SPLN ********************* C C (IDENTICAL TO: C1SPLN (EXCEPT SOME VARIABLE NAMES ARE CHANGED)) C C PURPOSE: C 1) PERFORMS CUBIC SPLINE ON LOG(TEMPERATURE) VERSUS LOG(GAMMA) C INPUT DATA. ('SCEF' VERSUS 'GAMMA' , NV DATA PAIRS) C C 2) INTERPOLATES 'MAXT' GAMMA VALUES USING ABOVE SPLINES AT C TEMPERATURES READ IN FROM ISPF PANELS FOR TABULAR OUTPUT. C (ANY TEMPERATURE VALUES WHICH REQUIRED EXTRAPOLATION TO C TAKE PLACE ARE SET TO ZERO). C - THIS STEP ONLY TAKES PLACE IF 'LOSEL=.TRUE.' - C C 3) INTERPOLATES 'NPSPL' GAMMA VALUES USING ABOVE SPLINES AT C TEMPERATURES EQUI-DISTANCE ON RANGE OF LOG(TEMPERATURES) C STORED IN INPUT 'SCEF' ARRAY. C C CALLING PROGRAM: ADAS201 C C C SUBROUTINE: C C INPUT : (L*4) LOSEL = .TRUE. => CALCULATE GAMMAS FOR INPUT TEMPS. C READ FROM ISPF PANEL. C .FALSE. => - DO NOT DO THE ABOVE - C C INPUT : (I*4) NV = INPUT DATA FILE: NUMBER OF GAMMA/TEMPERATURE C PAIRS READ FOR THE TRANSITION BEING ASSESSED C INPUT : (I*4) MAXT = NUMBER OF ISPF ENTERED TEMPERATURE VALUES AT C WHICH INTERPOLATED GAMMA VALUES ARE REQUIRED C FOR TABULAR OUTPUT. C INPUT : (I*4) NPSPL = NUMBER OF SPLINE INTERPOLATED GAMMA/TEMP. C REQUIRED FOR GRAPHICAL DISPLAY. C C INPUT : (I*4) SCEF() = INPUT DATA FILE: TEMPERATURES (KELVIN) C INPUT : (I*4) TOA() = ISPF PANEL ENTERED TEMPERATURES (KELVIN) C OUTPUT: (I*4) TOSA() = 'NPSPL' TEMPERATURES FOR GRAPHICAL OUTPUT C (KELVIN). C C INPUT : (R*8) GAMMA() = INPUT DATA FILE: SELECTED TRANSITION - C GAMMA VALUES AT 'SCEF()'. C OUTPUT: (I*4) GAMOA() = SPLINE INTERPOLATED GAMMA VALUES AT 'TOA()' C (EXTRAPOLATED VALUES = 0.0). C OUTPUT: (R*8) GAMOSA()= SPLINE INTERPOLATED GAMMA VALUES AT 'TOSA()' C C OUTPUT: (L*4) LTRNG() = .TRUE. => OUTPUT SPLINE VALUE WAS C INTERPOLATED FOR 'DLOG(TOA()'. C .FALSE. => OUTPUT SPLINE VALUE WAS C EXTRAPOLATED FOR 'DLOG(TOA()'. C (NOTE: 'YOUT()=0' AS 'IOPT < 0'). C C (I*4) NIN = PARAMETER = MAX. NO. OF INPUT TEMP/GAMMA C PAIRS MUST BE >= 'NV' C (I*4) NOUT = PARAMETER = MAX. NO. OF 'OUTPUT TEMP/GAMMA C PAIRS MUST BE >= 'MAXT' & 'NPSPL' C C (I*4) IARR = ARRAY SUBSCRIPT USED FOR TEMP/GAMMA 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 (R*8) TSTEP = THE SIZE OF STEP BETWEEN 'XOUT()' VALUES FOR C GRAPHICAL OUTPUT TEMP/GAMMA PAIRS TO BE C CALCULATED USING SPLINES. 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) XIN() = LOG( 'SCEF()' ) C (R*8) YIN() = LOG( 'GAMMA()' ) C (R*8) XOUT() = LOG(TEMPERATURES AT WHICH SPLINES REQUIRED) C (R*8) YOUT() = LOG(OUTPUT SPLINE INTERPOLATED GAMMA VALUES) C (R*8) DF() = SPLINE INTERPOLATED DERIVATIVES C C (L*4) LDUMP() = .TRUE. => OUTPUT SPLINE VALUE INTRPOLATED C FOR 'YOUT()'. C .FALSE. => OUTPUT SPLINE VALUE EXTRAPOLATED C FOR 'YOUT()'. C (NOTE: USED AS A DUMMY ARGUMENT. C ALL VALUES WILL BE TRUE.) 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/81 C JET EXT. 4569 C C DATE: 05/02/91 C C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC) C VERSION: 1.2 DATE: 27-09-95 C - INCREASED PARAMETER NIN FROM 8 TO 14 (SAME C CHANGE MADE IN THE JET IBM CODES BY PAUL BRIDEN). C C----------------------------------------------------------------------- C C----------------------------------------------------------------------- INTEGER MAXT, NPSPL, NV LOGICAL LOSEL, LTRNG(MAXT) REAL*8 GAMMA(NV), GAMOA(MAXT), GAMOSA(NPSPL) REAL*8 SCEF(NV), TOA(MAXT), TOSA(NPSPL)