Search Site | Contact Details | FAQ

ADAS Subroutine cachkb

      SUBROUTINE CACHKB( IUNIT  , NBSEL  , IBSEL  ,
     &                   IZ0IN  , IZ0    ,
     &                   LOPEN  , IRCODE , DLPATH
     &                 )
C
C-----------------------------------------------------------------------
C
C  ****************** FORTRAN77 SUBROUTINE: CACHKB *********************
C
C  PURPOSE: TO CHECK THE SELECTED BLOCK (IBSEL) OF DATA  EXISTS  IN  THE
C           INPUT DATA SET AND IF SO IT REPRESENTS THE ENTERED VALUES OF
C           'IZ0IN' (NUCLEAR CHARGE OF SELECTED IONISING ION ELEMENT).
C
C           IT ALSO CLOSES THE INPUT DATA SET ALLOCATION IF OPEN.
C
C  CALLING PROGRAM: CASSZD
C
C  SUBROUTINE:
C
C  INPUT : (I*4)   IUNIT   = UNIT TO WHICH INPUT DATA SET IS ALLOCATED
C  INPUT : (I*4)   NBSEL   = TOTAL NUMBER OF DATA-BLOCKS READ FROM INPUT
C                            DATA SET.
C  INPUT : (I*4)   IBSEL   = INDEX OF DATA-BLOCK SELECTED FOR ANALYSIS
C
C  INPUT : (I*4)   IZ0IN   = REQUESTED: NUCLEAR CHARGE OF ELEMENT
C  INPUT : (I*4)   IZ0     = INPUT FILE: NUCLEAR CHARGE OF ELEMENT
C
C  I/O   : (L*4)   LOPEN   = INPUT : .TRUE.  => INPUT DATA SET OPEN.
C                                    .FALSE. => INPUT DATA SET CLOSED.
C                            OUTPUT: ALWAYS RETURNED AS .FALSE.
C  OUTPUT: (I*4)   IRCODE  = RETURN CODE FROM SUBROUTINE:
C                            0 => NO ERROR DETECTED.
C                            2 => DISCREPANCY BETWEEN REQUESTED ELEMENT
C                                 AND THAT IN INPUT DATA FILE.
C                            3 => SELECTED DATA-BLOCK  OUT OF RANGE  OR
C                                 DOES NOT EXIST.
C
C          (I*4)   I4UNIT  = FUNCTION (SEE ROUTINE SECTION BELOW)
C
CA         (c*80)  DSNAME  = DATA FILE NAME UNDER UNIX, INCLUDING PATH.
C
C ROUTINES:
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          ------------------------------------------------------------
C          E2FILE     ADAS      OPEN DATA SET FOR SELECTED ELEMENT
C          I4UNIT     ADAS      FETCH UNIT NUMBER FOR OUTPUT OF MESSAGES
C
C AUTHOR:  PAUL E. BRIDEN (TESSELLA SUPPORT SERVICES PLC)
C          K1/0/37
C          JET EXT. 2620
C
C DATE:    06/06/91
C
C UNIX-IDL PORT:
C
C VERSION: 1.1                          DATE: 25-1-96
C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC)
C               - CREATED FROM E2CHKB TO WHICH IT IS ESSENTIALLY
C                 IDENTICAL EXCEPT IT CALLS CAFILE RATHER THAN E2FILE
C                 AND HAS THE EXTRA PATHNAME VARIABLE DLPATH INCLUDED
C                 IN THE ARGUMENT LIST.
C
C-----------------------------------------------------------------------
C-----------------------------------------------------------------------
C
C-----------------------------------------------------------------------
      CHARACTER*80        DLPATH
      INTEGER             IBSEL,       IRCODE,      IUNIT,       IZ0
      INTEGER             IZ0IN,       NBSEL
      LOGICAL             LOPEN
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk