Search Site | Contact Details | FAQ

ADAS Subroutine xxdata_11

      subroutine  xxdata_11( iunit  , iclass , 
     &                       isdimd , iddimd , itdimd , 
     &                       ndptnl , ndptn  , ndptnc , ndcnct ,
     &                       iz0    , is1min , is1max , 
     &                       nptnl  , nptn   , nptnc  ,   
     &                       iptnla , iptna  , iptnca , 
     &                       ncnct  , icnctv ,
     &                       iblmx  , ismax  , dnr_ele, dnr_ams, 
     &                       isppr  , ispbr  , isstgr ,
     &                       idmax  , itmax  , 
     &                       ddens  , dtev   , drcof  ,
     &                       lres   , lstan  , lptn  
     &                     )
c-----------------------------------------------------------------------
c
c  ****************** fortran77 subroutine: xxdata_11 ******************
c
c  purpose: to read a complete  adf11 file, check its class and 
c           determine its standard, resolved and partition organisation.
c
c  calling program: various
c
c  notes:    (1) A `standard' adf11 file contains gcr data between one  
c                whole ionisation stage and another whole ionisation 
c                stage.  
c                A `resolved' (or partial) adf11 file contains gcr data
c                between a set of metastables of one ionisation stage
c                and a set of metastables of another ionisation stage.
c                A resolved file is distinguished from a standard file
c                by the presence of a `connection vector' in the adf11
c                data file header lines.
c                The connection vector specifies the number of meta-
c                stables in each ionisation stage which are coupled 
c                together by gcr data.
c            (2) A `partitioned' adf11 file contains gcr data between 
c                clumps of ionisation stages or metastables or comb-
c                inations of the two called `partitions'.  
c                A `partition level' is a specification of the 
c                partitions which span all the ionisation stages (and
c                metastables) of an element.  Successive partition 
c                levels give a heirarchy corresponding to larger 
c                partitions and greater clumping. 
c                A `superstage' is a set of partitions which are close-
c                coupled.
c                There are thus equivalences :
c                        ionisation stage   -   superstage
c                        metastable         -   partition
c                        ion charge         -   superstage index
c                A partitioned adf11 file may be standard (with each 
c                superstage comprising only one partition) or resolved.
c                A partitioned file is distinguished by the presence of 
c                `partition specification block' in the adf11 data  
c                file header lines.
c            (3) When  a partition specification block is present, it 
c                should be ordered from the highest partition level  
c                index to lowest partition level index.  Thus the first 
c                partition in the partition block has the least number 
c                of partitions and the last has the greatest number.
c            (4) Twelev classes of adf11 data file may be read by the
c                subroutine as follow:
c
c            	 class index	type	  GCR data content
c            	 -----------	----	  ----------------
c            	     1  	acd	  recombination coeffts
c            	     2  	scd	  ionisation coeffts
c            	     3  	ccd	  CX recombination coeffts
c            	     4  	prb	  recomb/brems power coeffts
c            	     5  	prc	  CX power coeffts
c            	     6  	qcd	  base meta. coupl. coeffts 
c            	     7  	xcd	  parent meta. coupl. coeffts
c            	     8  	plt	  low level line power coeffts
c            	     9  	pls	  represent. line power coefft
c            	    10  	zcd	  effective charge
c            	    11  	ycd	  effective squared charge
c            	    12  	ecd	  effective ionisation potential
c
c            (5) A resolved adf11 file, with a connection vector, has a set
c                of names and pointers at precise positions in the data file
c                which are recognised.
c                The names are different for partitioned and unpartitioned
c                data files as follow:
c
c                       file      unpartitioned         partitioned 
c                       class        names                 names  
c                       
c                       (all)         z1                   s1
c
c                       	 (indices 1 and 2)     (indices 1 and 2)
c                   	----	   ----     ----         ----	  ----
c                   	acd        iprt     igrd         ispp	  ispb
c                   	scd        iprt     igrd         ispp	  ispb
c                   	ccd        iprt     igrd         ispp	  ispb
c                   	prb        iprt                  ispp	      
c                   	prc        iprt                  ispp	      
c                   	qcd        igrd     jgrd         ispb	  jspb
c                   	xcd        iprt     jprt         ispp	  jspp
c                   	plt        igrd 	         ispb
c                   	pls        igrd 	         ispb
c                   	zcd        igrd 	         ispb
c                   	ycd        igrd 	         ispb
c                   	ecd        igrd 	         ispb
c
c             (6) In partitioned nomenclature: s=superstage; p=partition;
c                 b=base (current superstage), p=parent (next up super-
c                 stage), c=child (next down superstage). Thus arrays
c                 `iprtr' and `igrd' in old notation are now substituted
c                 by `isppr' and `ispbr' respectively internally and in
c                 external naming. 
c
c
c  subroutine:
c
c  input : (i*4)  iunit     = unit to which input file is allocated
c  input : (i*4)  iclass    = class of data (1 - 12 ):
c                               1-acd, 2-scd, 3-ccd, 4-prb, 5-prc
c                               6-qcd, 7-xcd, 8-plt, 9-pls,10-zcd
c                              11-ycd,12-ecd
c
c  input : (i*4)  isdimd    = maximum number of (sstage, parent, base)
c                             blocks in isonuclear master files
c  input : (i*4)  iddimd    = maximum number of dens values in
c                             isonuclear master files
c  input : (i*4)  itdimd    = maximum number of temp values in
c                             isonuclear master files
c  input : (i*4)  ndptnl    = maximum level of partitions
c  input : (i*4)  ndptn     = maximum no. of partitions in one level
c  input : (i*4)  ndptnc    = maximum no. of components in a partition
c  input : (i*4)  ndcnct    = maximum number of elements in connection
c                             vector  
c
c  output: (i*4)  iz0       = nuclear charge
c  output: (i*4)  is1min    = minimum ion charge + 1 
c                             (generalised to connection vector index)
c  output: (i*4)  is1max    = maximum ion charge + 1 
c                             (note excludes the bare nucleus)
c                             (generalised to connection vector index 
c                              and excludes last one which always remains
c                              the bare nucleus)
c  output: (i*4)  nptnl     = number of partition levels in block 
c  output: (i*4)  nptn()    = number of partitions in partition level
c                             1st dim: partition level 
c  output: (i*4)  nptnc(,)  = number of components in partition
c                             1st dim: partition level 
c                             2nd dim: member partition in partition level 
c  output: (i*4)  iptnla()  = partition level label (0=resolved root,1=
c                                                      unresolved root)
c                             1st dim: partition level index 
c  output: (i*4)  iptna(,)  = partition member label (labelling starts at 0)
c                             1st dim: partition level index 
c                             2nd dim: member partition index in partition 
c                             level 
c  output: (i*4)  iptnca(,,)= component label (labelling starts at 0)
c                             1st dim: partition level index 
c                             2nd dim: member partition index in partition 
c                             level
c                             3rd dim: component index of member partition
c  output: (i*4)  ncnct     = number of elements in connection vector 
c  output: (i*4)  icnctv()  = connection vector of number of partitions 
c                             of each superstage in resolved case
c                             including the bare nucleus
c                             1st dim: connection vector index
c
c  output: (i*4)  iblmx     = number of (sstage, parent, base)
c                             blocks in isonuclear master file
c  output: (i*4)  ismax     = number of charge states
c                             in isonuclear master file
c                             (generalises to number of elements in
c                              connection vector)
c  output: (c*12) dnr_ele   = CX donor element name for iclass = 3 or 5
c                             (blank if unset)
c  output: (r*8)  dnr_ams   = CX donor element mass for iclass = 3 or 5
c                             (0.0d0 if unset)
c  output: (i*4)  isppr()   = 1st (parent) index for each partition block 
c                             1st dim: index of (sstage, parent, base)
c                                      block in isonuclear master file
c  output: (i*4)  ispbr()   = 2nd (base) index for each partition block 
c                             1st dim: index of (sstage, parent, base)
c                                      block in isonuclear master file
c  output: (i*4)  isstgr()  = s1 for each resolved data block
c                             (generalises to connection vector index)
c                             1st dim: index of (sstage, parent, base)
c                                      block in isonuclear master file
c
c  output: (i*4)  idmax     = number of dens values in
c                             isonuclear master files
c  output: (i*4)  itmax     = number of temp values in
c                             isonuclear master files
c  output: (r*8)  ddens()   = log10(electron density(cm-3)) from adf11 
c  output: (r*8)  dtev()    = log10(electron temperature (eV) from adf11
c  output: (r*8)  drcof(,,) = if(iclass <=9):
c                                log10(coll.-rad. coefft.) from 
c                                isonuclear master file
c                             if(iclass >=10):
c                                coll.-rad. coefft. from 
c                                isonuclear master file
c                             1st dim: index of (sstage, parent, base)
c                                      block in isonuclear master file
c                             2nd dim: electron temperature index
c                             3rd dim: electron density index 
c
c  output: (l*4)  lres      = .true.  => partial file
c                           = .false. => not partial file
c  output: (l*4)  lstan     = .true.  => standard file
c                           = .false. => not standard file
c  output: (l*4)  lptn      = .true.  => partition block present
c                           = .false. => partition block not present
c
c  routines:
c          routine    source    brief description
c          -------------------------------------------------------------
c          i4unit     adas      fetch unit number for output of messages
c          i4fctn     adas      convert string to integer form
c          xfelem     adas      return element name given nuclear charge 
c          xxword     adas      extract position of number in buffer
c          xxslen     adas      find string less front and tail blanks
c          xxcase     adas      convert a string to upper or lower case 
c          xxrptn     adas      analyse an adf11 file partition block 
c
c author:  h. p. summers, university of strathclyde
c          ja7.08
c          tel. 0141-548-4196
c
c date:    04/10/06
c
c version: 1.1				date: 04/10/2006
c modified: hugh summers
c		- first edition.
c
c version: 1.2				date: 21/01/2007
c modified: Allan Whiteford
c		- Commented out warning about lack of iclass,
c                 all of the present ADAS files do not contain
c                 this information
c                 (first commit to CVS)
c
c version: 1.3				date: 08/03/2007
c modified: Hugh Summers
c		- adjustments for revised ecd formats.
c                 charge exchange donor/donor mass checks and
c                 dnr_ele, dnr_ams added to parameter return.
c
c-----------------------------------------------------------------------
      CHARACTER*12        DNR_ELE
      INTEGER             IBLMX,       ICLASS,      ICNCTV(NDCNCT)
      INTEGER             IDDIMD,      IDMAX,       IPTNA(NDPTNL,NDPTN)
      INTEGER             IPTNCA(NDPTNL,NDPTN,NDPTNC)
      INTEGER             IPTNLA(NDPTNL),           IS1MAX,      IS1MIN
      INTEGER             ISDIMD,      ISMAX,       ISPBR(ISDIMD)
      INTEGER             ISPPR(ISDIMD),            ISSTGR(ISDIMD)
      INTEGER             ITDIMD,      ITMAX,       IUNIT,       IZ0
      INTEGER             NCNCT,       NDCNCT,      NDPTN,       NDPTNC
      INTEGER             NDPTNL,      NPTN(NDPTNL)
      INTEGER             NPTNC(NDPTNL,NDPTN),      NPTNL
      LOGICAL             LPTN,        LRES,        LSTAN
      REAL*8              DDENS(IDDIMD),            DNR_AMS
      REAL*8              DRCOF(ISDIMD,ITDIMD,IDDIMD)
      REAL*8              DTEV(ITDIMD)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk