FORTRAN Generation
(/./ftp/cats/J/PASP/116/1012)

Conversion of standardized ReadMe file for file /./ftp/cats/J/PASP/116/1012 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-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/PASP/116/1012   A star catalog for the open cluster NGC 188   (Stetson+, 2004)
*================================================================================
*A star catalog for the open cluster NGC 188.
*    Stetson P.B., McClure R.D., Vandenberg D.A.
*   <Publ. Astron. Soc. Pac., 116, 1012-1030 (2004)>
*   =2004PASP..116.1012S
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'cat1.dat'	! Original photometry merged with previously
                              published photometry and memberships

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

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

      integer*4     SMV         ! Sequential ID number
      real*8        Xpos        ! (pix) X pixel coordinate (G1)
      real*8        Ypos        ! (pix) Y pixel coordinate (G1)
      real*4        Umag        ! (mag) ?=99.999 U magnitude
      real*4        e_Umag      ! (mag) ?=9.9999 U standard error of the mean
      integer*4     o_Umag      ! U number of measurements
      real*4        Bmag        ! (mag) ?=99.999 B magnitude
      real*4        e_Bmag      ! (mag) ?=9.9999 B standard error of the mean
      integer*4     o_Bmag      ! B number of measurements
      real*4        Vmag        ! (mag) ?=99.999 V magnitude
      real*4        e_Vmag      ! (mag) ?=9.9999 V standard error of the mean
      integer*4     o_Vmag      ! V number of measurements
      real*4        Rmag        ! (mag) ?=99.999 R magnitude
      real*4        e_Rmag      ! (mag) ?=9.9999 R standard error of the mean
      integer*4     o_Rmag      ! R number of measurements
      real*4        Imag        ! (mag) ?=99.999 I magnitude
      real*4        e_Imag      ! (mag) ?=9.9999 I standard error of the mean
      integer*4     o_Imag      ! I number of measurements
      integer*4     Memb        ! (%) ?=-9 Mean membership probability in %
      integer*4     Npm         ! Number of independent measures of the proper
*                                   motion
      integer*4     RAh         ! (h) Hour of right ascension (J2000.0)
      integer*4     RAm         ! (min) Minute of right ascension (J2000.0)
      real*4        RAs         ! (s) Second of right ascension (J2000.0)
      character*1   DE_         ! Sign of the declination (J2000.0)
      integer*4     DEd         ! (deg) Degree of declination (J2000.0)
      integer*4     DEm         ! (arcmin) Arcminute of declination (J2000.0)
      real*4        DEs         ! (arcsec) Arcsecond of declination (J2000.0)

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

C  Declarations for 'cat2.dat'	! Original CCD photometry based on 299 CCD frames

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

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

      integer*4     SMV_1       ! Sequential ID number
      real*8        Xpos_1      ! (pix) X pixel coordinate (G1)
      real*8        Ypos_1      ! (pix) Y pixel coordinate (G1)
      real*4        Bmag_1      ! (mag) ?=99.999 B magnitude
      real*4        e_Bmag_1    ! (mag) ?=9.9999 B standard error of the mean
      integer*4     o_Bmag_1    ! B number of measurements
      real*4        Vmag_1      ! (mag) V magnitude
      real*4        e_Vmag_1    ! (mag) ?=9.9999 V standard error of the mean
      integer*4     o_Vmag_1    ! V number of measurements
      real*4        Rmag_1      ! (mag) ?=99.999 R magnitude
      real*4        e_Rmag_1    ! (mag) ?=9.9999 R standard error of the mean
      integer*4     o_Rmag_1    ! R number of measurements
      real*4        Imag_1      ! (mag) ?=99.999 I magnitude
      real*4        e_Imag_1    ! (mag) ?=9.9999 I standard error of the mean
      integer*4     o_Imag_1    ! I number of measurements
      real*4        chi         ! CHI image-quality index
      real*4        VI          ! Variability index
      real*4        w_VI        ! Weight of variability index
      integer*4     RAh_1       ! (h) Hour of right ascension (J2000.0)
      integer*4     RAm_1       ! (min) Minute of right ascension (J2000.0)
      real*4        RAs_1       ! (s) Second of right ascension (J2000.0)
      character*1   DE__1       ! Sign of the declination (J2000.0)
      integer*4     DEd_1       ! (deg) Degree of declination (J2000.0)
      integer*4     DEm_1       ! (arcmin) Arcminute of declination (J2000.0)
      real*4        DEs_1       ! (arcsec) Arcsecond of declination (J2000.0)

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

C  Declarations for 'crossid.dat'	! Transit table relating previous star IDs to our
                              sequential IDs

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

      integer*4     SMV_2       ! Sequential ID number
      character*7   S62         ! Object number in Sandage, 1962ApJ...135..333S (1)
      integer*4     Sh65        ! ?=. Object number in Sharov, 1965SoSht.142...20S
      integer*4     C68         ! ?=. Object number in Cannon 1968, unpublished
*                                dissertation
      integer*4     UMK         ! ?=. Object number in Upgren, Mesrobian & Kerridge
*                                1972AJ.....77...74U (2)
      character*7   MT          ! Object number in McClure & Twarog
*                                1977ApJ...214..111M (3)
      character*6   E           ! Object number in Caputo et al.
*                                1990AJ.....99..261C (4)
      integer*4     PKM         ! ?=. Object number in Platais et al.
*                                2003, Cat. <J/AJ/126/2922> (5)
      integer*4     DGV         ! ?=. Object number in Dinescu et al.
*                                1996AJ....111.1205D (6)
      integer*4     S99         ! ?=. Object number in Sarajedini et al.
*                                1999AJ....118.2894S
      character*3   KS          ! Object number in Catalogued variables
      character*8   Name        ! Other name
*Note (1): I-NNN identified as NGC 188 1NNN in Simbad
*          II-NNN identified as NGC 188 2NNN in Simbad
*          III-NNN identified as NGC 188 3NNN in Simbad
*          A-P identified as Cl* NGC 188 San A in Simbad
*Note (2): Cl* NGC 188 UMK NNN in Simbad
*Note (3): NNN identified as Cl* NGC 188 MT NNN in Simbad
*          I-NNN identified as NGC 188 NNNN ;
*Note (4): I-ENNN identified as Cl* NGC 188 E I-NNN in Simbad
*          I-NNN identified as NGC 188 1NNN
*Note (5): Cl* NGC 188 PKM NNNN in Simbad
*Note (6): Cl* NGC 188 DGV NNNN in Simbad

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

C  Loading file 'cat1.dat'	! Original photometry merged with previously
*                              published photometry and memberships

C  Format for file interpretation

    1 format(
     +  I7,1X,F7.1,1X,F7.1,1X,F6.3,1X,F6.4,1X,I2,1X,F6.3,1X,F6.4,1X,
     +  I2,1X,F6.3,1X,F6.4,1X,I2,1X,F6.3,1X,F6.4,1X,I2,1X,F6.3,1X,
     +  F6.4,2X,I1,1X,I3,2X,I1,2X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,
     +  F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'cat1.dat')
      write(6,*) '....Loading file: cat1.dat'
      do i__=1,8012
        read(1,'(A140)')ar__
        read(ar__,1)
     +  SMV,Xpos,Ypos,Umag,e_Umag,o_Umag,Bmag,e_Bmag,o_Bmag,Vmag,
     +  e_Vmag,o_Vmag,Rmag,e_Rmag,o_Rmag,Imag,e_Imag,o_Imag,Memb,Npm,
     +  RAh,RAm,RAs,DE_,DEd,DEm,DEs
        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)
     +  SMV,Xpos,Ypos,Umag,e_Umag,o_Umag,Bmag,e_Bmag,o_Bmag,Vmag,
     +  e_Vmag,o_Vmag,Rmag,e_Rmag,o_Rmag,Imag,e_Imag,o_Imag,Memb,Npm,
     +  RAh,RAm,RAs,DE_,DEd,DEm,DEs
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'cat2.dat'	! Original CCD photometry based on 299 CCD frames

C  Format for file interpretation

    2 format(
     +  I7,1X,F7.1,1X,F7.1,1X,F6.3,1X,F6.4,2X,I2,1X,F6.3,1X,F6.4,2X,
     +  I2,1X,F6.3,1X,F6.4,2X,I2,1X,F6.3,1X,F6.4,2X,I2,1X,F6.3,1X,
     +  F6.3,3X,F4.1,2X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'cat2.dat')
      write(6,*) '....Loading file: cat2.dat'
      do i__=1,4863
        read(1,'(A141)')ar__1
        read(ar__1,2)
     +  SMV_1,Xpos_1,Ypos_1,Bmag_1,e_Bmag_1,o_Bmag_1,Vmag_1,e_Vmag_1,
     +  o_Vmag_1,Rmag_1,e_Rmag_1,o_Rmag_1,Imag_1,e_Imag_1,o_Imag_1,
     +  chi,VI,w_VI,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1
        RAdeg_1 = rNULL__
        DEdeg_1 = rNULL__
c  Derive coordinates RAdeg_1 and DEdeg_1 from input data
c  (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown)
        if(RAh_1 .GT. -180) RAdeg_1=RAh_1*15.
        if(RAm_1 .GT. -180) RAdeg_1=RAdeg_1+RAm_1/4.
        if(RAs_1 .GT. -180) RAdeg_1=RAdeg_1+RAs_1/240.
        if(DEd_1 .GE. 0) DEdeg_1=DEd_1
        if(DEm_1 .GE. 0) DEdeg_1=DEdeg_1+DEm_1/60.
        if(DEs_1 .GE. 0) DEdeg_1=DEdeg_1+DEs_1/3600.
        if(DE__1.EQ.'-'.AND.DEdeg_1.GE.0) DEdeg_1=-DEdeg_1
c    ..............Just test output...........
        write(6,2)
     +  SMV_1,Xpos_1,Ypos_1,Bmag_1,e_Bmag_1,o_Bmag_1,Vmag_1,e_Vmag_1,
     +  o_Vmag_1,Rmag_1,e_Rmag_1,o_Rmag_1,Imag_1,e_Imag_1,o_Imag_1,
     +  chi,VI,w_VI,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'crossid.dat'	! Transit table relating previous star IDs to our
*                              sequential IDs

C  Format for file interpretation

    3 format(
     +  I7,2X,A7,2X,I2,2X,I3,2X,I3,2X,A7,2X,A6,2X,I4,2X,I4,2X,I4,2X,
     +  A3,1X,A8)

C  Effective file loading

      open(unit=1,status='old',file=
     +'crossid.dat')
      write(6,*) '....Loading file: crossid.dat'
      do i__=1,7894
        read(1,'(A79)')ar__2
        read(ar__2,3)SMV_2,S62,Sh65,C68,UMK,MT,E,PKM,DGV,S99,KS,Name
        if (Sh65 .EQ. 46) Sh65 =  iNULL__
        if (C68 .EQ. 46) C68 =  iNULL__
        if (UMK .EQ. 46) UMK =  iNULL__
        if (PKM .EQ. 46) PKM =  iNULL__
        if (DGV .EQ. 46) DGV =  iNULL__
        if (S99 .EQ. 46) S99 =  iNULL__
c    ..............Just test output...........
        write(6,3)SMV_2,S62,Sh65,C68,UMK,MT,E,PKM,DGV,S99,KS,Name
c    .......End.of.Just test output...........
      end do
      close(1)

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