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

Conversion of standardized ReadMe file for file /./ftp/cats/I/146 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-17
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/146             Positions and Proper Motions - North      (Roeser+, 1988)
*================================================================================
*Catalogue of Positions and Proper Motions
*    Roeser S., Bastian U.
*    <Astron. Astrophys. Suppl. Ser.  74, 449 (1988)>
*    =1988A&AS...74..449R        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'ppm1.dat'	! Catalogue PPM-North

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

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

      integer*4     PPM        (nr__) ! [1/181731]+ PPM Designation
      character*9   DM         (nr__) ! *Durchmusterung, BD or CD
      real*4        Mag        (nr__) ! (mag) *Magnitude, Visual if Flag5 is 'V'
      character*2   Sp         (nr__) ! *Spectral type
      integer*4     RAh        (nr__) ! (h) Right Ascension for the Equinox=J2000.0 and
*                                     Epoch=J2000.0, on the system of FK5
      integer*4     RAm        (nr__) ! (min) Right Ascension J2000 (minutes)
      real*4        RAs        (nr__) ! (s) Right Ascension J2000 (seconds)
      character*1   DE_        (nr__) ! Declination J2000 (sign)
      integer*4     DEd        (nr__) ! (deg) Declination for the equinox and epoch
*                                     J2000.0, on the system of FK5
      integer*4     DEm        (nr__) ! (arcmin) Declination J2000 (minutes)
      real*4        DEs        (nr__) ! (arcsec) Declination J2000 (seconds)
      real*8        pmRA       (nr__) ! (s/yr) *Proper motion in RA, J2000
      real*4        pmDE       (nr__) ! (arcsec/yr) *Proper motion in DE, J2000
      integer*4     Npos       (nr__) ! *Number of individual positions used
      integer*4     e_RAs      (nr__) ! (10mas) *Mean error of RA
      integer*4     e_DEs      (nr__) ! (10mas) *Mean error of DE
      real*4        e_pmRA     (nr__) ! (mas/yr) *Mean error of pmRA
      real*4        e_pmDE     (nr__) ! (mas/yr) *Mean error of pmDE
      real*4        EpRA_1900  (nr__) ! (yr) *Weighted mean epoch, RA and pmRA
      real*4        EpDE_1900  (nr__) ! (yr) *Weighted mean epoch, DE and pmDE
      integer*4     SAO        (nr__) ! [1/258997]? SAO Designation
      integer*4     HD         (nr__) ! [1/359083]? Henry Draper Designation
      character*9   AGK3       (nr__) ! AGK2/3 <I/69> designation
      character*1   Flag1      (nr__) ! *'P' - problem, 'C' - comment
      character*1   Flag2      (nr__) ! *'D' - double star
      character*1   Flag3      (nr__) ! *    - not used
      character*1   Flag4      (nr__) ! *'F' - member of FK5
      character*1   Flag5      (nr__) ! *'R' - remark, 'V' - V mag (CPC-2)
*Note on DM:
*  Designation of the star in the Bonner Durchmusterung (for zones from
*  -02 to -22 degrees) or in the Cordoba Durchmusterung (zones -23 to
*  -89 degrees).
*Note on Mag and Sp:
*  See chapter 3 of description file.
*Note on pmRA:
*  Proper motion in right ascension for epoch and equinox J2000.0,
*  on the system of FK5 given in seconds of time per Julian year.
*Note on pmDE:
*  Proper motion in Declination for epoch and equinox J2000.0,
*  on the system of FK5 given in seconds of arc per Julian year.
*Note on Npos:
*  Number of individual published positions used for the
*  derivation of the position and proper motion given.
*Note on e_RAs:
*  Mean error of right ascension at the mean epoch of right ascension EpRA,
*  multiplied by the cosine of declination, given in units of 0.01
*  seconds of arc.
*Note on e_DEs:
*  Mean error of declination at the mean epoch of declination EpDE, given
*  in units of 0.01 seconds of arc.
*Note on e_pmRA:
*  Mean error of the proper motion in right ascension, multiplied by
*  the cosine of declination, given in units of 0.001 seconds of arc
*  per Julian year.
*Note on e_pmDE:
*  mean error of the proper motion in declination given in units of
*  0.001 seconds of arc per Julian year
*Note on EpRA-1900:
*  Weighted mean epoch of the measured positions used for the
*  derivation of RA and pmRA, given in years since 1900.0.
*Note on EpDE-1900:
*  Weighted mean epoch of the measured positions used for the
*  derivation of DE and pmDE, given in years since 1900.0.
*Note on Flag1:
*  P - problem case, preferably not to be used as astrometric reference star.
*  C - a critical comment is given in the List of Critical Comments.
*      Not to be used as astrometric reference star.
*Note on Flag2:
*  D - double star, preferably not to be used as astrometric reference star.
*Note on Flag3:
*  Not used, void for consistency with PPM (north).
*Note on Flag4:
*  F - member of FK5, mostly bright stars, original FK5 data are given.
*Note on Flag5:
*  R - a remark is given in the List of Remarks on Individual Stars.
*  V - the magnitude is a photographic V magnitude copied from CPC-2.

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

C  Declarations for 'ppma1.dat'	! Catalogue in format of old PPM North

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

      character*3   c3PPM      (nr__1) ! 3 characters 'PPM'
      integer*4     PPM_1      (nr__1) ! PPM number
      real*4        Mag_1      (nr__1) ! (mag) Magnitude
      character*2   Sp_1       (nr__1) ! Spectral type
      character*1   Flag1_1    (nr__1) ! *Problem flag
      real*8        RA50       (nr__1) ! (rad) Right ascension for Equinox=B9150 and
*                                    Epoch=B1950, FK4 system
      real*8        Dec50      (nr__1) ! (rad) Declination for Equinox=B9150 and
*                                    Epoch=B1950, FK4 system
      real*8        PMA50      (nr__1) ! (0.01rad/a) Proper motion in RA in FK4 system,
*                                    radians/tropical century
      real*8        PMD50      (nr__1) ! (0.01rad/a) Proper motion in DE in FK4 system,
*                                    radians/tropical century
      real*8        R_A_       (nr__1) ! (rad) Right ascension for Equinox=B9150 and
*                                    Epoch=J2000, FK5 system
      real*8        Dec_       (nr__1) ! (rad) Declination for Equinox=J2000 and
*                                    Epoch=J2000, FK5 system
      real*8        PMA        (nr__1) ! (0.01rad/a) Proper motion in R.A. in FK5 system,
*                                    radians/tropical century
      real*8        PMD        (nr__1) ! (0.01rad/a) Proper motion in Dec. in FK5 system,
*                                    radians/tropical century
*Note on Flag1:
*  P - problem case, preferably not to be used as astrometric reference star.
*  C - a critical comment is given in the List of Critical Comments.
*      Not to be used as astrometric reference star.

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

C  Loading file 'ppm1.dat'	! Catalogue PPM-North

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'ppm1.dat')
      write(6,*) '....Loading file: ppm1.dat'
      do i__=1,181731
        read(1,'(A133)')ar__
        read(ar__,1)
     +  PPM(i__),DM(i__),Mag(i__),Sp(i__),RAh(i__),RAm(i__),RAs(i__),
     +  DE_(i__),DEd(i__),DEm(i__),DEs(i__),pmRA(i__),pmDE(i__),
     +  Npos(i__),e_RAs(i__),e_DEs(i__),e_pmRA(i__),e_pmDE(i__),
     +  EpRA_1900(i__),EpDE_1900(i__),SAO(i__),HD(i__),AGK3(i__),
     +  Flag1(i__),Flag2(i__),Flag3(i__),Flag4(i__),Flag5(i__)
        if(ar__(102:107) .EQ. '') SAO(i__) = iNULL__
        if(ar__(109:114) .EQ. '') HD(i__) = iNULL__
        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)
     +  PPM(i__),DM(i__),Mag(i__),Sp(i__),RAh(i__),RAm(i__),RAs(i__),
     +  DE_(i__),DEd(i__),DEm(i__),DEs(i__),pmRA(i__),pmDE(i__),
     +  Npos(i__),e_RAs(i__),e_DEs(i__),e_pmRA(i__),e_pmDE(i__),
     +  EpRA_1900(i__),EpDE_1900(i__),SAO(i__),HD(i__),AGK3(i__),
     +  Flag1(i__),Flag2(i__),Flag3(i__),Flag4(i__),Flag5(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 'ppma1.dat'	! Catalogue in format of old PPM North

C  Format for file interpretation

    2 format(
     +  1X,A3,I6,F6.1,2X,A2,1X,A1,1X,D15.8,1X,D15.8,1X,D12.5,1X,D12.5,
     +  1X,D15.8,1X,D15.8,1X,D12.5,1X,D12.5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'ppma1.dat')
      write(6,*) '....Loading file: ppma1.dat'
      do i__=1,181731
        read(1,'(A138)')ar__1
        read(ar__1,2)
     +  c3PPM(i__),PPM_1(i__),Mag_1(i__),Sp_1(i__),Flag1_1(i__),
     +  RA50(i__),Dec50(i__),PMA50(i__),PMD50(i__),R_A_(i__),
     +  Dec_(i__),PMA(i__),PMD(i__)
c    ..............Just test output...........
        write(6,2)
     +  c3PPM(i__),PPM_1(i__),Mag_1(i__),Sp_1(i__),Flag1_1(i__),
     +  RA50(i__),Dec50(i__),PMA50(i__),PMD50(i__),R_A_(i__),
     +  Dec_(i__),PMA(i__),PMD(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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