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

Conversion of standardized ReadMe file for file /./ftp/cats/I/324 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 2018-Oct-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/324               The Initial Gaia Source List (IGSL)     (Smart, 2013)
*================================================================================
*The Initial Gaia Source List (IGSL)
*     Smart R.L., Nicastro L.
*    <ESA Document Gaia-C3-TN-OATO-RLS-004-01 >
*    =2013yCat.1324....0S
*    =2014A&A...570A..87S
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'igsl3.sam'	! Sample of the IGSL3 data release

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

      integer*8     sourceId   (nr__) ! Source identifier
      real*8        RAJ2000    (nr__) ! (deg) Right Ascension at J2000 (alpha)
      real*8        DEJ2000    (nr__) ! (deg) Declination at J2000 (delta)
      real*4        magBJ      (nr__) ! (mag) ? GSC23 B mag measure
      real*4        magRF      (nr__) ! (mag) ? GSC23 R mag measure
      real*4        magG       (nr__) ! (mag) ? G mag estimate
      real*4        magGrvs    (nr__) ! (mag) ? Grvs mag estimate
      real*4        e_magBJ    (nr__) ! (mag) ? Standard error on magBJ
      real*4        e_magRF    (nr__) ! (mag) ? Standard error on magRF
      real*4        e_magG     (nr__) ! (mag) ? Standard error on magG
      real*4        e_magGrvs  (nr__) ! (mag) ? Standard error on magGrvs
      real*4        e_RAJ2000  (nr__) ! (arcsec) Standard error on
*                                               RAJ2000*cos(DEJ2000)
      real*4        e_DEJ2000  (nr__) ! (arcsec) Standard error on DEJ2000
      real*8        alphaEpoch (nr__) ! (yr) Mean Epoch of Right Ascension
      real*8        deltaEpoch (nr__) ! (yr) Mean Epoch of Declination
      integer*4     sourcePosition(nr__) ! Position source (1)
      real*8        pmRA       (nr__) ! (mas/yr) Proper motion in RA (muAlpha)
      real*8        pmDE       (nr__) ! (mas/yr) Proper motion in DEC (muDelta)
      real*4        e_pmRA     (nr__) ! (mas/yr) ? Standard error on
*                                               pmRA (e_muAlpha)
      real*4        e_pmDE     (nr__) ! (mas/yr) ? Standard error on
*                                               pmDE (e_muDelta)
      integer*4     sourceMu   (nr__) ! Proper motion source (1)
      integer*4     sourceMagBJ(nr__) ! BJ magnitude source (2)
      integer*4     sourceMagRF(nr__) ! RF magnitude source (2)
      integer*4     sourceMagG (nr__) ! G magnitude source (2)
      integer*4     sourceMagGrvs(nr__) ! Grvs magnitude source (2)
      integer*4     classification(nr__) ! ?=-1 Classification
*                                                    0=star, 1=nonstars
      integer*4     sourceClassification(nr__) ! Classification source (1)
      integer*4     toggleASC  (nr__) ! ?=-1 Attitude Star Catalog
*                                                    Toggle (3)
      character*10  idGSC23    (nr__) ! ? GSC23 identifier
      integer*8     idSDSS     (nr__) ! ? SDSS DR9 identifier
      integer*4     idUCAC     (nr__) ! ? UCAC4 identifier
      integer*4     idLQRF     (nr__) ! ? LQRF identifier (4)
      integer*8     idTYCHO    (nr__) ! ? Tycho-2 identifier (5)
      integer*4     idHIP      (nr__) ! ? Hipparcos number
      integer*8     idPPMXL    (nr__) ! ? PPMXL identifier
      integer*8     idOGLE     (nr__) ! ? OGLE identifier (6)
      character*16  idTMASS    (nr__) ! ? 2MASS identifier (7)
      character*19  idGEPC     (nr__) ! ? GEPC identifier
*Note (1): Position, proper motion and classification source catalogs
*     are identified by a number following this convention:
*     1 = 2008AJ....136..735L  Guide Star Catalog
*     2 = 2009ApJS..182..543A  Sloan Digital Sky Survey
*     3 = 2010AJ....139.2184Z  U.S. Naval Observatory CCD Astrograph Catalog
*     4 = 2009A&A...505..385A  Large Quasar Reference Frame
*     5 = 2000A&A...355L..27H  Tycho-2
*    18 = 2006AJ....131.1163S  Two Micron Sky Survey Point Source Catalog
*    49 = 2010AJ....139.2440R  Large PPM catalog
*    66 = 2010AcA....60..295S  Optical Gravitational Lensing Experiment
*    67 = GEPC30               Gaia Ecliptic Pole Catalog
*    68 = mmfd.gsfc.nasa.gov/dist/generalProducts/attitude/ATT_SKYMAP.html
*Note (2): The source of the magnitudes are given based on the
*following codes:
*      01: R_F/B_J = value from  GSC23,  sigma = 0.3
*      02: R_F/B_J = value from  PPMXL,  sigma = 0.4
*      10: R_F     = V-0.0478-0.5739(B-V)-0.0938(B-V)^2-0.4606(B-V)^3
*                    +0.8419(B-V)^4-0.3472(B-V)^5, sigma= sigma_{B},
*                    {\rmNotevalidonlyfor}(B-V)<2.5.
*      11: R_F     = R-0.0066-0.0563(V-R)-0.2505(V-R)^2+0.3912(V-R)^3
*                    -0.0707(V-R)^4, sigma= sigma_{V}
*      12: R_F     = V-0.0137-0.5573(V-I), sigma=(, sigma_{V}^2+,
*                    sigma_{I}^2)^{1/2}
*      13: B_J     = V+0.0036+0.8768(B-V)-0.0594(B-V)^2,
*                    sigma= sigma_{B},{\rmNotevalidonlyfor(B-V)}<2.5.
*      14: B_J     = R-0.0480+2.4850(V-R)-0.8760(V-r)^2+2.9117(V-r)^3
*                    -3.4144(V-r)^4+1.11850(V-r)^5, sigma= sigma_{V}
*      15: B_J     = V+0.0442+0.7851(V-I), sigma=(, sigma_{V}^2+,
*                    sigma_{I}^2)^{1/2}
*      16: R_F     = V_T-0.0478-0.578(B_T-V_T)-0.0677(B_T-V_T)^2
*                    -0.2828(B_T-V_T)^3+0.4395(B_T-V_T)^4+0.1541(B_T-V_T)^5,
*                    sigma= sigma_{V_T},{\rmNotevalidonlyfor}(B_T-V_T)<2.5.
*      17: B_J     = V_T-0.0036+0.655(B_T-V_T)-0.0429(B_T-V_T)^2,
*                    sigma= sigma_{B_T},{\rmNotevalidonlyfor}(B_T-V_T)<2.5.
*      18: R_F     = r+0.1784+0.1187(g-r+0.259)+0.0195(g-r+0.259),
*                    sigma=(0.04+, sigma_r^2)^{0.5}
*      19: B_J     = g+0.0880+0.2434(g-r+0.259)+0.0439(g-r+0.259),
*                    sigma=(0.04+, sigma_g^2)^{0.5}
*      20: B_J     = V_p+0.3608+1.40985(V_p-R_F), sigma=0.5
*      21: B_J     = R_F+0.3841+1.97440(R_F-I_N), sigma=0.5
*      28: G       = V_T-0.0246-0.3354(B_T-V_T)-0.02558(B_T-V_T)^2
*                    -0.05153(B_T-V_T)^3, sigma=(0.2916+, sigma_{V_T}^2+,
*                    sigma_{B_T}^2)^{1/2}
*      29: G_{RVS} = V_T-0.1313-1.3422(B_T-V_T)-0.09316(B_T-V_T)^2
*                    -0.0663(B_T-V_T)^3, sigma=(0.2916+, sigma_{V_T}^2+,
*                    sigma_{B_T}^2)^{1/2}
*      30: G       = g-0.1128-0.5264(g-i)-0.0869(g-i)^2+0.0025(g-i)^3,
*                    sigma=(0.08^2+, sigma_g^2+, sigma_i^2)^{1/2}
*      31: G_{RVS} = g-0.4994-1.2026(g-i)-0.0202(g-i)^2+0.0021(g-i)^3,
*                    sigma=(0.11^2+, sigma_g^2+, sigma_i^2)^{1/2}
*      32: G       = g-0.089-0.8543(g-r)-0.1281(g-r)^2+0.0471(g-r)^3,
*                    sigma=(0.1681+, sigma_g^2+, sigma_r^2)^{1/2}
*      33: G_{RVS} = g-0.4332-1.8906(g-r)-0.0231(g-r)^2-0.0329(g-r)^3,
*                    sigma=(0.2401+, sigma_g^2+, sigma_r^2)^{1/2}
*      41: B_J     = J+4.9816-0.38945670(J-K), sigma=0.5
*      42: R_F     = J+2.6997-0.46257863(J-K), sigma=0.5
*      50: G       = R_F-0.0158+0..2915(B_J-R_F)-0.0347(B_J-R_F)^2
*                    -0.0301(B_J-R_F)^3, sigma=0.4
*      51: G_{RVS} = R_F-0.0974-0.4830(B_J-R_F)-0.0184(B_J-R_F)^2
*                    -0.0178(B_J-R_F)^3, sigma=0.5
*      52: G       = V-0.0247-0.2888(B-V)-0.0353(B-V)^2-0.0839(B-V)^3,
*                    sigma=0.6
*      54: G       = V-0.0208-0.1004(V-I)-0.1593(V-I)^2+0.0083(V-I)^3,
*                    sigma=(, sigma_V^2+, sigma_I^2)^{1/2}
*      55: G_{RVS} = V-0.1333-1.4654(B-V)-0.1075(B-V)^2-0.0768(B-V)^3,
*                    sigma=0.6
*      57: G_{RVS} = V-0.0501-1.1667(V-I)-0.0052(V-I)^2+0.0011(V-I)^3,
*                    sigma=(, sigma_V^2+, sigma_I^2)^{1/2}
*      80: G       = value from  GEPC
*      81: G_{RVS} = value from  GEPC
*Note (3): The Attitude Star Catalog Toggle is 1 if it should be
*          considered a reliable ASC object or 0 if not. Based on the
*          requirements discussed in the related publication.
*Note (4): This identifier refers to a custom version of LQRF used internally
*          in the Gaia team and which was not published
*Note (5): Tycho-2 identifier (idTYCHO): These are the IDs as published in
*        Tycho2. TYCHO-2 objects are identified by 3 numbers (TYC1,TYC2 and
*        TYC3) and we have combined these into one complete number given by
*        (TYC1*1000000.0d0)+(TYC2*10.0d0)+(TYC3*1.0d0). Due to an error in
*        the inclusion of HIPPARCOS stars some HIPPARCOS objects have
*        a TYCHO2 identifier of  9999999000000+HIPARCOS number. For the most
*        part these should be used (when idHIP is null) but some times they are
*        included as they were HIPPARCOS targets not found in Tycho-2.
*Note (6): 2MASS identifier (idTMASS): 2MASS provides indentifiers in a IAU
*          standardized format as 2MASS JHHMMSS.S+DDMMSS.S . These are
*          coded here as +HHMMSSSDDMMSSS.
*Note (7): OGLE identifier (idOGLE): The OGLE ID is given by a combination of A
*          region of sky identifier (RI) equal to 10, 11, 12, 13, 14
*          corresponding to map names blg, car, cen, lmc, mus.  So the ID here
*          is defined as the file running number (NNN.N), the running number in
*          the file (RN) combined as: long(string(RI)+string(NNN.N *
*          10000))+RN.

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

C  Loading file 'igsl3.sam'	! Sample of the IGSL3 data release

C  Format for file interpretation

    1 format(
     +  I19,1X,F10.6,1X,F10.6,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,
     +  1X,F6.3,1X,F6.3,1X,F6.3,1X,F5.3,1X,F5.3,1X,F9.4,1X,F9.4,1X,I2,
     +  1X,F7.1,1X,F7.1,1X,F6.1,1X,F6.1,1X,I2,1X,I2,1X,I2,1X,I2,1X,I2,
     +  1X,I1,1X,I2,1X,I1,1X,A10,1X,I19,1X,I9,1X,I6,1X,I13,1X,I6,1X,
     +  I19,1X,I13,1X,A16,1X,A19)

C  Effective file loading

      open(unit=1,status='old',file=
     +'igsl3.sam')
      write(6,*) '....Loading file: igsl3.sam'
      do i__=1,1000
        read(1,'(A324)')ar__
        read(ar__,1)
     +  sourceId(i__),RAJ2000(i__),DEJ2000(i__),magBJ(i__),magRF(i__),
     +  magG(i__),magGrvs(i__),e_magBJ(i__),e_magRF(i__),e_magG(i__),
     +  e_magGrvs(i__),e_RAJ2000(i__),e_DEJ2000(i__),alphaEpoch(i__),
     +  deltaEpoch(i__),sourcePosition(i__),pmRA(i__),pmDE(i__),
     +  e_pmRA(i__),e_pmDE(i__),sourceMu(i__),sourceMagBJ(i__),
     +  sourceMagRF(i__),sourceMagG(i__),sourceMagGrvs(i__),
     +  classification(i__),sourceClassification(i__),toggleASC(i__),
     +  idGSC23(i__),idSDSS(i__),idUCAC(i__),idLQRF(i__),idTYCHO(i__),
     +  idHIP(i__),idPPMXL(i__),idOGLE(i__),idTMASS(i__),idGEPC(i__)
        if(ar__(43:48) .EQ. '') magBJ(i__) = rNULL__
        if(ar__(50:55) .EQ. '') magRF(i__) = rNULL__
        if(ar__(57:62) .EQ. '') magG(i__) = rNULL__
        if(ar__(64:69) .EQ. '') magGrvs(i__) = rNULL__
        if(ar__(71:76) .EQ. '') e_magBJ(i__) = rNULL__
        if(ar__(78:83) .EQ. '') e_magRF(i__) = rNULL__
        if(ar__(85:90) .EQ. '') e_magG(i__) = rNULL__
        if(ar__(92:97) .EQ. '') e_magGrvs(i__) = rNULL__
        if(ar__(150:155) .EQ. '') e_pmRA(i__) = rNULL__
        if(ar__(157:162) .EQ. '') e_pmDE(i__) = rNULL__
        if(ar__(197:215) .EQ. '') idSDSS(i__) = iNULL__
        if(ar__(217:225) .EQ. '') idUCAC(i__) = iNULL__
        if(ar__(227:232) .EQ. '') idLQRF(i__) = iNULL__
        if(ar__(234:246) .EQ. '') idTYCHO(i__) = iNULL__
        if(ar__(248:253) .EQ. '') idHIP(i__) = iNULL__
        if(ar__(255:273) .EQ. '') idPPMXL(i__) = iNULL__
        if(ar__(275:287) .EQ. '') idOGLE(i__) = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  sourceId(i__),RAJ2000(i__),DEJ2000(i__),magBJ(i__),magRF(i__),
     +  magG(i__),magGrvs(i__),e_magBJ(i__),e_magRF(i__),e_magG(i__),
     +  e_magGrvs(i__),e_RAJ2000(i__),e_DEJ2000(i__),alphaEpoch(i__),
     +  deltaEpoch(i__),sourcePosition(i__),pmRA(i__),pmDE(i__),
     +  e_pmRA(i__),e_pmDE(i__),sourceMu(i__),sourceMagBJ(i__),
     +  sourceMagRF(i__),sourceMagG(i__),sourceMagGrvs(i__),
     +  classification(i__),sourceClassification(i__),toggleASC(i__),
     +  idGSC23(i__),idSDSS(i__),idUCAC(i__),idLQRF(i__),idTYCHO(i__),
     +  idHIP(i__),idPPMXL(i__),idOGLE(i__),idTMASS(i__),idGEPC(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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