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

Conversion of standardized ReadMe file for file /./ftp/cats/I/277 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-Mar-29
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/277               SPM Catalog 2.0                          (Platais+ 1998)
*================================================================================
*Yale/San Juan Southern Proper Motion Program:
*-20 to -40{deg} zones including the South Galactic Pole Region
*     Platais I., Girard T.M., Kozhurina-Platais V., van Altena W.F., Lopez C.E.,
*     Mendez R.A., Ma W.-Z., Yang T.-G., MacGillivray H.T., Yentis D.J.
*    <Astron. J. 116, 2556 (1998)>
*    =1998AJ....116.2556P
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'spmcat.dat'	! Catalog of positions, proper motions and BV
                               photographic photometry in the area around the
                               South Galactic Pole

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

C  Position composed of: RAdeg DEdeg (Epoch=J1991.25)
      integer*4     SPM        (nr__) ! Object identifier (1)
      integer*4     RAh        (nr__) ! (h) Right ascension for the epoch J1991.25 and in
*                                the ICRS reference system (i.e. equinox 2000)
      integer*4     RAm        (nr__) ! (min) Right ascension for the epoch J1991.25 and in
*                                the ICRS reference system (i.e. equinox 2000)
      real*4        RAs        (nr__) ! (s) Right ascension for the epoch J1991.25 and in
*                                the ICRS reference system (i.e. equinox 2000)
      character*1   DE_        (nr__) ! Declination sign (2000)
      integer*4     DEd        (nr__) ! (deg) Declination for the epoch J1991.25 and in the
*                                ICRS reference system (i.e. equinox 2000)
      integer*4     DEm        (nr__) ! (arcmin) Declination for the epoch J1991.25 and in the
*                                ICRS reference system (i.e. equinox 2000)
      real*4        DEs        (nr__) ! (arcsec) [0/60] Declination for the epoch J1991.25 and in
*                                the ICRS reference system (i.e. equinox 2000)
      real*8        RAdeg      (nr__) ! (deg) Right ascension in decimal degrees, ICRS system
*                                for the epoch J1991.25
      real*8        DEdeg      (nr__) ! (deg) Declination in decimal degrees, ICRS system
*                                for the epoch J1991.25
      integer*4     e_RAdeg    (nr__) ! (mas) Estimated standard error in right ascension
*                                multiplied by cos(DEC).
      integer*4     e_DEdeg    (nr__) ! (mas) Estimated standard error in declination
      real*8        pmRA       (nr__) ! (mas/yr) Absolute proper motion in right ascension
*                                multiplied by cos(DEC).
      real*8        pmDE       (nr__) ! (mas/yr) Absolute proper motion in declination
      real*4        e_pmRA     (nr__) ! (mas/yr) Estimated standard error in right ascension's
*                                absolute proper motion.
      real*4        e_pmDE     (nr__) ! (mas/yr) Estimated standard error in declination's
*                                absolute proper motion.
      real*4        Vmag       (nr__) ! (mag) ?=0.00 Photographic V-magnitude
*                                (if missing then set to 0.00)
      real*4        Bmag       (nr__) ! (mag) ?=0.00 Photographic B-magnitude
*                                (if missing then set to 0.00)
      real*4        B_V        (nr__) ! (mag) ?=0.00 B-V color (if either of V or B is missing
*                                then set to 0.00).
      integer*4     e_Vmag     (nr__) ! (0.01mag) Estimated standard error in V- magnitude
      integer*4     e_Bmag     (nr__) ! (0.01mag) Estimated standard error in B- magnitude
      integer*4     Nfie       (nr__) ! Number of SPM fields on which the object was
*                                measured.
      integer*4     o_Bmag     (nr__) ! Number of images used in astrometric reductions
*                                from a blue plate in each epoch (2)
      integer*4     o_Vmag     (nr__) ! Number of images used in astrometric reductions
*                                from a visual plate in each epoch (2)
      character*1   F1         (nr__) ! [HT] Flag "H" indicates a Hipparcos star;
*                                    flag "T" indicates a Tycho star if it is
*                                     not already a Hipparcos star
      character*1   F2         (nr__) ! [GKQ] Selection flag (3)
      character*1   F3         (nr__) ! [AS] Specific flag (4)
*Note (1): First three digits indicate the SPM field number. The remaining
*     digits are the running number in the SPM input file.
*Note (2): Each first and second order grating-image pair counted as one image
*Note (3): the flags have the following meaning:
*     Flag "G" indicates visually confirmed galaxy;
*     Flag "K" indicates a randomly selected star.
*          Note that star selections 011 and 054 also share that flag;
*     Flag "Q" indicates a possible QSO drawn from the following special
*          catalogs: 022,027,042,052 (see spmspe.txt).
*Note (4): the flags have the following meaning:
*     Flag "S" indicates a special star taken from a selected catalog or list.
*     Flag "A" indicates a star which was chosen in some specified area down
*           to a specified magnitude limit.
*          This includes special catalogs: 012,024,037,050,055 (see spmspe.txt).

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

C  Declarations for 'spmccd.dat'	! A list of CCD photometry used for magnitude
                               calibration in the SGP area

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

C  J2000 position composed of: RAdeg DEdeg (Epoch=1991.25)
      integer*4     SPM_1      (nr__1) ! Object number (1)
      real*8        RAdeg_1    (nr__1) ! (deg) Right ascension (J2000) (2)
      real*8        DEdeg_1    (nr__1) ! (deg) Declination (J2000) (2)
      real*4        Vmag_1     (nr__1) ! (mag) V-magnitude from CCD photometry
      real*4        B_V_1      (nr__1) ! (mag) B-V color from CCD photometry
*Note (1): First three digits indicate the SPM field number.
*     The remaining digits are the running number in the SPM input file.
*Note (2): Positions for the epoch 1991.25 and in the ICRS reference system
*     (copied from the Catalog file spmcat.dat)

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

C  Declarations for 'spmfld.dat'	! Basic information on the SPM fields/plates used
                               to create the Catalog

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

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

      integer*4     SPM_2      (nr__2) ! The SPM field number (1)
      integer*4     RAh_1      (nr__2) ! (h) Field center right ascension (J2000)
      integer*4     RAm_1      (nr__2) ! (min) Field center right ascension (J2000)
      real*4        RAs_1      (nr__2) ! (s) Field center right ascension (J2000)
      character*1   DE__1      (nr__2) ! Sign of declination (J2000)
      integer*4     DEd_1      (nr__2) ! (deg) Field center declination (J2000)
      integer*4     DEm_1      (nr__2) ! (arcmin) Field center declination (J2000)
      real*4        DEs_1      (nr__2) ! (arcsec) Field center declination (J2000)
      character*10  DATE1      (nr__2) ! ("DD/MM/YYYY") First epoch blue-plate exposure date
      character*2   GR1        (nr__2) ! [EW NS] Grating image orientation on first
*                                   epoch blue plates (East-West or North-South)
      character*10  DATE2      (nr__2) ! ("DD/MM/YYYY") Second epoch blue-plate exposure date
      character*2   GR2        (nr__2) ! [EW NS] Grating image orientation on second
*                                   epoch blue plates (East-West or North-South)
*Note (1): In this file the basic data are provided for each of the
*    selected 156 SPM fields. However, the Catalog's object numbers may
*    contain some adjacent SPM field numbers which are not presented in
*    this file. This is because in the field overlap area the object ID is
*    assigned based on the field with the nearest plate center. This
*    procedure will ensure consistency in the numbering system with
*    adjacent fields incorporated in future versions of the Catalog.
*
*    SPM fields for which the exposure date of visual plates is different
*    from the blue plate. The field centers at the equinox B1950 can be
*    found in Platais et al. (1998A&A...331.1119P).
*     ------------------------------------------------------------------
*      Field     Date 1            Date 2
*     ------------------------------------------------------------------
*      385                        30/07/1987  NS
*      459       22/09/1998  EW
*      600       21/09/1968  EW
*      420                         7/02/1997  EW
*      449       21/09/1968  EW
*      515        8/08/1969  EW
*      516                         5/09/1996  NS
*      525       30/07/1968  EW
*      526       20/09/1968  EW
*      569                        21/02/1993  NS
*     ------------------------------------------------------------------

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

C  Loading file 'spmcat.dat'	! Catalog of positions, proper motions and BV
*                               photographic photometry in the area around the
*                               South Galactic Pole

C  Format for file interpretation

    1 format(
     +  I8,1X,I2,1X,I2,1X,F6.3,1X,A1,I2,1X,I2,1X,F5.2,1X,F10.6,1X,
     +  F10.6,I4,I4,1X,F7.1,1X,F7.1,F5.1,F5.1,1X,F5.2,1X,F5.2,1X,F5.2,
     +  I3,I3,3X,I1,1X,I2,1X,I2,1X,A1,A1,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'spmcat.dat')
      write(6,*) '....Loading file: spmcat.dat'
      do i__=1,321608
        read(1,'(A129)')ar__
        read(ar__,1)
     +  SPM(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),RAdeg(i__),DEdeg(i__),e_RAdeg(i__),
     +  e_DEdeg(i__),pmRA(i__),pmDE(i__),e_pmRA(i__),e_pmDE(i__),
     +  Vmag(i__),Bmag(i__),B_V(i__),e_Vmag(i__),e_Bmag(i__),
     +  Nfie(i__),o_Bmag(i__),o_Vmag(i__),F1(i__),F2(i__),F3(i__)
c    ..............Just test output...........
        write(6,1)
     +  SPM(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),RAdeg(i__),DEdeg(i__),e_RAdeg(i__),
     +  e_DEdeg(i__),pmRA(i__),pmDE(i__),e_pmRA(i__),e_pmDE(i__),
     +  Vmag(i__),Bmag(i__),B_V(i__),e_Vmag(i__),e_Bmag(i__),
     +  Nfie(i__),o_Bmag(i__),o_Vmag(i__),F1(i__),F2(i__),F3(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'spmccd.dat'	! A list of CCD photometry used for magnitude
*                               calibration in the SGP area

C  Format for file interpretation

    2 format(I8,1X,F10.6,1X,F10.6,1X,F5.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'spmccd.dat')
      write(6,*) '....Loading file: spmccd.dat'
      do i__=1,7783
        read(1,'(A42)')ar__1
        read(ar__1,2)
     +  SPM_1(i__),RAdeg_1(i__),DEdeg_1(i__),Vmag_1(i__),B_V_1(i__)
c    ..............Just test output...........
        write(6,2)
     +  SPM_1(i__),RAdeg_1(i__),DEdeg_1(i__),Vmag_1(i__),B_V_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'spmfld.dat'	! Basic information on the SPM fields/plates used
*                               to create the Catalog

C  Format for file interpretation

    3 format(
     +  I3,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,4X,A10,2X,A2,4X,
     +  A10,2X,A2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'spmfld.dat')
      write(6,*) '....Loading file: spmfld.dat'
      do i__=1,156
        read(1,'(A63)')ar__2
        read(ar__2,3)
     +  SPM_2(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),
     +  DEd_1(i__),DEm_1(i__),DEs_1(i__),DATE1(i__),GR1(i__),
     +  DATE2(i__),GR2(i__)
        RAdeg_2(i__) = rNULL__
        DEdeg_2(i__) = rNULL__
c  Derive coordinates RAdeg_2 and DEdeg_2 from input data
c  (RAdeg_2 and DEdeg_2 are set to rNULL__ when unknown)
        if(RAh_1(i__) .GT. -180) RAdeg_2(i__)=RAh_1(i__)*15.
        if(RAm_1(i__) .GT. -180) RAdeg_2(i__)=RAdeg_2(i__)+RAm_1(i__)/4.
        if(RAs_1(i__) .GT. -180) RAdeg_2(i__)=RAdeg_2(i__)+RAs_1(i__)/240.
        if(DEd_1(i__) .GE. 0) DEdeg_2(i__)=DEd_1(i__)
        if(DEm_1(i__) .GE. 0) DEdeg_2(i__)=DEdeg_2(i__)+DEm_1(i__)/60.
        if(DEs_1(i__) .GE. 0) DEdeg_2(i__)=DEdeg_2(i__)+DEs_1(i__)/3600.
        if(DE__1(i__).EQ.'-'.AND.DEdeg_2(i__).GE.0) DEdeg_2(i__)=-DEdeg_2(i__)
c    ..............Just test output...........
        write(6,3)
     +  SPM_2(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),
     +  DEd_1(i__),DEm_1(i__),DEs_1(i__),DATE1(i__),GR1(i__),
     +  DATE2(i__),GR2(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg_2(i__),DEdeg_2(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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