FORTRAN Generation
(/./ftp/cats/I/171)

Conversion of standardized ReadMe file for file /./ftp/cats/I/171 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. I/171               Astrographic Catalog Reference Stars (ACRS)   (Corbin+ 1991)
*================================================================================
*Astrographic Catalogue Reference Stars
*     Corbin T.E., Urban S.E., Warren W.H. Jr.
*    <NASA, NSSDC 91-10 (1991)>
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'acrs1.dat'	! Part 1: more reliable stars

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

C  B1950 position composed of: RAh RAm RAms DE- DEd DEm DEcs (Epoch=B1950.0)
      real*8        RAdeg       ! (deg) Right Ascension B1950, Epoch=B1950.0
      real*8        DEdeg       ! (deg)     Declination B1950, Epoch=B1950.0
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     PartNum     ! [1,2] Catalog Part number, '1' or '2'
      integer*4     ACRS        ! *[1,570159]+ ACRS sequential number
      integer*4     RAh         ! (h) Hours RA, equinox=B1950, Epoch=B1950.0
      integer*4     RAm         ! (min) Minutes RA, equinox, epoch B1950.0
      integer*4     RAms        ! (ms) Seconds RA, equinox, epoch B1950.0
      character*1   DE_         ! Sign Dec, equinox, epoch B1950.0
      integer*4     DEd         ! (deg) Degrees Dec, equinox, epoch B1950.0
      integer*4     DEm         ! (arcmin) Minutes Dec, equinox, epoch B1950.0
      integer*4     DEcs        ! (10mas) Seconds Dec, equinox, epoch B1950.0
      integer*4     e_RAms      ! (ms) ?Mean error in RA at original epoch
      integer*4     e_DEcs      ! (10mas) ?Mean error in Dec at original epoch
      integer*4     pmRA        ! (0.01ms/yr) RA proper motion, FK4 system
      integer*4     pmDE        ! (0.1mas/yr) DE proper motion, FK4 system
      integer*4     e_pmRA      ! (0.01ms/yr) ?Mean error on pmRA
      integer*4     e_pmDE      ! (0.1mas/yr) ?Mean error on pmDE
      integer*4     EpRA        ! (0.001yr) Original epoch of RA (epoch of mean position)
      integer*4     EpDE        ! (0.001yr) Original epoch of DE (epoch of mean position)
      integer*4     o_RAms      ! Number of positions in RA
      integer*4     o_DEcs      ! Number of positions in DE
      integer*4     w_RAms      ! (0.1) Sum of the weights in RA
      integer*4     w_DEcs      ! (0.1) Sum of the weights in DE
      integer*4     Pmag        ! (0.01mag) [140/1350]?=9999 Photographic magnitude
      character*3   SpType      ! Spectral type
      character*8   BD          ! Bonner Durchmusterung number <I/122>
      character*8   CD          ! Cordoba Durchmusterung number <I/114>
      character*8   CP          ! Cape Photographic Durchmusterung <I/108>
      character*7   AGK3        ! AGK3 number <I/61>
      character*6   CPC2        ! Second Cape Photograpic Catalog <I/85>
      character*24  ACRSJ       ! *ACRS number, ACRS Jhhmmss.ssSddmmss.s
      integer*4     RA2000h     ! (h) *Hours RA, Equinox=J2000, Epoch=J2000
      integer*4     RA2000m     ! (min) *Minutes RA, equinox, epoch J2000.0
      integer*4     RA2000ms    ! (ms) *Seconds RA, equinox, epoch J2000.0
      integer*4     pmRA2000    ! (0.01ms/yr) Centennial RA proper motion, J2000.0
      integer*4     EpRA_J2000  ! (0.001yr) *Original epoch - J2000.0 in RA
      character*1   DE2000_     ! Sign Dec, equinox, epoch J2000.0
      integer*4     DE2000d     ! (deg) *Degrees Dec, equinox, epoch J2000.0
      integer*4     DE2000m     ! (arcmin) *Minutes Dec, equinox, epoch J2000.0
      integer*4     DE2000cs    ! (10mas) *Seconds Dec, equinox, epoch J2000.0
      integer*4     pmDE2000    ! (0.1mas/yr) Centennial Dec proper motion, J2000.0
      integer*4     EpDE_J2000  ! (0.001yr) *Original epoch - J2000.0 in DE
*Note on ACRS:
*    This number is between 1 and 250052 for the first part,
*    between 500001 and 570159 for Part 2.
*Note on RA2000h, RA2000m, RA2000ms, DE2000d, DE2000m, DE2000cs:
*    The J2000 positions are given for equinox and epoch J2000.0 on the
*    system of FK5 after transformation of the B1950.0 values. The
*    transformation was done using the coefficients and software package of
*    Schwan (see Schwan 1988) and the algorithm given in the 1991
*    Astronomical Almanac (page B42) (foreshortening terms set to zero).
*    (See Section 3.1 of the documentation for additional details.)
*Note on ACRSJ:
*    This identifier is based upon the recommended IAU nomenclature (see
*    PASP, 102, 1444, 1990). The field consists of an origin in bytes
*    127-130 (ACRS) and a coordinate specification in bytes 132-150 (byte
*    132 contains a "J" to indicate that the following coordinates are in
*    the Julian reference system and are for the year 2000.0, the standard
*    equinox designated for Julian system coordinates).
*Note on EpRA-J2000, EpDE-J2000:
*    These values are wrong for values larger than 1 century (when the
*    corresponding epoch is before 1900); this occurs for ACRS
*    86508, 240650, 533151.

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

C  Declarations for 'acrs2.dat'	! Part 2: stars with poor observational history

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

C  B1950 position composed of: RAh RAm RAms DE- DEd DEm DEcs (Epoch=B1950.0)
      real*8        RAdeg_1     ! (deg) Right Ascension B1950, Epoch=B1950.0
      real*8        DEdeg_1     ! (deg)     Declination B1950, Epoch=B1950.0
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     PartNum_1   ! [1,2] Catalog Part number, '1' or '2'
      integer*4     ACRS_1      ! *[1,570159]+ ACRS sequential number
      integer*4     RAh_1       ! (h) Hours RA, equinox=B1950, Epoch=B1950.0
      integer*4     RAm_1       ! (min) Minutes RA, equinox, epoch B1950.0
      integer*4     RAms_1      ! (ms) Seconds RA, equinox, epoch B1950.0
      character*1   DE__1       ! Sign Dec, equinox, epoch B1950.0
      integer*4     DEd_1       ! (deg) Degrees Dec, equinox, epoch B1950.0
      integer*4     DEm_1       ! (arcmin) Minutes Dec, equinox, epoch B1950.0
      integer*4     DEcs_1      ! (10mas) Seconds Dec, equinox, epoch B1950.0
      integer*4     e_RAms_1    ! (ms) ?Mean error in RA at original epoch
      integer*4     e_DEcs_1    ! (10mas) ?Mean error in Dec at original epoch
      integer*4     pmRA_1      ! (0.01ms/yr) RA proper motion, FK4 system
      integer*4     pmDE_1      ! (0.1mas/yr) DE proper motion, FK4 system
      integer*4     e_pmRA_1    ! (0.01ms/yr) ?Mean error on pmRA
      integer*4     e_pmDE_1    ! (0.1mas/yr) ?Mean error on pmDE
      integer*4     EpRA_1      ! (0.001yr) Original epoch of RA (epoch of mean position)
      integer*4     EpDE_1      ! (0.001yr) Original epoch of DE (epoch of mean position)
      integer*4     o_RAms_1    ! Number of positions in RA
      integer*4     o_DEcs_1    ! Number of positions in DE
      integer*4     w_RAms_1    ! (0.1) Sum of the weights in RA
      integer*4     w_DEcs_1    ! (0.1) Sum of the weights in DE
      integer*4     Pmag_1      ! (0.01mag) [140/1350]?=9999 Photographic magnitude
      character*3   SpType_1    ! Spectral type
      character*8   BD_1        ! Bonner Durchmusterung number <I/122>
      character*8   CD_1        ! Cordoba Durchmusterung number <I/114>
      character*8   CP_1        ! Cape Photographic Durchmusterung <I/108>
      character*7   AGK3_1      ! AGK3 number <I/61>
      character*6   CPC2_1      ! Second Cape Photograpic Catalog <I/85>
      character*24  ACRSJ_1     ! *ACRS number, ACRS Jhhmmss.ssSddmmss.s
      integer*4     RA2000h_1   ! (h) *Hours RA, Equinox=J2000, Epoch=J2000
      integer*4     RA2000m_1   ! (min) *Minutes RA, equinox, epoch J2000.0
      integer*4     RA2000ms_1  ! (ms) *Seconds RA, equinox, epoch J2000.0
      integer*4     pmRA2000_1  ! (0.01ms/yr) Centennial RA proper motion, J2000.0
      integer*4     EpRA_J2000_1 ! (0.001yr) *Original epoch - J2000.0 in RA
      character*1   DE2000__1   ! Sign Dec, equinox, epoch J2000.0
      integer*4     DE2000d_1   ! (deg) *Degrees Dec, equinox, epoch J2000.0
      integer*4     DE2000m_1   ! (arcmin) *Minutes Dec, equinox, epoch J2000.0
      integer*4     DE2000cs_1  ! (10mas) *Seconds Dec, equinox, epoch J2000.0
      integer*4     pmDE2000_1  ! (0.1mas/yr) Centennial Dec proper motion, J2000.0
      integer*4     EpDE_J2000_1 ! (0.001yr) *Original epoch - J2000.0 in DE
*Note on ACRS:
*    This number is between 1 and 250052 for the first part,
*    between 500001 and 570159 for Part 2.
*Note on RA2000h, RA2000m, RA2000ms, DE2000d, DE2000m, DE2000cs:
*    The J2000 positions are given for equinox and epoch J2000.0 on the
*    system of FK5 after transformation of the B1950.0 values. The
*    transformation was done using the coefficients and software package of
*    Schwan (see Schwan 1988) and the algorithm given in the 1991
*    Astronomical Almanac (page B42) (foreshortening terms set to zero).
*    (See Section 3.1 of the documentation for additional details.)
*Note on ACRSJ:
*    This identifier is based upon the recommended IAU nomenclature (see
*    PASP, 102, 1444, 1990). The field consists of an origin in bytes
*    127-130 (ACRS) and a coordinate specification in bytes 132-150 (byte
*    132 contains a "J" to indicate that the following coordinates are in
*    the Julian reference system and are for the year 2000.0, the standard
*    equinox designated for Julian system coordinates).
*Note on EpRA-J2000, EpDE-J2000:
*    These values are wrong for values larger than 1 century (when the
*    corresponding epoch is before 1900); this occurs for ACRS
*    86508, 240650, 533151.

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

C  Loading file 'acrs1.dat'	! Part 1: more reliable stars

C  Format for file interpretation

    1 format(
     +  I1,I6,1X,I2,I2,I5,A1,I2,I2,I4,I3,I3,I6,I7,I4,1X,I3,I7,I7,I3,
     +  I3,I4,I4,I5,A3,A8,A8,A8,A7,A6,A24,I2,I2,I5,I6,I6,A1,I2,I2,I4,
     +  I6,I6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'acrs1.dat')
      write(6,*) '....Loading file: acrs1.dat'
      do i__=1,250052
        read(1,'(A192)')ar__
        read(ar__,1)
     +  PartNum,ACRS,RAh,RAm,RAms,DE_,DEd,DEm,DEcs,e_RAms,e_DEcs,pmRA,
     +  pmDE,e_pmRA,e_pmDE,EpRA,EpDE,o_RAms,o_DEcs,w_RAms,w_DEcs,Pmag,
     +  SpType,BD,CD,CP,AGK3,CPC2,ACRSJ,RA2000h,RA2000m,RA2000ms,
     +  pmRA2000,EpRA_J2000,DE2000_,DE2000d,DE2000m,DE2000cs,pmDE2000,
     +  EpDE_J2000
        if(ar__(27:29) .EQ. '') e_RAms = iNULL__
        if(ar__(30:32) .EQ. '') e_DEcs = iNULL__
        if(ar__(46:49) .EQ. '') e_pmRA = iNULL__
        if(ar__(51:53) .EQ. '') e_pmDE = iNULL__
        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(RAms .GT. -180) RAdeg=RAdeg+RAms/240000.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEcs .GE. 0) DEdeg=DEdeg+DEcs/360000.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  PartNum,ACRS,RAh,RAm,RAms,DE_,DEd,DEm,DEcs,e_RAms,e_DEcs,pmRA,
     +  pmDE,e_pmRA,e_pmDE,EpRA,EpDE,o_RAms,o_DEcs,w_RAms,w_DEcs,Pmag,
     +  SpType,BD,CD,CP,AGK3,CPC2,ACRSJ,RA2000h,RA2000m,RA2000ms,
     +  pmRA2000,EpRA_J2000,DE2000_,DE2000d,DE2000m,DE2000cs,pmDE2000,
     +  EpDE_J2000
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'acrs2.dat'	! Part 2: stars with poor observational history

C  Format for file interpretation

    2 format(
     +  I1,I6,1X,I2,I2,I5,A1,I2,I2,I4,I3,I3,I6,I7,I4,1X,I3,I7,I7,I3,
     +  I3,I4,I4,I5,A3,A8,A8,A8,A7,A6,A24,I2,I2,I5,I6,I6,A1,I2,I2,I4,
     +  I6,I6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'acrs2.dat')
      write(6,*) '....Loading file: acrs2.dat'
      do i__=1,70159
        read(1,'(A192)')ar__1
        read(ar__1,2)
     +  PartNum_1,ACRS_1,RAh_1,RAm_1,RAms_1,DE__1,DEd_1,DEm_1,DEcs_1,
     +  e_RAms_1,e_DEcs_1,pmRA_1,pmDE_1,e_pmRA_1,e_pmDE_1,EpRA_1,
     +  EpDE_1,o_RAms_1,o_DEcs_1,w_RAms_1,w_DEcs_1,Pmag_1,SpType_1,
     +  BD_1,CD_1,CP_1,AGK3_1,CPC2_1,ACRSJ_1,RA2000h_1,RA2000m_1,
     +  RA2000ms_1,pmRA2000_1,EpRA_J2000_1,DE2000__1,DE2000d_1,
     +  DE2000m_1,DE2000cs_1,pmDE2000_1,EpDE_J2000_1
        if(ar__1(27:29) .EQ. '') e_RAms_1 = iNULL__
        if(ar__1(30:32) .EQ. '') e_DEcs_1 = iNULL__
        if(ar__1(46:49) .EQ. '') e_pmRA_1 = iNULL__
        if(ar__1(51:53) .EQ. '') e_pmDE_1 = iNULL__
        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(RAms_1 .GT. -180) RAdeg_1=RAdeg_1+RAms_1/240000.
        if(DEd_1 .GE. 0) DEdeg_1=DEd_1
        if(DEm_1 .GE. 0) DEdeg_1=DEdeg_1+DEm_1/60.
        if(DEcs_1 .GE. 0) DEdeg_1=DEdeg_1+DEcs_1/360000.
        if(DE__1.EQ.'-'.AND.DEdeg_1.GE.0) DEdeg_1=-DEdeg_1
c    ..............Just test output...........
        write(6,2)
     +  PartNum_1,ACRS_1,RAh_1,RAm_1,RAms_1,DE__1,DEd_1,DEm_1,DEcs_1,
     +  e_RAms_1,e_DEcs_1,pmRA_1,pmDE_1,e_pmRA_1,e_pmDE_1,EpRA_1,
     +  EpDE_1,o_RAms_1,o_DEcs_1,w_RAms_1,w_DEcs_1,Pmag_1,SpType_1,
     +  BD_1,CD_1,CP_1,AGK3_1,CPC2_1,ACRSJ_1,RA2000h_1,RA2000m_1,
     +  RA2000ms_1,pmRA2000_1,EpRA_J2000_1,DE2000__1,DE2000d_1,
     +  DE2000m_1,DE2000cs_1,pmDE2000_1,EpDE_J2000_1
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c    .......End.of.Just test output...........
      end do
      close(1)

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