FORTRAN Generation
(/./ftp/cats/J/ApJ/658/1203)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/658/1203 into FORTRAN code for loading all data files into arrays.

Note that special values are assigned to unknown or unspecified numbers (also called NULL numbers); when necessary, the coordinate components making up the right ascension and declination are converted into floating-point numbers representing these angles in degrees.



      program load_ReadMe
C=============================================================================
C  F77-compliant program generated by readme2f_1.81 (2015-09-23), on 2024-Apr-17
C=============================================================================
*  This code was generated from the ReadMe file documenting a catalogue
*  according to the "Standard for Documentation of Astronomical Catalogues"
*  currently in use by the Astronomical Data Centers (CDS, ADC, A&A)
*  (see full documentation at URL http://vizier.u-strasbg.fr/doc/catstd.htx)
*  Please report problems or questions to   
C=============================================================================

      implicit none
*  Unspecified or NULL values, generally corresponding to blank columns,
*  are assigned one of the following special values:
*     rNULL__    for unknown or NULL floating-point values
*     iNULL__    for unknown or NULL   integer      values
      real*4     rNULL__
      integer*4  iNULL__
      parameter  (rNULL__=--2147483648.)  	! NULL real number
      parameter  (iNULL__=(-2147483647-1))	! NULL int  number
      integer    idig			! testing NULL number

C=============================================================================
Cat. J/ApJ/658/1203      Nitrogen-enhanced metal-poor stars       (Johnson+, 2007)
*================================================================================
*A search for nitrogen-enhanced metal-poor stars.
*    Johnson J.A., Herwig F., Beers T.C., Christlieb N.
*   <Astrophys. J., 658, 1203-1216 (2007)>
*   =2007ApJ...658.1203J
C=============================================================================

C  Internal variables

      integer*4 i__

c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

C  Declarations for 'table2.dat'	! Photometry data

      integer*4 nr__
      parameter (nr__=29)	! Number of records
      character*61 ar__   	! Full-size record

      character*12  Name       (nr__) ! Star name
      real*4        Vmag       (nr__) ! (mag) V magnitude
      real*4        B_V        (nr__) ! (mag) ?=- B-V colour index
      real*4        U_B        (nr__) ! (mag) ?=- U-B colour index
      real*4        V_R        (nr__) ! (mag) ?=- V-R colour index
      real*4        V_I        (nr__) ! (mag) ?=- V-I colour index
      real*4        V_J        (nr__) ! (mag) ?=- V-J colour index
      real*4        V_K        (nr__) ! (mag) ?=- V-K colour index
      real*4        E_B_V      (nr__) ! (mag) Galactic colour excess

c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

C  Declarations for 'table10.dat'	! Additional literature values

      integer*4 nr__1
      parameter (nr__1=36)	! Number of records
      character*81 ar__1  	! Full-size record

      character*1   Sample     (nr__1) ! [123] Sample (1)
      character*13  Name_1     (nr__1) ! Star name
      real*4        logeC      (nr__1) ! ([-]) C abundance (H=12)
      real*4        logeN      (nr__1) ! ([-]) N abundance (H=12)
      real*4        v_Fe_H_    (nr__1) ! ([Sun]) Metallicity
      real*4        v_C_N_     (nr__1) ! ([Sun]) Abundance, C/N
      character*39  Ref        (nr__1) ! Reference for abundances
      character*3   s_el       (nr__1) ! [Yes/No] s-process element rich star ?
*Note (1): Flag as follows:
*      1 = Original Literature Sample
*      2 = New and Updated Literature Sample
*      3 = Nitrogen-rich Stars

C=============================================================================

C  Loading file 'table2.dat'	! Photometry data

C  Format for file interpretation

    1 format(
     +  A12,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F5.3,1X,F5.3,1X,F5.3,
     +  1X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,29
        read(1,'(A61)')ar__
        read(ar__,1)
     +  Name(i__),Vmag(i__),B_V(i__),U_B(i__),V_R(i__),V_I(i__),
     +  V_J(i__),V_K(i__),E_B_V(i__)
        if (idig(ar__(21:25)).EQ.0) B_V(i__) =  rNULL__
        if (idig(ar__(27:32)).EQ.0) U_B(i__) =  rNULL__
        if (idig(ar__(34:38)).EQ.0) V_R(i__) =  rNULL__
        if (idig(ar__(40:44)).EQ.0) V_I(i__) =  rNULL__
        if (idig(ar__(46:50)).EQ.0) V_J(i__) =  rNULL__
        if (idig(ar__(52:56)).EQ.0) V_K(i__) =  rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Name(i__),Vmag(i__),B_V(i__),U_B(i__),V_R(i__),V_I(i__),
     +  V_J(i__),V_K(i__),E_B_V(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

C=============================================================================

C  Loading file 'table10.dat'	! Additional literature values

C  Format for file interpretation

    2 format(A1,1X,A13,1X,F4.2,1X,F4.2,1X,F5.2,1X,F5.2,1X,A39,1X,A3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table10.dat')
      write(6,*) '....Loading file: table10.dat'
      do i__=1,36
        read(1,'(A81)')ar__1
        read(ar__1,2)
     +  Sample(i__),Name_1(i__),logeC(i__),logeN(i__),v_Fe_H_(i__),
     +  v_C_N_(i__),Ref(i__),s_el(i__)
c    ..............Just test output...........
        write(6,2)
     +  Sample(i__),Name_1(i__),logeC(i__),logeN(i__),v_Fe_H_(i__),
     +  v_C_N_(i__),Ref(i__),s_el(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

C=============================================================================
      stop
      end

C Locate position of first digit in string; or return 0
      integer function idig(c)
      character*(*) c
      character*1 c1
      integer lc,i
      lc=len(c)
      idig=0
      do i=1,lc
         if(c(i:i).ne.' ') go to 1
      end do
    1 if(i.gt.lc) return
      c1=c(i:i)
      if(c1.eq.'.'.or.c1.eq.'-'.or.c1.eq.'+') i=i+1
      if(i.gt.lc) return
      c1=c(i:i)
      if(c1.ge.'0'.and.c1.le.'9') idig=i
      return
      end