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 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/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      (nr__) ! (deg) Right Ascension J2000.0
      real*8        DEdeg      (nr__) ! (deg)     Declination J2000.0
C  ---------------------------------- ! (position vector(s) in degrees)

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

      integer*4     SMV_1      (nr__1) ! Sequential ID number
      real*8        Xpos_1     (nr__1) ! (pix) X pixel coordinate (G1)
      real*8        Ypos_1     (nr__1) ! (pix) Y pixel coordinate (G1)
      real*4        Bmag_1     (nr__1) ! (mag) ?=99.999 B magnitude
      real*4        e_Bmag_1   (nr__1) ! (mag) ?=9.9999 B standard error of the mean
      integer*4     o_Bmag_1   (nr__1) ! B number of measurements
      real*4        Vmag_1     (nr__1) ! (mag) V magnitude
      real*4        e_Vmag_1   (nr__1) ! (mag) ?=9.9999 V standard error of the mean
      integer*4     o_Vmag_1   (nr__1) ! V number of measurements
      real*4        Rmag_1     (nr__1) ! (mag) ?=99.999 R magnitude
      real*4        e_Rmag_1   (nr__1) ! (mag) ?=9.9999 R standard error of the mean
      integer*4     o_Rmag_1   (nr__1) ! R number of measurements
      real*4        Imag_1     (nr__1) ! (mag) ?=99.999 I magnitude
      real*4        e_Imag_1   (nr__1) ! (mag) ?=9.9999 I standard error of the mean
      integer*4     o_Imag_1   (nr__1) ! I number of measurements
      real*4        chi        (nr__1) ! CHI image-quality index
      real*4        VI         (nr__1) ! Variability index
      real*4        w_VI       (nr__1) ! Weight of variability index
      integer*4     RAh_1      (nr__1) ! (h) Hour of right ascension (J2000.0)
      integer*4     RAm_1      (nr__1) ! (min) Minute of right ascension (J2000.0)
      real*4        RAs_1      (nr__1) ! (s) Second of right ascension (J2000.0)
      character*1   DE__1      (nr__1) ! Sign of the declination (J2000.0)
      integer*4     DEd_1      (nr__1) ! (deg) Degree of declination (J2000.0)
      integer*4     DEm_1      (nr__1) ! (arcmin) Arcminute of declination (J2000.0)
      real*4        DEs_1      (nr__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      (nr__2) ! Sequential ID number
      character*7   S62        (nr__2) ! Object number in Sandage, 1962ApJ...135..333S (1)
      integer*4     Sh65       (nr__2) ! ?=. Object number in Sharov, 1965SoSht.142...20S
      integer*4     C68        (nr__2) ! ?=. Object number in Cannon 1968, unpublished
*                                dissertation
      integer*4     UMK        (nr__2) ! ?=. Object number in Upgren, Mesrobian & Kerridge
*                                1972AJ.....77...74U (2)
      character*7   MT         (nr__2) ! Object number in McClure & Twarog
*                                1977ApJ...214..111M (3)
      character*6   E          (nr__2) ! Object number in Caputo et al.
*                                1990AJ.....99..261C (4)
      integer*4     PKM        (nr__2) ! ?=. Object number in Platais et al.
*                                2003, Cat. <J/AJ/126/2922> (5)
      integer*4     DGV        (nr__2) ! ?=. Object number in Dinescu et al.
*                                1996AJ....111.1205D (6)
      integer*4     S99        (nr__2) ! ?=. Object number in Sarajedini et al.
*                                1999AJ....118.2894S
      character*3   KS         (nr__2) ! Object number in Catalogued variables
      character*8   Name       (nr__2) ! 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(i__),Xpos(i__),Ypos(i__),Umag(i__),e_Umag(i__),
     +  o_Umag(i__),Bmag(i__),e_Bmag(i__),o_Bmag(i__),Vmag(i__),
     +  e_Vmag(i__),o_Vmag(i__),Rmag(i__),e_Rmag(i__),o_Rmag(i__),
     +  Imag(i__),e_Imag(i__),o_Imag(i__),Memb(i__),Npm(i__),RAh(i__),
     +  RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__)
        RAdeg(i__) = rNULL__
        DEdeg(i__) = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh(i__) .GT. -180) RAdeg(i__)=RAh(i__)*15.
        if(RAm(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAm(i__)/4.
        if(RAs(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAs(i__)/240.
        if(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
        if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DEs(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs(i__)/3600.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  SMV(i__),Xpos(i__),Ypos(i__),Umag(i__),e_Umag(i__),
     +  o_Umag(i__),Bmag(i__),e_Bmag(i__),o_Bmag(i__),Vmag(i__),
     +  e_Vmag(i__),o_Vmag(i__),Rmag(i__),e_Rmag(i__),o_Rmag(i__),
     +  Imag(i__),e_Imag(i__),o_Imag(i__),Memb(i__),Npm(i__),RAh(i__),
     +  RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
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(i__),Xpos_1(i__),Ypos_1(i__),Bmag_1(i__),e_Bmag_1(i__),
     +  o_Bmag_1(i__),Vmag_1(i__),e_Vmag_1(i__),o_Vmag_1(i__),
     +  Rmag_1(i__),e_Rmag_1(i__),o_Rmag_1(i__),Imag_1(i__),
     +  e_Imag_1(i__),o_Imag_1(i__),chi(i__),VI(i__),w_VI(i__),
     +  RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),DEd_1(i__),
     +  DEm_1(i__),DEs_1(i__)
        RAdeg_1(i__) = rNULL__
        DEdeg_1(i__) = 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(i__) .GT. -180) RAdeg_1(i__)=RAh_1(i__)*15.
        if(RAm_1(i__) .GT. -180) RAdeg_1(i__)=RAdeg_1(i__)+RAm_1(i__)/4.
        if(RAs_1(i__) .GT. -180) RAdeg_1(i__)=RAdeg_1(i__)+RAs_1(i__)/240.
        if(DEd_1(i__) .GE. 0) DEdeg_1(i__)=DEd_1(i__)
        if(DEm_1(i__) .GE. 0) DEdeg_1(i__)=DEdeg_1(i__)+DEm_1(i__)/60.
        if(DEs_1(i__) .GE. 0) DEdeg_1(i__)=DEdeg_1(i__)+DEs_1(i__)/3600.
        if(DE__1(i__).EQ.'-'.AND.DEdeg_1(i__).GE.0) DEdeg_1(i__)=-DEdeg_1(i__)
c    ..............Just test output...........
        write(6,2)
     +  SMV_1(i__),Xpos_1(i__),Ypos_1(i__),Bmag_1(i__),e_Bmag_1(i__),
     +  o_Bmag_1(i__),Vmag_1(i__),e_Vmag_1(i__),o_Vmag_1(i__),
     +  Rmag_1(i__),e_Rmag_1(i__),o_Rmag_1(i__),Imag_1(i__),
     +  e_Imag_1(i__),o_Imag_1(i__),chi(i__),VI(i__),w_VI(i__),
     +  RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),DEd_1(i__),
     +  DEm_1(i__),DEs_1(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg_1(i__),DEdeg_1(i__)
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(i__),S62(i__),Sh65(i__),C68(i__),UMK(i__),MT(i__),
     +  E(i__),PKM(i__),DGV(i__),S99(i__),KS(i__),Name(i__)
        if (Sh65(i__) .EQ. 46) Sh65(i__) =  iNULL__
        if (C68(i__) .EQ. 46) C68(i__) =  iNULL__
        if (UMK(i__) .EQ. 46) UMK(i__) =  iNULL__
        if (PKM(i__) .EQ. 46) PKM(i__) =  iNULL__
        if (DGV(i__) .EQ. 46) DGV(i__) =  iNULL__
        if (S99(i__) .EQ. 46) S99(i__) =  iNULL__
c    ..............Just test output...........
        write(6,3)
     +  SMV_2(i__),S62(i__),Sh65(i__),C68(i__),UMK(i__),MT(i__),
     +  E(i__),PKM(i__),DGV(i__),S99(i__),KS(i__),Name(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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