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

Conversion of standardized ReadMe file for file /./ftp/cats/I/339 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 2018-Oct-16
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/339                  Hot Stuff for One Year (HSOY)            (Altmann+, 2017)
*================================================================================
*Hot Stuff for One Year (HSOY).
*A 583 million star proper motion catalogue derived from Gaia DR1 and PPMXL.
*    Altmann M., Roeser S., Demleitner M., Bastian U., Schilbach E.
*   <Astron. Astrophys. 600, L4 (2017)>
*   =2017A&A...600L...4A
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'hsoy.sam'	! The HSOY catalogue (583001653 sources)

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

C  J2000.0 position composed of: RAdeg DEdeg (Epoch=2000)
      real*8        RAdeg       ! (deg) Right ascension, J2000.0, at epoch 2000
*                                  (raj2000)
      real*8        DEdeg       ! (deg) Declination, J2000.0, at epoch 2000 (dej2000)
      integer*8     ipix        ! PPMXL object identifier (ipix) (1)
      integer*4     comp        ! [0/4] Disambiguation counter (where multiple
*                                  DR1 objects match one PPMXL object) (comp) (1)
      real*4        e_RAdeg     ! (mas) Mean error: RA*cos(DE) at mean epoch EpRA
*                                  (e_ra)
      real*4        e_DEdeg     ! (mas) Mean error: DE at mean epoch EpDE (e_de)
      real*8        pmRA        ! (mas/yr) Proper motion in RA, pmRA*cos(DE) (pmra)
      real*8        pmDE        ! (mas/yr) Proper motion in DE (pmde)
      real*4        e_pmRA      ! (mas/yr) Mean error in pmRA (e_pmra)
      real*4        e_pmDE      ! (mas/yr) Mean error in pmDE (e_pmde)
      real*8        EpRA        ! (yr) Mean Epoch in right ascension (epra)
      real*8        EpDE        ! (yr) Mean Epoch in declination (epde)
      real*4        Jmag        ! (mag) ? 2MASS J  magnitude (jmag)
      real*4        e_Jmag      ! (mag) ? error of 2MASS Jmag (e_jmag)
      real*4        Hmag        ! (mag) ? 2MASS  H  magnitude (hmag)
      real*4        e_Hmag      ! (mag) ? error of 2MASS Hmag (e_hmag)
      real*4        Kmag        ! (mag) ? 2MASS  K  magnitude (kmag)
      real*4        e_Kmag      ! (mag) ? error of 2MASS Kmag (e_kmag)
      real*4        B1mag       ! (mag) ? USNO-B, 1st epoch B magnitude (b1mag)
      real*4        B2mag       ! (mag) ? USNO-B, 2nd epoch B magnitude (b2mag)
      real*4        R1mag       ! (mag) ? USNO-B, 1st epoch R magnitude (r1mag)
      real*4        R2mag       ! (mag) ? USNO-B, 2nd epoch R magnitude (r2mag)
      real*4        Imag        ! (mag) ? USNO-B I magnitude (imag)
      integer*4     Surveys     ! ? Origin of USNO-B magnitudes (surveys) (2)
      integer*4     Nobs        ! ? Total number of astrometric observations
*                                  (n_PPMXL+1) (nobs)
      integer*8     GaiaId      ! Gaia unique source identifier (gaia-id)
      real*4        Gmag        ! (mag) ? Mean Gaia G-band magnitude (Gmag)
      real*4        e_Gmag      ! (mag) ? estimated error of Gaia Gmag (e_Gmag)
      integer*4     Clone       ! [1]? 1 if more than one PPMXL match to this
*                                   Gaia object (clone)
      integer*4     Nosc        ! [1]? 1 if object not in SuperCOSMOS within 3"
*                                  (no_sc)
*Note (1): The pair of ipix and comp is a primary key for HSOY. The recommended
*  identifier form is 'HSOY ipix.comp', where comp=0 for NULL comps.
*Note (2): Flags indicating the origin of the 5 USNO-B magnitudes,
*     ---------------------------------------------------
*     #   Survey   Emuls  Wavelen.   Zones  Fld  Dates
*                            (nm)                  Obs.
*     ---------------------------------------------------
*     0 = POSS-I   103a-O  350-500 -30..+90 936 1949-1965
*     1 = POSS-I   103a-E  620-670 -30..+90 936 1949-1965
*     2 = POSS-II  IIIa-J  385-540 +00..+87 897 1985-2000
*     3 = POSS-II  IIIa-F  610-690 +00..+87 897 1985-1999
*     4 = SERC-J   IIIa-J  385-540 -90..-05 606 1978-1990
*     5 = ESO-R    IIIa-F  630-690 -90..-05 624 1974-1994
*     6 = AAO-R    IIIa-F  590-690 -90..-20 606 1985-1998
*     7 = POSS-II* IV-N    730-900 +05..+87 800 1981-2002
*     ---------------------------------------------------
*     (*) Here #7 includes the SERC-I plates in the zones
*          +05..+20 (numbered #9 in USNO-B1.0)
*     ---------------------------------------------------

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

C  Loading file 'hsoy.sam'	! The HSOY catalogue (583001653 sources)

C  Format for file interpretation

    1 format(
     +  F14.10,1X,F14.10,1X,I19,1X,I1,1X,F6.3,1X,F6.3,1X,F9.3,1X,F9.3,
     +  1X,F5.3,1X,F5.3,1X,F7.2,1X,F7.2,1X,F6.3,1X,F5.3,1X,F6.3,1X,
     +  F5.3,1X,F6.3,1X,F5.3,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,
     +  1X,I5,1X,I2,1X,I19,1X,F6.3,1X,F5.3,1X,I1,3X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'hsoy.sam')
      write(6,*) '....Loading file: hsoy.sam'
      do i__=1,1000
        read(1,'(A230)')ar__
        read(ar__,1)
     +  RAdeg,DEdeg,ipix,comp,e_RAdeg,e_DEdeg,pmRA,pmDE,e_pmRA,e_pmDE,
     +  EpRA,EpDE,Jmag,e_Jmag,Hmag,e_Hmag,Kmag,e_Kmag,B1mag,B2mag,
     +  R1mag,R2mag,Imag,Surveys,Nobs,GaiaId,Gmag,e_Gmag,Clone,Nosc
        if(ar__(115:120) .EQ. '') Jmag = rNULL__
        if(ar__(122:126) .EQ. '') e_Jmag = rNULL__
        if(ar__(128:133) .EQ. '') Hmag = rNULL__
        if(ar__(135:139) .EQ. '') e_Hmag = rNULL__
        if(ar__(141:146) .EQ. '') Kmag = rNULL__
        if(ar__(148:152) .EQ. '') e_Kmag = rNULL__
        if(ar__(154:158) .EQ. '') B1mag = rNULL__
        if(ar__(160:164) .EQ. '') B2mag = rNULL__
        if(ar__(166:170) .EQ. '') R1mag = rNULL__
        if(ar__(172:176) .EQ. '') R2mag = rNULL__
        if(ar__(178:182) .EQ. '') Imag = rNULL__
        if(ar__(184:188) .EQ. '') Surveys = iNULL__
        if(ar__(190:191) .EQ. '') Nobs = iNULL__
        if(ar__(213:218) .EQ. '') Gmag = rNULL__
        if(ar__(220:224) .EQ. '') e_Gmag = rNULL__
        if(ar__(226:226) .EQ. '') Clone = iNULL__
        if(ar__(230:230) .EQ. '') Nosc = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  RAdeg,DEdeg,ipix,comp,e_RAdeg,e_DEdeg,pmRA,pmDE,e_pmRA,e_pmDE,
     +  EpRA,EpDE,Jmag,e_Jmag,Hmag,e_Hmag,Kmag,e_Kmag,B1mag,B2mag,
     +  R1mag,R2mag,Imag,Surveys,Nobs,GaiaId,Gmag,e_Gmag,Clone,Nosc
c    .......End.of.Just test output...........
      end do
      close(1)

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