Search Site | Contact Details | FAQ

ADAS Subroutine d9rdnm

C Copyright (c) 1997, Strathclyde University.
      SUBROUTINE D9RDNM( DSNINC , LPART  , IFAIL  ,
     &                   IZ0    , NPART  , IPRTD  , IGRDD , ICLASS ,
     &                   IZ1    , ITMAX  , IDMAX  ,
     &                   ISDIMD , IZDIMD , ITDIMD ,
     &                   ISMAXD , IZMAXD , ITMAXD , IDMAXD , NPARTR,
     &                   DTEV   , DDENS  ,
     &                   DTEVD  , DDENSD , DRCOFD , ZDATA  ,
     &                   DRCOFI
     &                 )
C
C-----------------------------------------------------------------------
C
C  ****************** FORTRAN77 SUBROUTINE: D9RDNM *********************
C
C PURPOSE : TO EXTRACT COLLISIONAL DIELECTRONIC DATA FOR A
C           (TEMPERATURE, DENSITY) GRID FROM
C           EITHER PARTIAL (METASTABLE/PARENT RESOLVED) OR STANDARD
C           (UNRESOLVED) ISONUCLEAR MASTER FILES
C
C NOTE    : THE SOURCE DATA IS CONTAINED AS SEQUENTIAL DATASETS
C           WITH THE FOLLOWING NAMING CONVENTIONS:
C
C                   (1) JETSHP.ACD<YR>#<EL).<CODE>DATA
C                   (2) JETSHP.SCD<YR>#<EL>.<CODE>DATA
C                   (3) JETSHP.CCD<YR>#<EL>.<CODE>DATA
C                   (4) JETSHP.PRB<YR>#<EL>.<FILT>.<CODE>DATA
C                   (5) JETSHP.PRC<YR>#<EL>.<FILT>.<CODE>DATA
C                   (6) JETSHP.QCD<YR>#<EL>.<CODE>DATA
C                   (7) JETSHP.XCD<YR>#<EL>.<CODE>DATA
C                   (8) JETSHP.PLT<YR>#<EL>.<CODE>DATA
C                   (9) JETSHP.PLS<YR>#<EL>.<CODE>DATA
C
C       WHERE, <YR>   = TWO DIGIT YEAR NUMBER
C              <EL>   = ONE OR TWO CHARACTER ELEMENT SYMBOL
C              <CODE> = R       => PARTIAL DATA
C                       U       => PARTIAL DATA
C                       OMITTED => STANDARD DATA
C              <FILT> = SIX CHARACTER POWER FILTER CODE
C
C       AND DATA OF CLASSES 6 AND 7 DO NOT EXIST FOR THE PARTIAL CASE.
C
C
C INPUT  : (C*120) DSNINC   = ISONUCLEAR MASTER FILE NAME - VERIFIED
C                             AND READY FOR DYNAMIC ALLOCATION.
C INPUT  : (L*4)  LPART     = .TRUE.  => PARTIAL (RESOLVED) MASTER DATA
C                            . FALSE. => UNSRESOLVED MASTER DATA
C INPUT  : (I*4)  IZ0       = NUCLEAR CHARGE
C INPUT  : (I*4)  NPART()   = METASTABLE PARTITION.  I.E. NUMBER OF
C                             METASTABLES FROM CHARGE STATE IZ1MIN-1 TO
C                             IZ1MAX ON INPUT
C INPUT  : (I*4)  IPRTD     = REQUIRED PARENT INDEX
C INPUT  : (I*4)  IGRDD     = REQUIRED GROUND INDEX
C INPUT  : (I*4)  ICLASS    = CLASS OF DATA (1 - 9 )
C INPUT  : (I*4)  IZ1       = REQUIRED ION CHARGE + 1
C INPUT  : (I*4)  ITMAX     = NUMBER OF DTEV() VALUES 
C INPUT  : (I*4)  IDMAX     = NUMBER OF DDENS() VALUES
C INPUT  : (I*4)  ISDIMD    = MAXIMUM NUMBER OF (CHARGE, PARENT, GROUND)
C                             BLOCKS IN ISONUCLEAR MASTER FILES
C INPUT  : (I*4)  IZDIMD    = MAXIMUM NUMBER OF CHARGE STATES
C                             IN ISONUCLEAR MASTER FILES
C INPUT  : (I*4)  ITDIMD    = MAXIMUM NUMBER OF TEMP OR DENS VALUES IN
C                             ISONUCLEAR MASTER FILES
C INPUT  : (R*8)  DTEV()    = DLOG10(ELECTRON TEMPERATURES (EV))
C INPUT  : (R*8)  DDENS()   = DLOG10(ELECTRON DENSITIES (CM-3))
C
C OUTPUT : (I*4)  IFAIL     = 0    IF ROUTINE SUCCESSFUL - DATA FOR THE
C                                  REQUESTED YEAR USED.
C                           = 1    IF ROUTINE OPEN STATEMENT FAILED
C                           = 2    IF FILE EXISTS BUT REQUIRED DATA
C                                  BLOCK DOES NOT
C OUTPUT : (I*4)  ISMAXD    = NUMBER OF (CHARGE, PARENT, METASTABLE)
C                             BLOCKS IN SELECTED MASTER FILE
C OUTPUT : (I*4)  IZMAXD    = NUMBER OF ZDATA() VALUES IN SELECTED
C                             MASTER FILE
C OUTPUT : (I*4)  ITMAXD    = NUMBER OF DTEVD() VALUES IN SELECTED
C                             MASTER FILE
C OUTPUT : (I*4)  IDMAXD    = NUMBER OF DDENSD() VALUES IN SELECTED
C                             MASTER FILE
C OUTPUT : (I*4)  NPARTR()  = METASTABLE PARTITION.  I.E. NUMBER OF
C                             METASTABLES FROM CHARGE STATE IZ1MIN-1 TO
C                             IZ1MAX FOUND IN MASTER FILE
C OUTPUT : (R*8)  DTEVD()   = DLOG10(DATA ELECTRON TEMPERATURES (EV))
C                             IN SELECTED MASTER FILE
C OUTPUT : (R*8)  DDENSD()  = DLOG10(DATA ELECTRON DENSITIES (CM-3))
C                             IN SELECTED MASTER FILE
C OUTPUT : (R*8)  DRCOFD(,,)= DLOG10(DATA RATE COEFFICIENTS (CM-3/S))
C                             IN SELECTED MASTER FILE
C                             1ST DIM: (CHARGE,META,GRD) BLOCK INDEX
C                             2ND DIM: TEMPERATURE INDEX
C                             3RD DIM: DENSITY INDEX
C OUTPUT : (R*8)  ZDATA()   = CHARGE + 1 FOR IONS IN SELECTED MASTER
C                             FILE
C                             1ST DIM: (CHARGE,META,GRD) BLOCK INDEX
C OUTPUT : (R*8)  DRCOFI(,) = INTERPOLATION OF DRCOFD(,,) FOR
C                             DTEV() & DDENS()
C
C PROGRAM: (C*80) DSNOLD    = FILE NAME USED IN PREVIOUS CALL
C          (C*80) CLINE     = GENERAL CHARACTER VARIABLE
C          (C*80) CTERM     = TERMINATOR LINE - '-' FILLED VARIABLE
C          (C*4)) CPATRN()  = PATTERN USED TO DETECT DATA CLASS
C          (I*4)  IZ0D      = NUCLEAR CHARGE READ FROM MASTER FILE
C          (I*4)  IZ1MIN    = MINIMUM CHARGE+1 READ FROM MASTER FILE
C          (I*4)  IZ1MAX    = MAXIMUM CHARGE+1 READ FROM MASTER FILE
C          (I*4)  IABT      = ABORT CODE
C          (I*4)  INDSEL    = LOCATION OF (CHARGE,PRNT,GRND)
C                             DATA BLOCK IN FILE
C          (I*4)  IZDAT     = CURRENT DATA BLOCK ION CHARGE +1
C          (I*4)  ISEL      = GENERAL INDEX
C          (I*4)  I         = GENERAL INDEX
C          (I*4)  IT        = GENERAL INDEX
C          (I*4)  ID        = GENERAL INDEX
C          (I*4)  IZCHK     = INDEX TO VERIFY DATA Z1 SET COMPLETE
C          (I*4)  IPRTR()   = PARENT INDICES IN DATA SET
C          (I*4)  IGRDR()   = GROUND INDICES IN DATA SET
C          (I*4)  LCK       = MUST BE GREATER THAN 'ITMAXD' & 'IDMAXD'
C                             & 'ITMAX' - ARRAY SIZE FOR SPLINE CALCS.
C          (R*8)  A()       = GENERAL ARRAY
C          (R*8)  DRCOF0(,) = INTERPOLATION OF DRCOFD(,,) W.R.T DTEV()
C          (L*8)  LEXIST    = TRUE --- FILE TO OPEN EXISTS ELSE NOT
C          (I*4)  L1      = PARAMETER = 1
C          (I*4)  IOPT    = DEFINES THE BOUNDARY DERIVATIVES FOR THE
C                             SPLINE ROUTINE 'XXSPLN', SEE 'XXSPLN'.
C          (L*4)  LSETX   = .TRUE.  => SET UP SPLINE PARAMETERS RELATING
C                                      TO X-AXIS.
C                           .FALSE. => DO NOT SET UP SPLINE PARAMETERS
C                                      RELATING TO X-AXIS.
C                                      (I.E. THEY WERE SET IN A PREVIOUS
C                                            CALL )
C                           (VALUE SET TO .FALSE. BY 'XXSPLN')
C          (R*8)  DY()    = SPLINE INTERPOLATED DERIVATIVES
C
C
C ROUTINES:
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          ------------------------------------------------------------
C          I4UNIT     ADAS      FETCH UNIT NUMBER FOR OUTPUT OF MESSAGES
C          I4FCTN     ADAS      CONVERT STRING TO INTEGER FORM
C
C          (R*8 ADAS FUNCTION - 'R8FUN1' ( X -> X) )
C
C AUTHOR : Alessandro Lanzafame
C
C DATE   : 8th December 1995
C
C-----------------------------------------------------------------------
C
C VERSION: 1.1                                          DATE: 12-03-98
C MODIFIED: RICHARD MARTIN
C               - PUT UNDER SCCS CONTROL
C
C-----------------------------------------------------------------------
      CHARACTER*120       DSNINC
      INTEGER             ICLASS,      IDMAX,       IDMAXD,      IFAIL
      INTEGER             IGRDD,       IPRTD,       ISDIMD,      ISMAXD
      INTEGER             ITDIMD,      ITMAX,       ITMAXD,      IZ0
      INTEGER             IZ1,         IZDIMD,      IZMAXD
      INTEGER             NPART(IZDIMD),            NPARTR(IZDIMD)
      LOGICAL             LPART
      REAL*8              DDENS(IDMAX),             DDENSD(ITDIMD)
      REAL*8              DRCOFD(ISDIMD,ITDIMD,ITDIMD)
      REAL*8              DRCOFI(ITMAX,IDMAX),      DTEV(ITMAX)
      REAL*8              DTEVD(ITDIMD),            ZDATA(ISDIMD)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk