Search Site | Contact Details | FAQ

ADAS Subroutine ionbal

       SUBROUTINE IONBAL( YEAR  , YEARDF, IFAIL ,
     &                    IZ0   , ITMAX ,
     &                    DTEV  , DDENS , DDENSH,
     &                    FABUND
     &                   )
C-----------------------------------------------------------------------
C  ****************** FORTRAN77 SUBROUTINE: IONBAL *********************
C
C VERSION : 1.1
C
C CALLING PROGRAM: ADAS412
C
C PURPOSE : TO EVALUATE EQUILIBRIUM IONIS. BALANCE IN A PLASMA OF
C           FIXED ELECTRON TEMPERATURE, ELECTRON DENSITY AND NEUTRAL
C           HYDROGEN DENSITY.
C
C NOTE    : ATOMIC RATE COEFFICIENT DATA ARE EXTRACTED FROM THE
C           MASTER ELEMENT FILES USING THE SUBROUTINE 'DHDATA'.
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)  ITMAX      = NUMBER OF DTEV(),DDENS(),DDENSH() SETS
C           (R*8)  DTEV()     = DLOG10(ELECTRON TEMPERATURES (EV))
C           (R*8)  DDENS()    = DLOG10(ELECTRON DENSITIES (CM-3))
C           (R*8)  DDENSH()   = DLOG10(NEUTRAL. H  DENSITIES (CM-3))
C
C OUTPUT  : (I*4)  IFAIL      = 0     IF ROUTINE SUCCESSFUL
C                               1     IF ROUTINE UNSUCCESSFUL
C           (R*8)  FABUND()   = FRACTIONAL ABUNDANCES FOR DTEV() ETC.
C
C PROGRAM : (C*80) FINFO      = INFORMATION STRING
C           (C*2)  YEARIN     = ACTIVE YEAR OF DATA WHEN CYCLING
C                               (RESET IF NECESSARY FROM YEAR TO YEARDF)
C           (I*4)  NTDIM      = MAXIMUM NUMBER OF TEMP,DENS PAIRS
C           (I*4)  NTDIMD     = MAXIMUM NUMBER OF DATA TEMP & DENS
C           (I*4)  NZDIM      = MAXIMUM NUMBER OF IONISATION STAGES
C           (I*4)  ICLASA()   = CLASSES OF DATA TO BE EXTRACTED
C           (I*4)  NCLASS     = NUMBER OF DATA CLASSES TO BE EXTRACTED
C           (I*4)  ICLASS     = INDEX OF PARTICULAR CLASS
C           (I*4)  IZZ        = ION CHARGE
C           (I*4)  IZ1        = ION CHARGE+1
C           (I*4)  IEVCUT     = ENERGY CUTOFF (EV)
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)  IT         = INDEX USED WITH TEMPS
C           (I*4)  ICL        = INDEX USED WITH DATA CLASSES
C           (I*4)  N          = NO. OF IONIS. STAGES INCL. BARE NUCLEUS
C                               (EQUALS IZ0+1)
C           (I*4)  IZM        = ION CHARGE -1
C           (R*8)  DENS()     = ELECTRON DENSITIES (CM-3)
C           (R*8)  DENSH()    = NEUTRAL H DENSITIES (CM-3)
C           (R*8)  DTEVD()    = DLOG10(DATA ELECTRON TEMPS (EV))
C           (R*8)  DDENSD()   = DLOG10(DATA ELECTRON DENSITIES (CM-3))
C           (R*8)  ZDATA()    = Z1 CHARGES IN DATA SET
C           (R*8)  DRCOFD(,,) = DLOG10(DATA RATE COEFFICIENTS (CM3/S))
C           (R*8)  DRCOFI()   = INTERPOLATION OF DRCOFD(,,) FOR
C                               DTEV() & DDENS()
C           (R*8)  ACDA(,)    = INTERPOLATED RECOM. COEFFT (CM3/S)
C           (R*8)  SCDA(,)    = INTERPOLATED IONIS. COEFFT (CM3/S)
C           (R*8)  CCDA(,)    = INTERPOLATED CXR COEFFT. (CM3/S)
C           (R*8)  POPF()     = STAGE FRACTIONAL ABUNDANCES
C           (R*8)  EV         = TEMPERATURE (K) EUIVALENT TO 1 EV
C           (R*8)  RH         = RATIO (H DENS)/(ELEC. DENS)
C           (R*8)  U          = TEMPORARY PARAMETER
C           (R*8)  SUM        = TEMPORARY PARAMETER
C
C ROUTINES:
C           ROUTINE    SOURCE    BRIEF DESCRIPTION
C           ------------------------------------------------------------
C           DHDATA     ADAS    EXTRACT 'SANC0' DATA FROM MASTER FILES
C
C
C AUTHOR  : HP SUMMERS
C           K1/1/57
C           JET EXT. 4941
C
C DATE    : 25/06/91
C
C UPDATE  : 27/04/92 HP SUMMERS  - ADDED DEFAULT YEAR FOR DATA IF
C                                  REQUESTED YEAR DOES NOT EXIST.
C                                  (ADDED 'YEARDF') IN DHDATA
C
C VERSION 1.1							DATE: 28-10-97
C		RICHARD MARTIN
C		PUT UNDER SCCS CONTROL (ADAS412).
C
C----------------------------------------------------------------------
C
C
      CHARACTER*2         YEAR,        YEARDF
      INTEGER             IFAIL,       ITMAX,       IZ0
      REAL*8              DDENS(NTDIM),             DDENSH(NTDIM)
      REAL*8              DTEV(NTDIM), FABUND(NTDIM,NZDIM)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk