Search Site | Contact Details | FAQ

ADAS Subroutine dhdata

       SUBROUTINE DHDATA( YEAR   , YEARDF , TITLF  , IFAIL
     &                  , IZ0    , IZ1    , ICLASS , ITMAX  , IEVCUT
     &                  , ITDIMD , ITMAXD , IDMAXD , IZMAXD
     &                  , DTEV   , DDENS
     &                  , DTEVD  , DDENSD , DRCOFD , ZDATA
     &                  , DRCOFI
     &                  )
C
C-----------------------------------------------------------------------
C  ****************** FORTRAN77 SUBROUTINE: DHDATA *********************
C
C PURPOSE : TO EXTRACT 'SANC0' COLLISIONAL DIELECTRONIC DATA
C
C CALLING PROGRAM: IONBAL (ADAS412)
C	
C	NOTE    : THE SOURCE DATA IS CONTAINED AS SEQUENTIAL DATASETS
C           AS FOLLOWS:
C
C                   (1) JETSHP.ACD<YR>#<IEL).DATA
C                   (2) JETSHP.SCD<YR>#<IEL>.DATA
C                   (3) JETSHP.CCD<YR>#<IEL>.DATA
C                   (4) JETSHP.PRB<YR>#<IEL>.EV<CUT>.DATA
C                   (5) JETSHP.PLT<YR>#<IEL>.EV<CUT>.DATA
C                   (6) JETSHP.PRC<YR>#<IEL>.EV<CUT>.DATA
C                   (7) JETSHP.PLS<YR>#<IEL>.DATA
C
C       WHERE, <YR>  = TWO INTEGERS  FOR THE YEAR SELECTED
C              <IEL> = ELEMENT NAME
C              <CUT> = ENERGY CUT-OFF (EV)
C
C              IF <CUT> = 0 THEN .EV<CUT> IS DELETED FROM ABOVE FILES.
C
C#
C# mar20-95 Alessandro Lanzafame
C#          conversion to Unix
C#
C#                  (1) /ADAS/adas/adf11/acd<YR>/acd<YR>_<IEL>.dat
C#                  (2) /ADAS/adas/adf11/scd<YR>/scd<YR>_<IEL>.dat
C#                  (3) /ADAS/adas/adf11/ccd<YR>/ccd<YR>_<IEL>.dat
C#                  (4) /ADAS/adas/adf11/prb<YR>/prb<YR>_<IEL>.dat
C#                  (5) /ADAS/adas/adf11/plt<YR>/plt<YR>_<IEL>.dat
C#                  (6) /ADAS/adas/adf11/prc<YR>/prc<YR>_<IEL>.dat
C#                  (7) /ADAS/adas/adf11/pls<YR>/pls<YR>_<IEL>.dat
C#
C INPUT  : (C*2)  YEAR      = YEAR OF DATA
C          (C*2)  YEARDF    = DEFAULT YEAR OF DATA IF REQUESTED YEAR
C                             DOES NOT EXIST
C          (I*4)  IZ0       = NUCLEAR CHARGE
C          (I*4)  IZ1       = MINIMUM ION CHARGE + 1
C          (I*4)  ICLASS    = CLASS OF DATA (1 - 6)
C          (I*4)  ITMAX     = NUMBER OF ( DTEV() , DDENS() ) PAIRS
C          (I*4)  IEVCUT    = ENERGY CUT-OFF (EV)
C          (R*8)  DTEV()    = DLOG10(ELECTRON TEMPERATURES (EV))
C          (R*8)  DDENS()   = DLOG10(ELECTRON DENSITIES (CM-3))
C
C OUTPUT : (C*80) TITLF     = INFORMATION STRING
C          (I*4)  ITDIMD    = MAXIMUM NUMBER OF DATA TEMP & DENS
C          (I*4)  ITMAXD    = NUMBER OF DATA DTEVD()
C          (I*4)  IDMAXD    = NUMBER OF DATA DDENS()
C          (I*4)  IZMAXD    = NUMBER OF DATA ZDATA()
C          (I*4)  ITDIMD    = MAXIMUM NUMBER OF DATA TEMP & DENS
C          (I*4)  ZDATA()   = Z1 CHARGES IN DATASET
C          (I*4)  IFAIL     = 0    IF ROUTINE SUCCESSFUL
C                           = 1    IF ROUTINE OPEN STATEMENT FAILED
C          (R*8)  DTEVD()   = DLOG10(DATA ELECTRON TEMPERATURES (EV))
C          (R*8)  DDENSD()  = DLOG10(DATA ELECTRON DENSITIES (CM-3))
C          (R*8)  DRCOFD()  = DLOG10(DATA RATE COEFFICIENTS (CM-3/S))
C          (R*8)  DRCOFI()  = INTERPOLATION OF DRCOFD(,,) FOR
C                             DTEV() & DDENS()
C
C PROGRAM: (C*2)  SEQUA()   = ION NAMES FOR A PARTICULAR IZ0
C          (C*36) DSNAME    = FILE NAME ( SEE ABOVE TYPES )
C          (C*80) STRING    = GENERAL VARIABLE
C          (C*80) BLANK     = BLANK STRING
C          (C*2)  YEARSV    = LAST YEAR USED IN THIS ROUTINE
C          (I*4)  IREAD     = INPUT STREAM FOR OPEN STATEMENT
C          (I*4)  IZ0SV     = LAST IZ0 USED IN THIS ROUTINE
C          (I*4)  ICLSV     = LAST ICLASS USED IN THIS ROUTINE
C          (I*4)  INDXZ1    = LOCATION OF IZ1 IN ZDATA()
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
C PE BRIDEN = ADDED VARIABLES (14/01/91)
C
C          (I*4)  L1      = PARAMETER = 1
C          (I*4)  IOPT    = DEFINES THE BOUNDARY DERIVATIVES FOR THE
C                             SPLINE ROUTINE 'XXSPLN', SEE 'XXSPLN'.
C
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
C
C          (R*8)  DY()    = SPLINE INTERPOLATED DERIVATIVES
C
C          (R*8 ADAS FUNCTION - 'R8FUN1' ( X -> X) )
C
C AUTHOR : JAMES SPENCE (TESSELLA SUPPORT SERVICES PLC)
C          K1/0/80
C          JET  EXT. 4866
C
C DATE   : 22/02/90
C
C DATE   : 21/08/90 PE BRIDEN - REVISION: SEQUA(43) CHANGED ('TE'->'TC')
C
C DATE   : 08/10/90 PE BRIDEN - REVISION: RENAMED SUBROUTINE
C
C DATE   : 12/11/90 PE BRIDEN - CORRECTION: MOVE THE SETTING OF 'INDXZ1'
C                                           TO AFTER THE  '20 CONTINUE'
C                                           STATEMENT.   ALSO SAVE  THE
C                                           VALUE OF 'IZ1MIN'.
C
C DATE   : 14/01/91 PE BRIDEN - ADAS91:     CALLS TO NAG SPLINE ROUTINES
C                                           'E01BAF' & 'E02BBF' REPLACED
C                                           BY  CALLS   TO  ADAS  SPLINE
C                                           ROUTINE 'XXSPLN'.
C
C DATE   : 25/06/91 PE BRIDEN - CORRECTION: CHANGED FOLLOWING DIMENSION:
C                                            'DIMENSION DRCOFI(ITDIMD)'
C                                           TO
C                                            'DIMENSION DRCOFI(ITMAX)'
C
C
C DATE   : 25/06/91 HP SUMMERS - REVISION: RENAMED FROM D2DATA TO DHDATA
C                                          SET IOPT=4 FOR IONBAL
C DATE   : 27/04/92 PE BRIDEN  - ADDED DEFAULT YEAR FOR DATA IF
C                                REQUESTED YEAR DOES NOT EXIST.
C                                (ADDED 'YEARDF'), INTRODUCED IFAIL=-1
C                                IF DEFAULT YEAR WAS USED AND NOT THE
C                                REQUESTED YEAR.
C
C
C DATE   : 20/03/95 AC LANZAFAME - CONVERSION TO UNIX
C                                 CHANGED OPEN STATEMENT AND FILE
C                                 NAMES
C                                 ADIR ADIR1 ADDED
C                                 DSNAME FROM C*30 TO C*40
C
C  ROUTINES:
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          ------------------------------------------------------------
C          XXSPLN     ADAS      CUBIC SPLINE INTERPOLATION/EXTRAPOLATION
C	     R8FUN1     ADAS      REAL*8 FUNCTION: ( X -> X )
C
C VERSION 1.1							DATE: 29-10-97
C		RICHARD MARTIN
C		ADAS412 - PUT UNDER SCCS CONTROL.
C 
C VERSION: 1.2							DATE: 01-12-97
C		RICAHRD MARTIN
C		REMOVED DUPLICATE VARIABLE DECLARATION.
C
C VERSION: 1.3							DATE: 23-11-98
C		RICHARD MARTIN & DAVID BROOKS
C		REMOVED 'DSNAME(12:13) = YEARDF' STATEMENT (FOR IBM).		
C
C-----------------------------------------------------------------------
C
      CHARACTER*80        TITLF
      CHARACTER*2         YEAR,        YEARDF
      INTEGER             ICLASS,      IDMAXD,      IEVCUT,      IFAIL
      INTEGER             ITDIMD,      ITMAX,       ITMAXD,      IZ0
      INTEGER             IZ1,         IZMAXD,      ZDATA(ITDIMD)
      REAL*8              DDENS(ITMAX),             DDENSD(ITDIMD)
      REAL*8              DRCOFD(ITDIMD,ITDIMD,ITDIMD)
      REAL*8              DRCOFI(ITMAX),            DTEV(ITMAX)
      REAL*8              DTEVD(ITDIMD)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk