FORTRAN Generation
(/./ftp/cats/J/AJ/133/1287)

Conversion of standardized ReadMe file for file /./ftp/cats/J/AJ/133/1287 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 2024-Mar-29
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/AJ/133/1287  JHK photometry of 24 Galactic globular clusters  (Valenti+, 2007)
*================================================================================
*Near-infrared properties of 24 globular clusters in the Galactic Bulge.
*    Valenti E., Ferraro F.R., Origlia L.
*   <Astron. J., 133, 1287-1301 (2007)>
*   =2007AJ....133.1287V
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! The Bulge Globular Cluster parameters

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

C  Position composed of: GLON GLAT
      character*7   Name        ! Cluster name
      real*4        GLON        ! (deg) [-15/21] Galactic longitude
      real*4        GLAT        ! (deg) Galactic latitude
      real*4        dsun        ! (kpc) Heliocentric distance
      real*4        RGC         ! (kpc) Galactocentric radius
      real*4        X           ! (kpc) Distance along X axis (galactic)
      real*4        Y           ! (kpc) Distance along Y axis (galactic)
      real*4        Z           ! (kpc) Distance along Z axis (galactic)
      real*4        E_B_V       ! (mag) Redenning
      real*4        v_m_M_0     ! (mag) Distance modulus
      real*4        v_Fe_H_     ! ([-]) Metallicity (2) (1)
      real*4        v_M_H_      ! ([-]) Metal abundance (2)
      real*4        JRC         ! (mag) ?=- HB red clump J magnitude
      real*4        HRC         ! (mag) ?=- HB red clump H magnitude
      real*4        KRC         ! (mag) ?=- HB red clump K magnitude
      real*4        JBump       ! (mag) ?=- RGB Bump J magnitude
      real*4        HBump       ! (mag) ?=- RGB Bump H magnitude
      real*4        KBump       ! (mag) ?=- RGB Bump K magnitude
      real*4        JTip        ! (mag) Tip J magnitude
      real*4        HTip        ! (mag) ?=- Tip H magnitude
      real*4        KTip        ! (mag) ?=- Tip K magnitude
      real*4        MBolBump    ! (10-7W) ?=- RGB Bump bolometric luminosity (3)
      real*4        MBolTip     ! (10-7W) ?=- Tip bolometric luminosity (3)
      character*11  FileName    ! Name of the file with individual photometry
*                                   in subdirectory phot
*Note (1): [Fe/H] is in the Carretta & Gratton (1997, Cat. J/A+AS/121/95) scale
*Note (2): For NGC6256, NGC6273, NGC6293, NGC6553 and NGC6401 the
*     metallicity estimates ([Fe/H] and [M/H]) have been derived 
*     by using the empirical method of Ferraro, Valenti & Origlia
*     (2006ApJ...649..243F; see also IR relations).
*Note (3): The Bolometric magnitudes of the RGB Bump and Tip have been
*     derived by using the  bolometric corrections for Population II giants
*     computed by Montegriffo et al. (1998MNRAS.297..872M), and by adopting
*     the reddening and distance values listed in Table 1 and the extinction
*     coefficients of Savage & Mathis (1979ARA&A..17...73S).

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

C  Declarations for 'phot/*'	! Individual JHK photometry

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     Seq         ! Sequential number within the cluster (1)
      real*4        Jmag        ! (mag) ?=0.000 J magnitude
      real*4        Hmag        ! (mag) ? (?=0.000) H magnitude
      real*4        Kmag        ! (mag) ? (?=0.000) K magnitude
      real*8        RAdeg       ! (deg) Right ascension in decimal degrees (J2000)
      real*8        DEdeg       ! (deg) Declination in decimal degrees (J2000)
*Note (1): Stars are identified as
*     CL* NGC NNNN VFO NNNNN for NGC clusters,
*     Cl* TERZAN N VFO NNNNN for Terzan clusters.

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

C  Loading file 'table1.dat'	! The Bulge Globular Cluster parameters

C  Format for file interpretation

    1 format(
     +  A7,1X,F6.2,1X,F6.2,1X,F4.1,1X,F3.1,1X,F4.1,1X,F4.1,1X,F5.2,
     +  F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,
     +  1X,F5.2,1X,F5.2,1X,F5.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F5.2,1X,A11)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,24
        read(1,'(A144)')ar__
        read(ar__,1)
     +  Name,GLON,GLAT,dsun,RGC,X,Y,Z,E_B_V,v_m_M_0,v_Fe_H_,v_M_H_,
     +  JRC,HRC,KRC,JBump,HBump,KBump,JTip,HTip,KTip,MBolBump,MBolTip,
     +  FileName
        if (idig(ar__(71:75)).EQ.0) JRC =  rNULL__
        if (idig(ar__(77:81)).EQ.0) HRC =  rNULL__
        if (idig(ar__(83:87)).EQ.0) KRC =  rNULL__
        if (idig(ar__(89:93)).EQ.0) JBump =  rNULL__
        if (idig(ar__(95:99)).EQ.0) HBump =  rNULL__
        if (idig(ar__(101:105)).EQ.0) KBump =  rNULL__
        if (idig(ar__(113:116)).EQ.0) HTip =  rNULL__
        if (idig(ar__(118:121)).EQ.0) KTip =  rNULL__
        if (idig(ar__(123:126)).EQ.0) MBolBump =  rNULL__
        if (idig(ar__(128:132)).EQ.0) MBolTip =  rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Name,GLON,GLAT,dsun,RGC,X,Y,Z,E_B_V,v_m_M_0,v_Fe_H_,v_M_H_,
     +  JRC,HRC,KRC,JBump,HBump,KBump,JTip,HTip,KTip,MBolBump,MBolTip,
     +  FileName
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'phot/*'	! Individual JHK photometry

C  Format for file interpretation

    2 format(3X,I5,3X,F6.3,3X,F6.3,3X,F6.3,4X,F12.8,3X,F12.8)

C  Effective file loading

      open(unit=1,status='old',file=
     +'phot/*')
      write(6,*) '....Loading file: phot/*'
      do i__=1,24
        read(1,'(A66)')ar__1
        read(ar__1,2)Seq,Jmag,Hmag,Kmag,RAdeg,DEdeg
        if(ar__1(21:26) .EQ. '') Hmag = rNULL__
        if(ar__1(30:35) .EQ. '') Kmag = rNULL__
c    ..............Just test output...........
        write(6,2)Seq,Jmag,Hmag,Kmag,RAdeg,DEdeg
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