Search Site | Contact Details | FAQ

ADAS Subroutine d9spow

C Copyright (c) 1997, Strathclyde University.
      SUBROUTINE D9SPOW( LSELA  , LEXSA  , LDEFA  , LPART  , LEXSS  ,
     &                   IZ0    , IZL    , IZH    , NPART  ,
     &                   ISDIMD , IZDIMD , ITDIMD , IPDIMD , IMDIMD ,
     &                   ACDA   , SCDA   , CCDA   , PRBA   ,
     &                   PRCA   , QCDA   , XCDA   , PLTA   ,
     &                   NMSUM  , IZIP   , IMIP   , IPIZM  ,
     &                   NTDIM  , NDDIM  , ITMAX  , IDMAX  ,
     &                   DENS   , DENSH  ,
     &                   FPABUN , FSABUN ,
     &                   PLTPEQ ,
     &                   ACDSEQ , SCDSEQ , CCDSEQ , PRBSEQ ,
     &                   PRCSEQ , PLTSEQ ,
     &                   PRBEQ  , PRCEQ  , PLTEQ  , PRADA
     &                  )
C
C-----------------------------------------------------------------------
C
C  ****************** FORTRAN77 SUBROUTINE: D9SPOW *********************
C
C PURPOSE : TO ASSEMBLE RADIATED POWER FUNCTIONS USING FRACTIONAL
C           METASTABLE ABUNDANCES.
C           GENERATE STANDARD ISONUCLEAR MASTER DATA FROM PARTIAL DATA.
C           2D (TEMPERATURE, DENSITY) VERSION.
C
C NOTE    : THE SOURCE ISONUCLEAR MASTER FILE DATA ARE OBTAINED BY A
C           PRIOR CALL TO SUBROUTINE D9DATA FROM SEQUENTIAL FILES
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
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  : (L*4)  LSELA()   = .TRUE.  => INPUT DATA SET TYPE FOR THIS
C                                        INDEX SELECTED
C                           = .FALSE. => INPUT DATA SET FOR THIS INDEX
C                                        NOT SELECTED
C INPUT  : (L*4)  LEXSA()   = .TRUE.  => INPUT DATA SET TYPE FOR THIS
C                                        SELECTED INDEX EXISTS
C                           = .FALSE. => INPUT DATA SET DOES NOT EXIST
C                                        FOR THIS SELECTED INDEX
C INPUT  : (L*4)  LDEFA()   = .TRUE.  => INPUT DATA SET TYPE FOR THIS
C                                        DEFAULT YEAR INDEX EXISTS
C                           = .FALSE. => INPUT DATA SET DOES NOT EXIST
C                                        FOR THIS DEFAULT YEAR INDEX
C INPUT  : (L*4)  LPART     = .TRUE.  => PARTIAL DATA SELECTED
C                           = .FALSE. => STANDARD DATA SELECTED
C INPUT  : (I*4)  IZ0       = NUCLEAR CHARGE
C INPUT  : (I*4)  IZL       = MINIMUM ION CHARGE+1 IN MASTER DATA FILES
C INPUT  : (I*4)  IZH       = MAXIMUM ION CHARGE+1 IN MASTER DATA FILES
C INPUT  : (I*4)  NPART()   = METASTABLE PARTITION.  I.E. NUMBER OF
C                             METASTABLES FROM CHARGE STATE IZL-1 TO
C                             IZH ON INPUT
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                             ISOELECTRONIC MASTER FILES
C INPUT  : (I*4)  IPDIMD    = MAXIMUM NUMBER OF METASTABLES FOR EACH
C                             IONISATION STAGE
C INPUT  : (I*4)  IMDIMD    = MAXIMUM NUMBER OF METASTABLES
C
C INPUT  : (R*8)  ACDA(,,,,)= INTERPOLATION OF ACD COEFFICIENT (CM3 S-1)
C                             1ST DIM: TEMPERATURE INDEX
C                             2ND DIM: DENSITY INDEX
C                             3RD DIM: CHARGE STATE INDEX
C                             4TH DIM: RECOMBINING METASTABLE INDEX
C                             5TH DIM: RECOMBINED METASTABLE INDEX
C INPUT  : (R*8)  SCDA(,,,,)= INTERPOLATION OF SCD COEFFICIENT (CM3 S-1)
C                             1ST DIM: TEMPERATURE INDEX
C                             2ND DIM: DENSITY INDEX
C                             3RD DIM: CHARGE STATE INDEX
C                             4TH DIM: RECOMBINING METASTABLE INDEX
C                             5TH DIM: RECOMBINED METASTABLE INDEX
C INPUT  : (R*8)  CCDA(,,,,)= INTERPOLATION OF CCD COEFFICIENT (CM3 S-1)
C                             1ST DIM: TEMPERATURE INDEX
C                             2ND DIM: DENSITY INDEX
C                             3RD DIM: CHARGE STATE INDEX
C                             4TH DIM: RECOMBINING METASTABLE INDEX
C                             5TH DIM: RECOMBINED METASTABLE INDEX
C INPUT  : (R*8)  PRBA(,,,) = INTERPOLATION OF PRB COEFFICIENT (W CM3 )
C                             1ST DIM: TEMPERATURE INDEX
C                             2ND DIM: DENSITY INDEX
C                             3RD DIM: CHARGE STATE INDEX
C                             4TH DIM: RECOMBINING METASTABLE INDEX
C INPUT  : (R*8)  PRCA(,,,) = INTERPOLATION OF PRC COEFFICIENT (W CM3 )
C                             1ST DIM: TEMPERATURE INDEX
C                             2ND DIM: DENSITY INDEX
C                             3RD DIM: CHARGE STATE INDEX
C                             4TH DIM: RECOMBINING METASTABLE INDEX
C INPUTT : (R*8)  QCDA(,,,) = INTERPOLATION OF QCD COEFFICIENT (CM3 S-1)
C                             1ST DIM: TEMPERATURE INDEX
C                             2ND DIM: DENSITY INDEX
C                             3RD DIM: CHARGE STATE INDEX
C                             4TH DIM: FIRST METASTABLE INDEX
C                             5TH DIM: SECOND METASTABLE INDEX
C INPUT  : (R*8)  XCDA(,,,) = INTERPOLATION OF XCD COEFFICIENT (CM3 S-1)
C                             1ST DIM: TEMPERATURE INDEX
C                             2ND DIM: DENSITY INDEX
C                             3RD DIM: CHARGE STATE INDEX
C                             4TH DIM: FIRST PARENT METASTABLE INDEX
C                             5TH DIM: SECOND PARENT METASTABLE INDEX
C INPUT  : (R*8)  PLTA(,,,) = INTERPOLATION OF PLT COEFFICIENT (W CM3 )
C                             1ST DIM: TEMPERATURE INDEX
C                             2ND DIM: DENSITY INDEX
C                             3RD DIM: CHARGE STATE INDEX
C                             4TH DIM: METASTABLE INDEX
C INPUT  : (I*4)  NMSUM     = TOTAL NUMBER OF POPULATIONS
C
C INPUT  :        IZIP()    = ION CHARGE +1 (IZ1) OF METASTABLE IN LIST
C INPUT  :        IMIP()    = METASTABLE INDEX WITHIN CHARGE STATE IZ1
C                             OF METASTABLE INDEX FROM COMPLETE LIST
C INPUT  :        IPIZM(,)  = METASTABLE INDEX IN COMPLETE LIST
C                             1ST DIM: INDEX IZ1-IZL+1
C                             2ND DIM: METASTABLE COUNT FOR STAGE (IGRD)
C INPUT  : (I*4)  NTDIM     = MAXIMUM NUMBER OF DTEV/DDENS PAIRS
C INPUT  : (I*4)  ITMAX     = NUMBER OF ( DTEV() , DDENS() ) PAIRS
C INPUT  : (R*8)  DENS()    = ELECTRON DENSITIES (CM-3))
C INPUT  : (R*8)  DENSH()   = HYDROGEN DENSITIES (CM-3))
C INPUT  : (R*8)  FPABUN(,,)= RESOLVED METASTABLE EQUILIBRIUM
C                             FRACTIONAL ABUNDANCES
C                             1ST DIM: - TEMPERATURE INDEX
C                             2ND DIM: - DENSITY INDEX
C                             3RD DIM: - METASTABLE INDEX
C OUTPUT : (L*4)  LEXSS()   = .TRUE.  => OUTPUT STANDARD MASTER DATA FOR
C                                        THIS INDEX GENERATED
C                           = .FALSE. => OUTPUT STANDARD MASTER DATA FOR
C                                        THIS INDEX NOT GENERATED
C OUTPUT : (R*8)  FSABUN(,,)= STAGE EQUILIBRIUM FRACTIONAL ABUNDANCES
C                             1ST DIM: - TEMPERATURE INDEX
C                             2ND DIM: - DENSITY INDEX
C                             3RD DIM: - CHARGE STATE INDEX (IZ1-IZL+1)
C OUTPUT : (R*8)  PLTPEQ(,,)= METASTABLE PARTIAL EQUILIBRIUM RADIATED
C                             LINE POWER FUNCTIONS
C                             1ST DIM: - TEMPERATURE INDEX
C                             2ND DIM: - DENSITY INDEX
C                             3RD DIM: - METASTABLE INDEX
C OUTPUT : (R*8)  ACDSEQ(,,)= STANDARD (UNRESOLVED) ACD COEFFICIENT
C                             1ST DIM: - TEMPERATURE INDEX
C                             2ND DIM: - DENSITY  INDEX
C                             3RD DIM: - CHARGE STATE INDEX (IZ1-IZL+1)
C OUTPUT : (R*8)  SCDSEQ(,,)= STANDARD (UNRESOLVED) SCD COEFFICIENT
C                             1ST DIM: - TEMPERATURE INDEX
C                             2ND DIM: - DENSITY INDEX
C                             3RD DIM: - CHARGE STATE INDEX (IZ1-IZL+1)
C OUTPUT : (R*8)  CCDSEQ(,,)= STANDARD (UNRESOLVED) CCD COEFFICIENT
C                             1ST DIM: - TEMPERATURE INDEX
C                             2ND DIM: - DENSITY INDEX
C                             3RD DIM: - CHARGE STATE INDEX (IZ1-IZL+1)
C OUTPUT : (R*8)  PRBSEQ(,,)= STANDARD (UNRESOLVED) SCD COEFFICIENT
C                             1ST DIM: - TEMPERATURE INDEX
C                             2ND DIM: - DENSITY INDEX
C                             3RD DIM: - CHARGE STATE INDEX (IZ1-IZL+1)
C OUTPUT : (R*8)  PRCSEQ(,,)= STANDARD (UNRESOLVED) CCD COEFFICIENT
C                             1ST DIM: - TEMPERATURE INDEX
C                             2ND DIM: - DENSITY INDEX
C                             3RD DIM: - CHARGE STATE INDEX (IZ1-IZL+1)
C OUTPUT : (R*8)  PLTSEQ(,,)= STANDARD (UNRESOLVED) CCD COEFFICIENT
C                             1ST DIM: - TEMPERATURE INDEX
C                             2ND DIM: - DENSITY INDEX
C                             3RD DIM: - CHARGE STATE INDEX (IZ1-IZL+1)
C OUTPUT : (R*8)  PRBEQ(,)  = TOTAL EQUILIBRIUM RADIATED RECOM-BREMS
C                             POWER FUNCTION
C                             1ST DIM: - TEMPERATURE INDEX
C                             2ND DIM: - DENSITY INDEX
C OUTPUT : (R*8)  PRCEQ(,)  = TOTAL EQUILIBRIUM CX RADIATED RECOM POWER
C                             FUNCTION NORMALISED TO ELECTRON
C                             DENSITY
C                             1ST DIM: - TEMPERATURE INDEX
C                             2ND DIM: - DENSITY INDEX
C OUTPUT : (R*8)  PLTEQ(,)  = TOTAL EQUILIBRIUM RADIATED LINE POWER
C                             FUNCTION
C                             1ST DIM: - TEMPERATURE INDEX
C                             2ND DIM: - DENSITY INDEX
C OUTPUT : (R*8)  PRADA(,)  = TOTAL EQUILIBRIUM RADIATED POWER FUNCTION
C                             1ST DIM: - TEMPERATURE INDEX
C                             2ND DIM: - DENSITY INDEX
C
C PROGRAM: (I*4)  IT        = GENERAL INDEX FOR TEMPERATURE
C          (I*4)  ID        = GENERAL INDEX FOR DENSITY
C          (I*4)  IZ        = GENERAL INDEX FOR CHARGE
C          (I*4)  IP        = GENERAL INDEX FOR CHARGE
C          (I*4)  IZ1       = GENERAL INDEX FOR CHARGE+1
C          (I*4)  ICL       = GENERAL INDEX FOR CLASS
C          (I*4)  IPP       = GENERAL PARENT INDEX
C          (I*4)  IPG       = GENERAL GROUND INDEX
C          (I*4)  IZREF     = GENERAL CHARGE STAE POINTER INDEX
C          (I*4)  IPRT      = GENERAL INDEX FOR PARENT METASTABLE
C          (I*4)  IGRD      = GENERAL INDEX FOR METASTABLE
C
C
C ROUTINES:
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          ------------------------------------------------------------
C
C
C AUTHOR : Alessandro Lanzafame, University of Strathclyde
C
C DATE   : 11 December 1995
C
C-----------------------------------------------------------------------
C
C VERSION: 1.1                                          DATE: 12-03-98
C MODIFIED: RICHARD MARTIN
C               - PUT UNDER SCCS CONTROL
C
C-----------------------------------------------------------------------
      INTEGER             IDMAX,       IMDIMD,      IMIP(IMDIMD)
      INTEGER             IPDIMD,      IPIZM(IZDIMD,IPDIMD),     ISDIMD
      INTEGER             ITDIMD,      ITMAX,       IZ0,         IZDIMD
      INTEGER             IZH,         IZIP(IMDIMD),             IZL
      INTEGER             NDDIM,       NMSUM,       NPART(IZDIMD)
      INTEGER             NTDIM
      LOGICAL             LDEFA(8),    LEXSA(8),    LEXSS(8),    LPART
      LOGICAL             LSELA(8)
      REAL*8              ACDA(NTDIM,NDDIM,IZDIMD,IPDIMD,IPDIMD)
      REAL*8              ACDSEQ(NTDIM,NDDIM,IZDIMD)
      REAL*8              CCDA(NTDIM,NDDIM,IZDIMD,IPDIMD,IPDIMD)
      REAL*8              CCDSEQ(NTDIM,NDDIM,IZDIMD)
      REAL*8              DENS(NDDIM), DENSH(NDDIM)
      REAL*8              FPABUN(NTDIM,NDDIM,IMDIMD)
      REAL*8              FSABUN(NTDIM,NDDIM,IZDIMD)
      REAL*8              PLTA(NTDIM,NDDIM,IZDIMD,IPDIMD)
      REAL*8              PLTEQ(NTDIM,NDDIM)
      REAL*8              PLTPEQ(NTDIM,NDDIM,IMDIMD)
      REAL*8              PLTSEQ(NTDIM,NDDIM,IZDIMD)
      REAL*8              PRADA(NTDIM,NDDIM)
      REAL*8              PRBA(NTDIM,NDDIM,IZDIMD,IPDIMD)
      REAL*8              PRBEQ(NTDIM,NDDIM)
      REAL*8              PRBSEQ(NTDIM,NDDIM,IZDIMD)
      REAL*8              PRCA(NTDIM,NDDIM,IZDIMD,IPDIMD)
      REAL*8              PRCEQ(NTDIM,NDDIM)
      REAL*8              PRCSEQ(NTDIM,NDDIM,IZDIMD)
      REAL*8              QCDA(NTDIM,NDDIM,IZDIMD,IPDIMD,IPDIMD)
      REAL*8              SCDA(NTDIM,NDDIM,IZDIMD,IPDIMD,IPDIMD)
      REAL*8              SCDSEQ(NTDIM,NDDIM,IZDIMD)
      REAL*8              XCDA(NTDIM,NDDIM,IZDIMD,IPDIMD,IPDIMD)
© Copyright 1995-2018 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk