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

Conversion of standardized ReadMe file for file /./ftp/cats/I/321 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.



++++Column 'RAdeg' at line 112: Right ascension (J2000) at MJD epoch
    position has no associated Epoch (last analysed word: '')
      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. I/321              Pulkovo SMP Photographic Catalogue          (Berezhnoy, 2013)
*================================================================================
*A new reduction of digitized photographic plates with selected asteroids
*obtained with Normal Astrograph of Pulcovo observatory in the period from
*1948 to 1990 years.
*    Berezhnoy A.A.
*   <Solar System Research, 47, 203 (2013)>
*   =2013SoSyR..47..203B
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'planets.dat'	! Minor planets fundamental parameters

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

      integer*4     Planet      ! Minor planet number
      character*10  Name        ! Name
      real*4        H           ! (mag) Absolute magnitude H parameter (1)
      real*8        i           ! (deg) Inclination (1)
      real*8        e           ! Eccentricity (1)
      real*8        a           ! (AU) Semimajor axis (1)
*Note (1): Data from The Asteroid Orbital Elements Database, Cat. B/astorb.

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

C  Declarations for 'smp.dat'	! The results of minor planets

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

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

      integer*4     Planet_1    ! Minor planet number (1)
      character*7   provNum     ! Provisional or temporary designation
*                                   (always blank) (2)
      character*1   discAs      ! Discovery asterisk (always blank) (3)
      character*1   note1       ! Note 1 (always blank)
      character*1   note2       ! Note 2 (always blank)
      character*17  Obs_Date    ! Date of observation (YYYY/MM/DD.dddddd)
      integer*4     RAh         ! (h) Observed Right Ascension J2000, Epoch 1989.0
      integer*4     RAm         ! (min) Observed Right Ascension J2000, Epoch 1989.0
      real*4        RAs         ! (s) Observed Right Ascension J2000, Epoch 1989.0
      character*1   DE_         ! Observed Declination sign J2000, Epoch 1989.0
      integer*4     DEd         ! (deg) Observed Declination J2000, Epoch 1989.0
      integer*4     DEm         ! (arcmin) Observed Declination J2000, Epoch 1989.0
      real*4        DEs         ! (arcsec) Observed Declination J2000, Epoch 1989.0
      real*4        mag         ! (mag) Observed magnitude
      character*1   Band        ! Band (always blank)
      character*3   ObsCode     ! [084] Observatory code
*Note (1): mpNum is a zero-padded, right-justified number, e.g., an observation
*  of (1) would be given as 00001, an observation of (3202) would be 03202.
*  If there is no number these columns must be blank.  Six-digit numbers are to
*  be stored in packed form (A0000 = 100000), in order to be consistent with the
*  format specifier earlier in this document.
*Note on (2): Provisional designation or the temporary designation. The
*   provisional designation is stored in a 7-character packed form. Temporary
*   designations are designations assigned by the observer for new or
*   unidentified objects. Such designations must begin in column 6, should not
*   exceed 6 characters in length, and should start with one or more letters.
*   It is important that every observation has a designation and that the same
*   designation is used for all observations of the same object.
*Note (3): Discovery observations for new (or unidentified) objects should
*   contain "*". Only one asterisked observation per object is expected.

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

C  Declarations for 'lspm.dat'	! The results of stars with large proper motion

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

C  J2000 position composed of: RAdeg DEdeg
      character*11  LSPM        ! LSPM star name (JHHMM+DDMMW)
      real*8        MJD         ! (d) Epoch of observation in MJD
      real*8        RAdeg_1     ! (deg) Right ascension (J2000) at MJD epoch
      real*8        DEdeg_1     ! (deg) Declination (J2000) at MJD epoch
      real*4        mag_1       ! (mag) Magnitude (1)
      real*8        oRA         ! (mas) Residual in position, (O-C)RA*cos(DE)
      real*8        oDE         ! (mas) Residual in position, (O-C)DE
      real*4        omag        ! (mag) Residual in magnitude, (O-C)
      real*8        Xpix        ! (pix) Measured coordinate X
      real*8        Ypix        ! (pix) Measured coordinate Y
      real*8        logd        ! logarithm of integrated optical density (1)
      real*8        dXpix       ! (pix) Difference in measured coordinate X
      real*8        dYpix       ! (pix) Difference in measured coordinate Y
      real*8        dlogd       ! Difference in pixel magnitude
*Note (1): Reduction on magnitudes was prepared with BJmag magnitude in LSPM
*     catalogue and the logarithm of integrated optical density of the star
*     image.

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

C  Loading file 'planets.dat'	! Minor planets fundamental parameters

C  Format for file interpretation

    1 format(I5,1X,A10,3X,F4.2,1X,F9.6,1X,F10.8,1X,F10.8)

C  Effective file loading

      open(unit=1,status='old',file=
     +'planets.dat')
      write(6,*) '....Loading file: planets.dat'
      do i__=1,14
        read(1,'(A55)')ar__
        read(ar__,1)Planet,Name,H,i,e,a
c    ..............Just test output...........
        write(6,1)Planet,Name,H,i,e,a
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'smp.dat'	! The results of minor planets

C  Format for file interpretation

    2 format(
     +  I5,A7,A1,A1,A1,A17,I2,1X,I2,1X,F6.3,A1,I2,1X,I2,1X,F5.2,9X,
     +  F5.2,A1,6X,A3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'smp.dat')
      write(6,*) '....Loading file: smp.dat'
      do i__=1,1378
        read(1,'(A80)')ar__1
        read(ar__1,2)
     +  Planet_1,provNum,discAs,note1,note2,Obs_Date,RAh,RAm,RAs,DE_,
     +  DEd,DEm,DEs,mag,Band,ObsCode
        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,2)
     +  Planet_1,provNum,discAs,note1,note2,Obs_Date,RAh,RAm,RAs,DE_,
     +  DEd,DEm,DEs,mag,Band,ObsCode
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'lspm.dat'	! The results of stars with large proper motion

C  Format for file interpretation

    3 format(
     +  A11,1X,F13.7,1X,F12.8,1X,F12.8,1X,F6.2,1X,F7.1,1X,F7.1,1X,
     +  F6.2,1X,F10.4,1X,F10.4,1X,F11.6,1X,F7.1,1X,F7.1,1X,F10.6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'lspm.dat')
      write(6,*) '....Loading file: lspm.dat'
      do i__=1,1475
        read(1,'(A142)')ar__2
        read(ar__2,3)
     +  LSPM,MJD,RAdeg_1,DEdeg_1,mag_1,oRA,oDE,omag,Xpix,Ypix,logd,
     +  dXpix,dYpix,dlogd
c    ..............Just test output...........
        write(6,3)
     +  LSPM,MJD,RAdeg_1,DEdeg_1,mag_1,oRA,oDE,omag,Xpix,Ypix,logd,
     +  dXpix,dYpix,dlogd
c    .......End.of.Just test output...........
      end do
      close(1)

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