Search Site | Contact Details | FAQ

ADAS Subroutine bnd404a

       SUBROUTINE BND404A(ITYPE  ,
     &                    NUTMAX , NUDMAX , NUZMAX , NUMMAX ,
     &                    MAXT   , MAXD   ,
     &                    IZL    , IZH    , IZ0    ,
     &                    TEK    , DENSA  ,
     &                    METFRC ,
     &                    NGRD   ,
     &                    IST2   , IST5   , IWRITE , DATE,
     &                    DSNIN)
C
C----------------------------------------------------------------------
C
C ************ FORTRAN 77 SUBROUTINE BND404A ***************************
C
C   VERSION 1.0
C
C   PURPOSE:
C           TO FETCH DATA FROM RESOLVED ADF10 FILES, SPLINE THEM
C           ONTO THE REQUESTED TEMPERATURE/DENSITY GRID, BUNDLE
C           THEM INTO UNRESOLVED DATA USING THE INPUT METASTABLE
C           FRACTIONS, AND WRITE THE RESULT TO ADF11 FILES.
C
C   CALLING ROUTINE / PROGRAM : LH404RU / ADAS404
C
C   DATA:
C
C           THE SOURCE DATA IS CONTAINED AS MEMBERS OF PARTITIONED
C           DATA SETS AS FOLLOWS:
C
C             1. JETUID.ACD<YR>.DATA
C             2. JETUID.SCD<YR>.DATA
C             3. JETUID.CCD<YR>.DATA
C             4. JETUID.PRB<YR>.DATA
C             5. JETUID.PRC<YR>.DATA
C
C           WHERE <YR> DENOTES TWO INTEGERS FOR THE YEAR SELECTED.
C
C   SUBROUTINE:
C
C   INPUT : (I*4)  ITYPE  - TYPE OF ADF10 DATA BEING READ (SEE ABOVE)
C   INPUT : (I*4)  NUTMAX - OUTPUT ELEMENT MASTER FILE
C                                 MAXIMUM NUMBER OF TEMPERATURES
C   INPUT : (I*4)  NUDMAX - OUTPUT ELEMENT MASTER FILE
C                                 MAXIMUM NUMBER OF DENSITIES
C   INPUT : (I*4)  NUZMAX - OUTPUT ELEMENT MASTER FILE
C                                 MAXIMUM NUMBER OF CHARGE STATES
C   INPUT : (I*4)  NUMMAX - OUTPUT ELEMENT MASTER FILE
C                                 MAXIMUM NUMBER OF METASTABLES
C   INPUT : (I*4)  MAXT   - OUTPUT ELEMENT MASTER FILE
C                                 ACTUAL NUMBER OF TEMPERATURES
C   INPUT : (I*4)  MAXD   - OUTPUT ELEMENT MASTER FILE
C                                 ACTUAL NUMBER OF DENSITIES
C   INPUT : (I*4)  IZL    - LOWEST ION CHARGE TO READ
C   INPUT : (I*4)  IZH    - HIGHEST ION CHARGE TO READ
C   INPUT : (I*4)  IZ0    - NUCLEAR CHARGE TO READ
C   INPUT : (R*8)  DENSA()- OUTPUT ELEMENT MASTER FILE
C                                 SET OF MAXD DENSITIES
C   INPUT : (R*8)  TEK()  - OUTPUT ELEMENT MASTER FILE
C                                 SET OF MAXT TEMPERATURES
C   INPUT : (R*8)  METFRC(,,,) - METASTABLE POPULATION FRACTIONS,
C                                 SPLINED ONTO THE OUTPUT TEMPERATURES
C                                 AND DENSITIES
C                                 1ST DIMENSION - DENSITY INDEX
C                                 2ND DIMENSION - TEMPERATURE INDEX
C                                 3RD DIMENSION - CHARGE STATE INDEX
C                                 4TH DIMENSION - METASTABLE INDEX
C   INPUT : (I*4)  NGRD() - NUMBER OF GROUND STATES OF THE FIRST
C                           50 ISOELECTRONIC SEQUENCES
C   INPUT : (I*4)  IST2   - UNIT NUMBER FOR OUTPUT INFORMATION
C                           AND ERROR MESSAGES
C   INPUT : (I*4)  IST5   - UNIT NUMBER FOR READING MASTER CONDENSED
C                           FILE
C   INPUT : (I*4)  IWRITE - UNIT NUMBER FOR WRITING ADF11 DATA
C   INPUT : (C*8)  DATE   - CURRENT DATE
C
C   PARAMETER : (I*4)  NTDMAX - SIZE OF LOCAL WORKING SPACE
C                                 (MUST BE GREATER THAN NUTMAX & NUDMAX)
C   PARAMETER : (I*4)  NDZ1V  - MASTER CONDENSED FILE
C                                 MAXIMUM NUMBER OF CHARGE STATES
C   PARAMETER : (I*4)  NDTIN  - MASTER CONDENSED FILE
C                                 MAXIMUM NUMBER OF TEMPERATURES
C   PARAMETER : (I*4)  NDDEN  - MASTER CONDENSED FILE
C                                 MAXIMUM NUMBER OF DENSITIES
C
C         : (R*8)  DENSR()    - INPUT MASTER CONDENSED FILE
C                                 SET OF IDE REDUCED DENSITIES
C         : (R*8)  TR()       - INPUT MASTER CONDENSED FILE
C                                 SET OF ITE REDUCED TEMPERATURES
C         : (R*8)  ZIPT()     - INPUT MASTER CONDENSED FILE
C                                 SET OF IZE RECOMBINING ION CHARGES
C         : (R*8)  AIPT(,,)   - INPUT MASTER CONDENSED FILE
C                                 RELEVANT RATE COEFFICIENTS
C                                 1ST DIMENSION - DENSITY INDEX
C                                 2ND DIMENSION - TEMPERATURE INDEX
C                                 3RD DIMENSION - CHARGE STATE INDEX
C         : (R*8)  EIA()      - INPUT MASTER CONDENSED FILE
C                                 SET OF IONISATION POTENTIALS (CM-1)
C
C         : (R*8)  ATTY(,)    - WORK SPACE FOR INTERPOLATION
C                             - STORES LOG10(INTERPOLATED VALUES)
C                                 1ST DIMENSION - TEMPERATURE
C                                 2ND DIMENSION - DENSITY
C         : (R*8)  ARRAY(,)   - STORES LOG10(INTERPOLATED VALUES)
C                                 1ST DIMENSION - TEMPERATURE
C                                 2ND DIMENSION - DENSITY
C         : (R*8)  WORK(,)    - SUM OF INTERPOLATED VALUES OVER
C                               METASTABLE STATES
C                                 1ST DIMENSION - TEMPERATURE
C                                 2ND DIMENSION - DENSITY
C
C     ROUTINES:
C     ---------
C         XXOPEN   -
C         XXTERM   -
C         XXSLEN   -
C         XXIN17   -  FETCH DATA FROM MASTER CONDENSED FILE
C         D4SPLN   -  INTERPOLATE CONDENSED MASTER FILE
C                     UPDATED VERSION OF D1SPLN
C
C---------------------------------------------
C AUTHOR:  LORNE D. HORTON
C          ROOM K1/1/58, JET JOINT UNDERTAKING
C
C   DATE:  23RD FEBRUARY 1996
C----------------------------------------------------------------------
C UNIX-IDL PORT:
C
C VERSION: 1.1				DATE: 11-11-96
C MODIFIED: WILLIAM OSBORN (TESSELLA SUPPORT SERVICES PLC)
C		- FIRST CONVERTED
C VERSION: 1.2				DATE: 20-10-97
C MODIFIED: LORNE HORTON (JET)
C		- INCREASED SPACE FOR FILE NAME DIAGNOSTICS
C       	- REMOVED ISWIT VARIABLES AND PASSED ITYPE TO
C         		D4SPLN INSTEAD
C       	- ALLOWED LSWIT TO BE TRUE FOR ALL SCD'S, INCLUDING
C         	  FROM METASTABLE STATES
C
C VERSION: 1.3				DATE: 13-10-99
C MODIFIED: Martin O'Mullane
C		- PRB files wrote incorrect information in IPRT
C                 and JPRT line in adf11 file.  
C----------------------------------------------------------------------
C
C
      CHARACTER*8         DATE
      CHARACTER*80        DSNIN(50,10)
      INTEGER             IST2,        IST5,        ITYPE,       IWRITE
      INTEGER             IZ0,         IZH,         IZL,         MAXD
      INTEGER             MAXT,        NGRD(50),    NUDMAX,      NUMMAX
      INTEGER             NUTMAX,      NUZMAX
      REAL*8              DENSA(NUDMAX)
      REAL*8              METFRC(NUDMAX,NUTMAX,NUZMAX,NUMMAX)
      REAL*8              TEK(NUTMAX)
© Copyright 1995-2018 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk