FORTRAN Generation
(/./ftp/cats/J/MNRAS/402/1729)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/402/1729 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-Apr-20
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/MNRAS/402/1729 JHK photometry of 36 Galactic globular clusters (Valenti+ 2010)
*================================================================================
*Near-infrared properties of 12 globular clusters towards the inner bulge
*of the galaxy.
*    Valenti E., Ferraro F.R., Origlia L.
*   <Mon. Not. R. Astron. Soc., 402, 1729-1739 (2010)>
*   =2010MNRAS.402.1729V
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! The Bulge Globular Cluster parameters for
                              all clusters (Paper I + Paper II)

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

C  Position composed of: GLON GLAT
      character*7   GlCl        ! Globular name
      character*1   n_GlCl      ! [*] Note on Name (1)
      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 distance
      real*4        X           ! (kpc) X Sun-centred coordinate
      real*4        Y           ! (kpc) Y Sun-centred coordinate
      real*4        Z           ! (kpc) Z Sun-centred coordinate
      real*4        E_B_V       ! (mag) B-V colour excess
      real*4        v_m_M_0     ! (mag) Deredenned distance modulus
      real*4        v_Fe_H_     ! ([-]) Metallicity [Fe/H] (2)
      real*4        v_M_H_      ! ([-]) Metallicity [M/H]
      real*4        JRC         ! (mag) ?=- Horizontal Branch Red Clump J magnitude
      real*4        HRC         ! (mag) ?=- Horizontal Branch Red Clump H magnitude
      real*4        KsRC        ! (mag) ?=- Horizontal Branch Red Clump Ks magnitude
      real*4        Jmag_B      ! (mag) ?=- Bump J magnitude
      real*4        Hmag_B      ! (mag) ?=- Bump H magnitude
      real*4        Kmag_B      ! (mag) ?=- Bump Ks magnitude
      real*4        Jmag_T      ! (mag) Tip J magnitude
      real*4        Hmag_T      ! (mag) ?=- Tip H magnitude
      real*4        Kmag_T      ! (mag) ?=- Tip Ks magnitude
      real*4        Mbol_B      ! (mag) ?=- RGB Bump bolometric magnitude (3)
      real*4        Mbol_T      ! (mag) ?=- Tip bolometric magnitude (3)
      character*12  CMD         ! Name of the file containing the CMD,
*                                   at http://www.bo.astro.it/~GC/ir_archive/
      integer*4     N           ! Number of stars with photometry in FileName
      character*11  FileName    ! Name of the file containing the JHK photometry,
*                                   in subdirectory phot
*Note (1): For all the clusters marked with (*) 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
*     at http://www.bo.astro.it/~GC/ir_archive/IRrelations.html)
*Note (2): [Fe/H] is in the Carretta & Gratton (1997, J/A+AS/121/95) scale.
*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=36)	! Number of records
      character*67 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 SOFI J magnitude
      real*4        Hmag        ! (mag) ? (?=0.000) SOFI H magnitude
      real*4        Kmag        ! (mag) ? (?=0.000) SOFI Ks 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,
*     Cl* HP 1 VFO NNNNN for HP1 cluster,
*     Cl* Liller 1 VFO NNNNN for Liller1 cluster,
*     Cl* Djorg N VFO NNNNN for Djorg clusters.

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

C  Loading file 'table1.dat'	! The Bulge Globular Cluster parameters for
*                              all clusters (Paper I + Paper II)

C  Format for file interpretation

    1 format(
     +  A7,A1,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,F5.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,
     +  A12,1X,I5,1X,A11)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,36
        read(1,'(A166)')ar__
        read(ar__,1)
     +  GlCl,n_GlCl,GLON,GLAT,dSun,RGC,X,Y,Z,E_B_V,v_m_M_0,v_Fe_H_,
     +  v_M_H_,JRC,HRC,KsRC,Jmag_B,Hmag_B,Kmag_B,Jmag_T,Hmag_T,Kmag_T,
     +  Mbol_B,Mbol_T,CMD,N,FileName
        if (idig(ar__(72:76)).EQ.0) JRC =  rNULL__
        if (idig(ar__(78:82)).EQ.0) HRC =  rNULL__
        if (idig(ar__(84:88)).EQ.0) KsRC =  rNULL__
        if (idig(ar__(90:94)).EQ.0) Jmag_B =  rNULL__
        if (idig(ar__(96:100)).EQ.0) Hmag_B =  rNULL__
        if (idig(ar__(102:106)).EQ.0) Kmag_B =  rNULL__
        if (idig(ar__(114:118)).EQ.0) Hmag_T =  rNULL__
        if (idig(ar__(120:124)).EQ.0) Kmag_T =  rNULL__
        if (idig(ar__(126:129)).EQ.0) Mbol_B =  rNULL__
        if (idig(ar__(131:135)).EQ.0) Mbol_T =  rNULL__
c    ..............Just test output...........
        write(6,1)
     +  GlCl,n_GlCl,GLON,GLAT,dSun,RGC,X,Y,Z,E_B_V,v_m_M_0,v_Fe_H_,
     +  v_M_H_,JRC,HRC,KsRC,Jmag_B,Hmag_B,Kmag_B,Jmag_T,Hmag_T,Kmag_T,
     +  Mbol_B,Mbol_T,CMD,N,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,F13.9,2X,F13.9)

C  Effective file loading

      open(unit=1,status='old',file=
     +'phot/*')
      write(6,*) '....Loading file: phot/*'
      do i__=1,36
        read(1,'(A67)')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