FORTRAN Generation
(/./ftp/cats/J/AJ/159/246)

Conversion of standardized ReadMe file for file /./ftp/cats/J/AJ/159/246 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 2026-Oct-10
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/159/246  WIYN open cluster study. LXXX. Photometry of NGC 7142 (Sun+, 2020)
*================================================================================
*WIYN open cluster study LXXX: HDI CCD UBVRI photometry of the old open cluster
*NGC 7142 and comparison to M67.
*    Sun Q., Deliyannis C.P., Twarog B.A., Anthony-twarog B.J., Steinhauer A.
*   <Astron. J., 159, 246-246 (2020)>
*   =2020AJ....159..246S    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table3.dat'	! Photometry for stars in NGC 7142

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

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

      integer*4     WOCS        ! [1001/429028] WOCS identifier (1)
      real*8        Xpos        ! (pix) [-74/4099] X coordinate
      real*8        Ypos        ! (pix) [2/4112] Y coordinate
      integer*4     RAh         ! (h) [21] Hour of right ascension (J2000)
      integer*4     RAm         ! (min) [42/47] Minute of right ascension (J2000)
      real*4        RAs         ! (s) Second of right ascension (J2000)
      character*1   DE_         ! [+] Sign of declination (J2000)
      integer*4     DEd         ! (deg) [65/66] Degree of declination (J2000)
      integer*4     DEm         ! (arcmin) Arcminute of declination (J2000)
      real*4        DEs         ! (arcsec) Arcsecond of declination (J2000)
      real*4        Umag        ! (mag) [10.6/20.4]? U magnitude ({lambda}~360nm)
      real*4        e_Umag      ! (mag) [0.002/0.1]? Negative error on Umag
      real*4        E_Umag_1    ! (mag) [0/0.2]? Positive error on Umag
      real*4        Bmag        ! (mag) [10.6/22]? B magnitude ({lambda}~450nm)
      real*4        e_Bmag      ! (mag) [0.002/0.1]? Negative error on Bmag
      real*4        E_Bmag_1    ! (mag) [0/0.3]? Positive error on Bmag
      real*4        Vmag        ! (mag) [10/21.8] V magnitude ({lamba}~555nm)
      real*4        e_Vmag      ! (mag) [0.002/0.1] Negative error on Vmag
      real*4        E_Vmag_1    ! (mag) [0/0.6] Positive error on Vmag
      real*4        Rmag        ! (mag) [9.2/20.7]? R magnitude ({lambda}~660nm)
      real*4        e_Rmag      ! (mag) [0.002/0.1]? Negative error on Rmag
      real*4        E_Rmag_1    ! (mag) [0/0.3]? Positive error on Rmag
      real*4        Imag        ! (mag) [8.5/19.9]? I magnitude ({lambda}~0.87{mu}m)
      real*4        e_Imag      ! (mag) [0.002/0.1]? Negative error on Imag
      real*4        E_Imag_1    ! (mag) [0/0.4]? Negative error on Imag
      integer*4     NU          ! [0/10] Number of observation for U band
      integer*4     NB          ! [0/13] Number of observation for B band
      integer*4     NV          ! [1/13] Number of observation for V band
      integer*4     NR          ! [0/13] Number of observation for R band
      integer*4     NI          ! [0/13] Number of observation for I band
      real*4        U_B         ! (mag) [-0.15/2.47]? U-B color
      real*4        U_V         ! (mag) [-0.09/4.61]? U-V color
      real*4        U_R         ! (mag) [0.37/6.02]? U-R color
      real*4        U_I         ! (mag) [0.54/7.53]? U-I color
      real*4        B_V         ! (mag) [0.06/2.23]? B-V color
      real*4        B_R         ! (mag) [0.26/3.97]? B-R color
      real*4        B_I         ! (mag) [0.43/5.87]? B-I color
      real*4        V_R         ! (mag) [0.07/4.01]? V-R color
      real*4        V_I         ! (mag) [0.24/6.84]? V-I color
      real*4        R_I         ! (mag) [0.09/2.84]? R-I color
*Note (1): See Deliyannis+, 2020 (in preparation).

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

C  Loading file 'table3.dat'	! Photometry for stars in NGC 7142

C  Format for file interpretation

    1 format(
     +  I6,1X,F8.3,1X,F8.3,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,
     +  1X,F6.3,1X,F5.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F5.3,1X,F6.3,1X,
     +  F5.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F5.3,
     +  1X,I2,1X,I2,1X,I2,1X,I2,1X,I2,1X,F6.3,1X,F6.3,1X,F5.3,1X,F5.3,
     +  1X,F5.3,1X,F5.3,1X,F5.3,1X,F5.3,1X,F5.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,8702
        read(1,'(A220)')ar__
        read(ar__,1)
     +  WOCS,Xpos,Ypos,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Umag,e_Umag,
     +  E_Umag_1,Bmag,e_Bmag,E_Bmag_1,Vmag,e_Vmag,E_Vmag_1,Rmag,
     +  e_Rmag,E_Rmag_1,Imag,e_Imag,E_Imag_1,NU,NB,NV,NR,NI,U_B,U_V,
     +  U_R,U_I,B_V,B_R,B_I,V_R,V_I,R_I
        if(ar__(50:55) .EQ. '') Umag = rNULL__
        if(ar__(57:61) .EQ. '') e_Umag = rNULL__
        if(ar__(63:67) .EQ. '') E_Umag_1 = rNULL__
        if(ar__(69:74) .EQ. '') Bmag = rNULL__
        if(ar__(76:80) .EQ. '') e_Bmag = rNULL__
        if(ar__(82:86) .EQ. '') E_Bmag_1 = rNULL__
        if(ar__(107:112) .EQ. '') Rmag = rNULL__
        if(ar__(114:118) .EQ. '') e_Rmag = rNULL__
        if(ar__(120:124) .EQ. '') E_Rmag_1 = rNULL__
        if(ar__(126:131) .EQ. '') Imag = rNULL__
        if(ar__(133:137) .EQ. '') e_Imag = rNULL__
        if(ar__(139:143) .EQ. '') E_Imag_1 = rNULL__
        if(ar__(160:165) .EQ. '') U_B = rNULL__
        if(ar__(167:172) .EQ. '') U_V = rNULL__
        if(ar__(174:178) .EQ. '') U_R = rNULL__
        if(ar__(180:184) .EQ. '') U_I = rNULL__
        if(ar__(186:190) .EQ. '') B_V = rNULL__
        if(ar__(192:196) .EQ. '') B_R = rNULL__
        if(ar__(198:202) .EQ. '') B_I = rNULL__
        if(ar__(204:208) .EQ. '') V_R = rNULL__
        if(ar__(210:214) .EQ. '') V_I = rNULL__
        if(ar__(216:220) .EQ. '') R_I = rNULL__
        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)
     +  WOCS,Xpos,Ypos,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Umag,e_Umag,
     +  E_Umag_1,Bmag,e_Bmag,E_Bmag_1,Vmag,e_Vmag,E_Vmag_1,Rmag,
     +  e_Rmag,E_Rmag_1,Imag,e_Imag,E_Imag_1,NU,NB,NV,NR,NI,U_B,U_V,
     +  U_R,U_I,B_V,B_R,B_I,V_R,V_I,R_I
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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