Search Site | Contact Details | FAQ

ADAS Subroutine cnv404a

       SUBROUTINE CNV404A(ITYPE  , ISWIT  ,
     &                    NUTMAX , NUDMAX , NUZMAX , NUMMAX ,
     &                    MAXT   , MAXD   ,
     &                    IZL    , IZH    , IZ0    ,
     &                    TEK    , DENSA  ,
     &                    NGRD   ,
     &                    IST2   , IST5   , IWRITE , DATE,
     &                    DSNIN  , OPEN17)
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, AND
C           WRITE THE RESULT TO ADF11 FILES.
C
C   CALLING ROUTINE / PROGRAM : LH404RR / 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             6. JETUID.QCD<YR>.DATA
C             7. JETUID.XCD<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)  ISWIT  - SWITCH FOR INTERPOLATION TYPE
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 : (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
C     ROUTINES:
C     ---------
C         XXOPEN   -
C         XXTERM   -
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:   5TH AUGUST 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
C VERSION: 1.3				DATE: 13-10-99
C MODIFIED: MARTIN O'MULLANE
C		- PRB DEFINITION HAS BEEN CHANGED AND THEY ARE NOW
C                 SUMMED OVER THE PARENTS. THIS NECESSITATES WRITING
C                 DIFFERENT INFORMATION ON THE HEADER LINE OF THE 
C                 ADF11 FILE.
C
C VERSION: 1.4				DATE: 13-10-99
C MODIFIED: MARTIN O'MULLANE
C		- DO NOT WRITE QCD AND XCD BLOCKS WHICH ARE ALL ZERO.
C 
C VERSION :  1.5                         
C DATE    : 04-01-2007
C MODIFIED: Martin O'Mullane
C           - When converting from ergs to Joules check for zero value
C             before subtracting (it's a log!) 7. In this case set 
C             value of element to -74.0. 
C
C----------------------------------------------------------------------
C
      CHARACTER*8         DATE
      CHARACTER*80        DSNIN(50,10)
      INTEGER             IST2,        IST5,        ISWIT,       ITYPE
      INTEGER             IWRITE,      IZ0,         IZH,         IZL
      INTEGER             MAXD,        MAXT,        NGRD(50),    NUDMAX
      INTEGER             NUMMAX,      NUTMAX,      NUZMAX
      LOGICAL             OPEN17
      REAL*8              DENSA(NUDMAX),            TEK(NUTMAX)
© Copyright 1995-2018 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk