Search Site | Contact Details | FAQ

ADAS Subroutine ddspln

      SUBROUTINE DDSPLN( NTDIM  , NDTIN  ,
     &                   ITA    , ITVAL  ,
     &                   TFILE  , TEVA   ,
     &                   QDRIN  , QDROUT ,
     &                   LTRNG
     &                 )
C-----------------------------------------------------------------------
C
C  ****************** FORTRAN77 SUBROUTFILEE: DDSPLN *********************
C
C  PURPOSE:
C         1) PERFORMS CUBIC SPLINE ON LOG(TEMPERATURE) VERSUS LOG(QDRIN)
C            INPUT DATA. ('TFILE' VERSUS 'QDRIN' , ITA DATA PAIRS)
C
C         2) INTERPOLATES 'ITVAL'  QDRIN 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
C         3) INTERPOLATES 'ITVAL' QDRIN VALUES USING ABOVE SPLINES AT
C            TEMPERATURES EQUI-DISTANCE ON RANGE OF LOG(TEMPERATURES)
C            STORED IN INPUT 'TFILE' ARRAY.
C
C  CALLING PROGRAM: ADAS413
C
C
C  SUBROUTFILEE:
C
C  INPUT : (I*4)  NTDIM   = MAX. NO. OF TEMPERATURES ALLOWED IN
C                           DATA SET
C  INPUT : (I*4)  NDTIN   = MAX. NO. OF USER TEMPERATURES ALLOWED 
C  INPUT : (I*4)  ITA     = INPUT DATA FILE: NUMBER OF DR/TEMPERATURE
C                           PAIRS READ FOR THE TRANSITION BEING ASSESSED
C  INPUT : (I*4)  ITVAL   = NUMBER OF  SPLINE  INTERPOLATED  QDRIN/TEMP.
C                           REQUIRED FOR GRAPHICAL DISPLAY.
C
C  INPUT : (I*4)  TFILE() = INPUT DATA FILE: TEMPERATURES 
C  INPUT : (I*4)  TEVA()  = ISPF PANEL ENTERED TEMPERATURES 
C
C  INPUT : (R*8)  QDRIN() = INPUT DATA FILE: SELECTED TRANSITION -
C                           QDRIN VALUES AT 'TFILE()'.
C  OUTPUT: (I*4)  QDROUT()= SPLINE INTERPOLATED QDRIN VALUES AT 'TEVA()'
C                           (EXTRAPOLATED VALUES = 0.0).
C
C  OUTPUT: (L*4)  LTRNG() = .TRUE.  => OUTPUT   SPLINE    VALUE    WAS
C                                      INTERPOLATED FOR 'DLOG(TEVA()'.
C                           .FALSE. => OUTPUT   SPLINE    VALUE    WAS
C                                      EXTRAPOLATED FOR 'DLOG(TEVA()'.
C                                      (NOTE: 'YOUT()=0' AS 'IOPT < 0').
C
C          (I*4)  NIN     = PARAMETER = MAX. NO. OF  INPUT  TEMP/QDRIN
C                                      PAIRS MUST BE >= 'ITA'
C          (I*4)  NOUT    = PARAMETER = MAX. NO. OF 'OUTPUT TEMP/QDRIN
C                                      PAIRS MUST BE >= 'ITVAL' & 'ITVAL'
C
C          (I*4)  IARR    = ARRAY SUBSCRIPT USED FOR TEMP/QDRIN PAIRS
C          (I*4)  IOPT    = DEFINES THE BOUNDARY DERIVATIVES FOR THE
C                           SPLINE ROUTFILEE 'XXSPLE', SEE 'XXSPLE'.
C                           (VALID VALUES = <0, 0, 1, 2, 3, 4)
C
C          (L*4)  LSETX   = .TRUE.  => SET UP SPLINE PARAMETERS RELATFILEG
C                                      TO 'XIN' AXIS.
C                           .FALSE. => DO NOT SET UP SPLINE PARAMETERS
C                                      RELATFILEG 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( 'TFILE()' )
C          (R*8)  YIN()   = LOG( 'QDRIN()' )
C          (R*8)  XOUT()  = LOG(TEMPERATURES AT WHICH SPLINES REQUIRED)
C          (R*8)  YOUT()  = LOG(OUTPUT SPLINE INTERPOLATED QDRIN VALUES)
C          (R*8)  DF()    = SPLINE INTERPOLATED DERIVATIVES
C
C
C NOTE:
C
C ROUTFILEES:
C          ROUTFILEE    SOURCE    BRIEF DESCRIPTION
C          ------------------------------------------------------------
C          XXSPLE     ADAS      SPLINE SUBROUTFILEE (EXTENDED DIAGNOSTICS)
C          R8FUN1     ADAS      REAL*8 FUNCTION: ( X -> X )
C
C AUTHOR:  H. P. Summers, University of Strathclyde
C          JA8.08
C          Tel. 0141-553-4196
C
C
C DATE:    30/01/98
C 
C UPDATE:  
C
C VERSION:	1.1						DATE: 11-06-98
C MODIFIED: RICHARD MARTIN
C		- PUT UNDER SCCS CONTROL.
C	
C-----------------------------------------------------------------------
C
C-----------------------------------------------------------------------
      INTEGER             ITA,         ITVAL,       NDTIN,       NTDIM
      LOGICAL             LTRNG(NDTIN)
      REAL*8              QDRIN(NTDIM),             QDROUT(NDTIN)
      REAL*8              TEVA(NDTIN), TFILE(NTDIM)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk