FORTRAN Generation
(/./ftp/cats/J/A_A/542/A68)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/542/A68 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-19
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/542/A68       NGC 3231, 7055 and 7127 BVRI photometry    (Paunzen+, 2012)
*================================================================================
*BVRI photometry of NGC 3231, NGC 7055, and NGC 7127.
*    Paunzen E., Hermansson L., Holmstroem P.
*   <Astron. Astrophys. 542, A68 (2012)>
*   =2012A&A...542A..68P
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Observed program stars of NGC 3231

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

      integer*4     Seq        (nr__) ! Stars number sorted after X and Y,
*                                   within the cluster
      real*4        Xpos       (nr__) ! (pix) X coordinate (scale 0.9"/pix)
      real*4        Ypos       (nr__) ! (pix) Y coordinate (scale 0.9"/pix)
      real*4        Bmag       (nr__) ! (mag) ?=- Johnson-Cousins B magnitude
      real*4        e_Bmag     (nr__) ! (mag) ?=- Error in B magnitude
      real*4        Vmag       (nr__) ! (mag) ?=- Johnson-Cousins V magnitude
      real*4        e_Vmag     (nr__) ! (mag) ?=- Error in V magnitude
      real*4        Rcmag      (nr__) ! (mag) ?=- Johnson-Cousins R magnitude
      real*4        e_Rcmag    (nr__) ! (mag) ?=- Error in R magnitude
      real*4        Icmag      (nr__) ! (mag) ?=- Johnson-Cousins I magnitude
      real*4        e_Icmag    (nr__) ! (mag) ?=- Error in I magnitude

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

C  Declarations for 'table2.dat'	! Observed program stars of NGC 7055

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

      integer*4     Seq_1      (nr__1) ! Stars number sorted after X and Y,
*                                   within the cluster
      real*4        Xpos_1     (nr__1) ! (pix) X coordinate (scale 0.9"/pix)
      real*4        Ypos_1     (nr__1) ! (pix) Y coordinate (scale 0.9"/pix)
      real*4        Bmag_1     (nr__1) ! (mag) ?=- Johnson-Cousins B magnitude
      real*4        e_Bmag_1   (nr__1) ! (mag) ?=- Error in B magnitude
      real*4        Vmag_1     (nr__1) ! (mag) ?=- Johnson-Cousins V magnitude
      real*4        e_Vmag_1   (nr__1) ! (mag) ?=- Error in V magnitude
      real*4        Rcmag_1    (nr__1) ! (mag) ?=- Johnson-Cousins R magnitude
      real*4        e_Rcmag_1  (nr__1) ! (mag) ?=- Error in R magnitude
      real*4        Icmag_1    (nr__1) ! (mag) ?=- Johnson-Cousins I magnitude
      real*4        e_Icmag_1  (nr__1) ! (mag) ?=- Error in I magnitude

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

C  Declarations for 'table3.dat'	! Observed program stars of NGC 7127

      integer*4 nr__2
      parameter (nr__2=288)	! Number of records
      character*69 ar__2  	! Full-size record

      integer*4     Seq_2      (nr__2) ! Stars number sorted after X and Y,
*                                   within the cluster
      real*4        Xpos_2     (nr__2) ! (pix) X coordinate (scale 0.9"/pix)
      real*4        Ypos_2     (nr__2) ! (pix) Y coordinate (scale 0.9"/pix)
      real*4        Bmag_2     (nr__2) ! (mag) ?=- Johnson-Cousins B magnitude
      real*4        e_Bmag_2   (nr__2) ! (mag) ?=- Error in B magnitude
      real*4        Vmag_2     (nr__2) ! (mag) ?=- Johnson-Cousins V magnitude
      real*4        e_Vmag_2   (nr__2) ! (mag) ?=- Error in V magnitude
      real*4        Rcmag_2    (nr__2) ! (mag) ?=- Johnson-Cousins R magnitude
      real*4        e_Rcmag_2  (nr__2) ! (mag) ?=- Error in R magnitude
      real*4        Icmag_2    (nr__2) ! (mag) ?=- Johnson-Cousins I magnitude
      real*4        e_Icmag_2  (nr__2) ! (mag) ?=- Error in I magnitude

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

C  Loading file 'table1.dat'	! Observed program stars of NGC 3231

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,39
        read(1,'(A69)')ar__
        read(ar__,1)
     +  Seq(i__),Xpos(i__),Ypos(i__),Bmag(i__),e_Bmag(i__),Vmag(i__),
     +  e_Vmag(i__),Rcmag(i__),e_Rcmag(i__),Icmag(i__),e_Icmag(i__)
        if (idig(ar__(19:24)).EQ.0) Bmag(i__) =  rNULL__
        if (idig(ar__(26:30)).EQ.0) e_Bmag(i__) =  rNULL__
        if (idig(ar__(32:37)).EQ.0) Vmag(i__) =  rNULL__
        if (idig(ar__(39:43)).EQ.0) e_Vmag(i__) =  rNULL__
        if (idig(ar__(45:50)).EQ.0) Rcmag(i__) =  rNULL__
        if (idig(ar__(52:56)).EQ.0) e_Rcmag(i__) =  rNULL__
        if (idig(ar__(58:63)).EQ.0) Icmag(i__) =  rNULL__
        if (idig(ar__(65:69)).EQ.0) e_Icmag(i__) =  rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Seq(i__),Xpos(i__),Ypos(i__),Bmag(i__),e_Bmag(i__),Vmag(i__),
     +  e_Vmag(i__),Rcmag(i__),e_Rcmag(i__),Icmag(i__),e_Icmag(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Observed program stars of NGC 7055

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,251
        read(1,'(A69)')ar__1
        read(ar__1,2)
     +  Seq_1(i__),Xpos_1(i__),Ypos_1(i__),Bmag_1(i__),e_Bmag_1(i__),
     +  Vmag_1(i__),e_Vmag_1(i__),Rcmag_1(i__),e_Rcmag_1(i__),
     +  Icmag_1(i__),e_Icmag_1(i__)
        if (idig(ar__1(19:24)).EQ.0) Bmag_1(i__) =  rNULL__
        if (idig(ar__1(26:30)).EQ.0) e_Bmag_1(i__) =  rNULL__
        if (idig(ar__1(32:37)).EQ.0) Vmag_1(i__) =  rNULL__
        if (idig(ar__1(39:43)).EQ.0) e_Vmag_1(i__) =  rNULL__
        if (idig(ar__1(45:50)).EQ.0) Rcmag_1(i__) =  rNULL__
        if (idig(ar__1(52:56)).EQ.0) e_Rcmag_1(i__) =  rNULL__
        if (idig(ar__1(58:63)).EQ.0) Icmag_1(i__) =  rNULL__
        if (idig(ar__1(65:69)).EQ.0) e_Icmag_1(i__) =  rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Seq_1(i__),Xpos_1(i__),Ypos_1(i__),Bmag_1(i__),e_Bmag_1(i__),
     +  Vmag_1(i__),e_Vmag_1(i__),Rcmag_1(i__),e_Rcmag_1(i__),
     +  Icmag_1(i__),e_Icmag_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Observed program stars of NGC 7127

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,288
        read(1,'(A69)')ar__2
        read(ar__2,3)
     +  Seq_2(i__),Xpos_2(i__),Ypos_2(i__),Bmag_2(i__),e_Bmag_2(i__),
     +  Vmag_2(i__),e_Vmag_2(i__),Rcmag_2(i__),e_Rcmag_2(i__),
     +  Icmag_2(i__),e_Icmag_2(i__)
        if (idig(ar__2(19:24)).EQ.0) Bmag_2(i__) =  rNULL__
        if (idig(ar__2(26:30)).EQ.0) e_Bmag_2(i__) =  rNULL__
        if (idig(ar__2(32:37)).EQ.0) Vmag_2(i__) =  rNULL__
        if (idig(ar__2(39:43)).EQ.0) e_Vmag_2(i__) =  rNULL__
        if (idig(ar__2(45:50)).EQ.0) Rcmag_2(i__) =  rNULL__
        if (idig(ar__2(52:56)).EQ.0) e_Rcmag_2(i__) =  rNULL__
        if (idig(ar__2(58:63)).EQ.0) Icmag_2(i__) =  rNULL__
        if (idig(ar__2(65:69)).EQ.0) e_Icmag_2(i__) =  rNULL__
c    ..............Just test output...........
        write(6,3)
     +  Seq_2(i__),Xpos_2(i__),Ypos_2(i__),Bmag_2(i__),e_Bmag_2(i__),
     +  Vmag_2(i__),e_Vmag_2(i__),Rcmag_2(i__),e_Rcmag_2(i__),
     +  Icmag_2(i__),e_Icmag_2(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