FORTRAN Generation
(/./ftp/cats/J/A_A/484/721)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/484/721 into FORTRAN code for reading data files line by line.

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 2026-Oct-14
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/A+A/484/721     HES survey. IV. Candidate metal-poor stars (Christlieb+, 2008)
*================================================================================
*The stellar content of the Hamburg/ESO survey.
*IV. Selection of candidate metal-poor stars.
*    Christlieb N., Scharck T., Frebel A., Beers T.C., Wisotzki L., Reimers D.
*   <Astron. Astrophys. 484, 721 (2008)>
*   =2008A&A...484..721C
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'hescan.dat'	! HES metal-poor candidates (table A1)

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

C  J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg       ! (deg) Right Ascension J2000
      real*8        DEdeg       ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      character*9   HE          ! HE designation (HE HHMM-DDMM)
      character*18  HESid       ! Unique HES identifier (HENNNNNNmNNNNNNbNNNN)
      integer*4     RAh         ! (h) Right ascension (J2000)
      integer*4     RAm         ! (min) Right ascension (J2000)
      real*4        RAs         ! (s) Right ascension (J2000)
      character*1   DE_         ! Declination sign (J2000)
      integer*4     DEd         ! (deg) Declination (J2000)
      integer*4     DEm         ! (arcmin) Declination (J2000)
      integer*4     DEs         ! (arcsec) Declination (J2000)
      integer*4     Field       ! ESO-SERC field number
      character*6   Type        ! Object type (stars or bright)
      real*4        Bmag        ! (mag) Photographic B magnitude (from HES)
      real*4        E_B_V       ! (mag) Color excess
      real*4        v_B_V_0     ! (mag) De-reddened B-V color index
      real*4        v_J_K_0     ! (mag) ? De-reddened J-K color index
      real*4        v_V_K_0     ! (mag) ? De-reddened V-K color index
      integer*4     S_N_B       ! Average S/N of HES spectrum in B_J_ band
      integer*4     S_N_Ca      ! Average S/N of HES spectrum in Ca H and K
*                                   region (390-400nm)
      real*4        KP          ! (0.1nm) KP index (CaII line) measured in HES spectrum
      real*4        e_KP        ! (0.1nm) 1-{sigma} uncertainty of KP index
      real*4        GP          ! (0.1nm) GP index (CH G-band) measured in HES spectrum
      integer*4     f1          ! [0,1] KP/(B-V)0 selection flag
      integer*4     f2          ! [0,1] KP/(J-K)0 selection flag
      integer*4     f3          ! [0,1] Ca K non-detection selection flag
      character*4   Class       ! Candidate class (mpca, unid, mpcb or mpcc) (1)
      real*4        v_Fe_H_K    ! ? Estimate of Fe based on (B-V)0 and KPHES
      real*4        v_Fe_H_R    ! ? Estimate of Fe abundance based on (J-K)0
*                                    and KPHES
      real*4        v_C_Fe_R    ! ? Estimate of C abundance, based on GPHES
*                                    and KPHES
*Note (1): Classes are defined as follows:
*    mpca = a the spectrum clearly shows no CaII K line; 
*    unid = it is unclear if a CaII K line is visible in the spectrum or not;
*    mpcb = a weak CaII K line is visible; 
*    mpcc = a significant CaII K line appears against the continuum.

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

C  Declarations for 'crossid.dat'	! Cross-identification with other surveys (table A2)

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

      character*18  HESid_1     ! Unique HES identifier (HENNNNNNmNNNNNNbNNNN)
      character*9   HE_1        ! HE designation (HE HHMM-DDMM)
      character*11  BPS         ! CS/BS identifier (BPS AA NNNNN-NNNN in Simbad)
      character*20  ONames      ! Other names

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

C  Loading file 'hescan.dat'	! HES metal-poor candidates (table A1)

C  Format for file interpretation

    1 format(
     +  3X,A9,3X,A18,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,1X,I3,
     +  1X,A6,1X,F4.1,1X,F4.2,1X,F4.2,1X,F5.2,1X,F5.2,1X,I2,1X,I2,1X,
     +  F4.1,1X,F4.1,2X,F5.1,1X,I1,1X,I1,1X,I1,1X,A4,1X,F4.1,1X,F4.1,
     +  1X,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'hescan.dat')
      write(6,*) '....Loading file: hescan.dat'
      do i__=1,20271
        read(1,'(A141)')ar__
        read(ar__,1)
     +  HE,HESid,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Field,Type,Bmag,E_B_V,
     +  v_B_V_0,v_J_K_0,v_V_K_0,S_N_B,S_N_Ca,KP,e_KP,GP,f1,f2,f3,
     +  Class,v_Fe_H_K,v_Fe_H_R,v_C_Fe_R
        if(ar__(82:86) .EQ. '') v_J_K_0 = rNULL__
        if(ar__(88:92) .EQ. '') v_V_K_0 = rNULL__
        if(ar__(128:131) .EQ. '') v_Fe_H_K = rNULL__
        if(ar__(133:136) .EQ. '') v_Fe_H_R = rNULL__
        if(ar__(138:141) .EQ. '') v_C_Fe_R = rNULL__
        RAdeg = rNULL__
        DEdeg = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh .GT. -180) RAdeg=RAh*15.
        if(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
        if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  HE,HESid,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Field,Type,Bmag,E_B_V,
     +  v_B_V_0,v_J_K_0,v_V_K_0,S_N_B,S_N_Ca,KP,e_KP,GP,f1,f2,f3,
     +  Class,v_Fe_H_K,v_Fe_H_R,v_C_Fe_R
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'crossid.dat'	! Cross-identification with other surveys (table A2)

C  Format for file interpretation

    2 format(2X,A18,4X,A9,1X,A11,1X,A20)

C  Effective file loading

      open(unit=1,status='old',file=
     +'crossid.dat')
      write(6,*) '....Loading file: crossid.dat'
      do i__=1,276
        read(1,'(A66)')ar__1
        read(ar__1,2)HESid_1,HE_1,BPS,ONames
c    ..............Just test output...........
        write(6,2)HESid_1,HE_1,BPS,ONames
c    .......End.of.Just test output...........
      end do
      close(1)

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