FORTRAN Generation
(/./ftp/cats/VII/275)

Conversion of standardized ReadMe file for file /./ftp/cats/VII/275 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 2026-Sep-10
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. VII/275                GLADE catalog                              (Dalya+, 2016)
*================================================================================
*An extended list of galaxies for gravitational wave searches in the advanced
*detector era.
*     Dalya G., Frei Z., Galgoczi G., Raffai P., de Souza R.S.
*    <Mon. Not. R. Astron. Soc., in prep. (2016)>
*   =2016yCat.7275....0D
*   =2016MNRAS.in.prep..
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'glade1.2.dat'	! GLADE catalog
                                 (Galaxy List for the Advanced Detector Era)

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

C  J2000 position composed of: RAdeg DEdeg
      real*8        RAdeg      (nr__) ! (deg) Right ascension (J2000)
      real*4        DEdeg      (nr__) ! (deg) Declination (J2000)
      real*8        Dist       (nr__) ! (Mpc) Distance (predicted if Flag = 3 or 4)
      real*4        Bmag       (nr__) ! (mag) Apparent B magnitude
*                                         (predicted if Flag = 2 or 4)
      real*4        BmagHyp    (nr__) ! (mag) ?=- HyperLEDA apparent B magnitude
      real*4        e_BmagHyp  (nr__) ! (mag) ?=- rms uncertainty on BmagHyp
      real*4        ImagHyp    (nr__) ! (mag) ?=- HyperLEDA apparent i magnitude
      real*4        e_ImagHyp  (nr__) ! (mag) ?=- rms uncertainty on ImagHyp
      real*4        modzHyp    (nr__) ! (mag) ?=- HyperLEDA redshift distance modulus
*                                         (modz=5log(DL)+25, where DL is the
*                                         luminosity distance in Mpc) (1)
      real*4        mod0Hyp    (nr__) ! (mag) ?=- HyperLEDA true distance modulus
      real*4        logd25Hyp  (nr__) ! ([0.1arcmin]) ?=- HyperLEDA decimal logarithm of the
*                                         length of the projected major axis of a
*                                         galaxy at the isophotal level
*                                         25mag/arcsec^2^ in the B-band
      real*4        e_logd25Hyp(nr__) ! ([0.1arcmin]) ?=- rms uncertainty on logd25Hyp
      real*4        logr25Hyp  (nr__) ! ([-]) ?=- HyperLEDA decimal logarithm of
*                                         major axis / minor axis ratio
      real*4        e_logr25Hyp(nr__) ! ([-]) ?=- rms uncertainty on logr25Hyp
      real*4        logdcHyp   (nr__) ! ([0.1arcmin]) ?=- HyperLEDA decimal logarithm of
*                                         apparent corrected diameter
      real*4        PAHyp      (nr__) ! (deg) ?=- HyperLEDA Position angle
*                                         (from north through east)
      real*4        BmagHypC   (nr__) ! (mag) ?=- HyperLEDA apparent corrected B
*                                         magnitude
      real*4        ImagHypC   (nr__) ! (mag) ?=- HyperLEDA apparent corrected I
*                                         magnitude
      real*4        U_BHypC    (nr__) ! (mag) ?=- HyperLEDA total apparent corrected
*                                         U-B colour index
      real*4        B_VHypC    (nr__) ! (mag) ?=- HyperLEDA total apparent corrected
*                                         B-V colour index
      real*4        Jmag2      (nr__) ! (mag) ?=- 2MASS apparent J magnitude
      real*4        e_Jmag2    (nr__) ! (mag) ?=- rms uncertainty on Jmag2
      real*4        Hmag2      (nr__) ! (mag) ?=- 2MASS apparent H magnitude
      real*4        e_Hmag2    (nr__) ! (mag) ?=- rms uncertainty on Hmag2
      real*4        Kmag2      (nr__) ! (mag) ?=- 2MASS apparent K magnitude
      real*4        e_Kmag2    (nr__) ! (mag) ?=- rms uncertainty on Kmag2
      real*4        a_b        (nr__) ! ?=- Ratio of the semi-major and
*                                         semi-minor axes measured in 2MASS K
      real*4        PAK        (nr__) ! (deg) ?=- Position angle measured in 2MASS K
      real*4        BmagGWGC   (nr__) ! (mag) ?=- GWGC apparent B magnitude
      real*8        maj        (nr__) ! (arcmin) ?=- GWGC major axis diameter
      real*8        e_maj      (nr__) ! (arcmin) ?=- rms uncertainty on maj
      real*8        min        (nr__) ! (arcmin) ?=- GWGC minor axis diameter
      real*8        e_min      (nr__) ! (arcmin) ?=- rms uncertainty on min
      real*4        PAGWGC     (nr__) ! (deg) ?=- GWGC position angle
*                                         (from north through east)
      real*8        DistGWGC   (nr__) ! (Mpc) ?=- GWGC distance
      real*4        e_DistGWGC (nr__) ! (Mpc) ?=- rms uncertainty on DistGWGC
      real*4        e_BmagGWGC (nr__) ! (mag) ?=- rms uncertainty on BmagGWGC
      real*4        Kmag2MPZ   (nr__) ! (mag) ?=- 2MPZ apparent K magnitude
      real*4        e_Kmag2MPZ (nr__) ! (mag) ?=- rms uncertainty on Kmag2MPZ
      real*4        Bmag2MPZ   (nr__) ! (mag) ?=- 2MPZ apparent B magnitude
*                                         (predicted if Flag not 0)
      real*4        e_Bmag2MPZ (nr__) ! (mag) ?=- rms uncertainty on Bmag2MPZ or
*                                         lower value of Bmag2MPZ interval (2)
      real*4        B_Bmag2MPZ (nr__) ! (mag) ?=- Upper value of Bmag2MPZ interval (2)
      real*8        zsp2MPZ    (nr__) ! ?=- 2MPZ spectroscopic redshift
      real*4        zph2MPZ    (nr__) ! ?=- 2MPZ photometric redshift
*                                         (predicted if Flag not 0)
      real*4        e_zph2MPZ  (nr__) ! []?=- rms uncertainty on zph2MPZ or
*                                         lower value of zph2MPZ interval (3)
      real*8        B_zph2MPZ  (nr__) ! []?=- Upper value of zph2MPZ
*                                         interval (3)
      integer*4     Flag       (nr__) ! [0/4] Flag for estimated values (4)
*Note (1): Cosmological parameters used to calculate distance from redshift:
*  H_0_=70, Omega_m_=0.3, Omega_Lambda_=0.7
*Note (2): For error on Bmag2MPZ:
*  if Flag is 0, this e_Bmag2MPZ is the error of Bmag in the 2MPZ,
*   else e_Bmag2MPZ and e_Bmag2MPZ2 gives the predicted intervals in between
*   the real value falls with 95% probability
*Note (3): For error on zph2MPZ:
*  if Flag is 0, this e_zph2MPZ is the error of zphot in the 2MPZ, else
*   e_zph2MPZ and e_zph2MPZ2 gives the predicted intervals in between the real
*   value falls with 95% probability
*Note (4): Flag value as follows:
* 0 = none of the values are estimated
* 1 = Bmag2MPZ, e_Bmag2MPZ, B_Bmag2MPZ, zph2MPZ, e_zph2MPZ and B_zph2MPZ
*      are predicted values, however, Dist and Bmag are not
* 2 = Bmag, Bmag2MPZ, e_Bmag2MPZ, B_Bmag2MPZ, zph2MPZ, e_zph2MPZ and B_zph2MPZ
*      are predicted values, however, Dist is not
* 3 = Dist, Bmag2MPZ, e_Bmag2MPZ, B_Bmag2MPZ, zph2MPZ, e_zph2MPZ and B_zph2MPZ
*      are predicted values, however, Bmag is not
* 4 = Dist, Bmag, Bmag2MPZ, e_Bmag2MPZ, B_Bmag2MPZ, zph2MPZ, e_zph2MPZ and
*      B_zph2MPZ are predicted values

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

C  Loading file 'glade1.2.dat'	! GLADE catalog
*                                 (Galaxy List for the Advanced Detector Era)

C  Format for file interpretation

    1 format(
     +  F10.6,1X,E10.6,1X,F14.8,1X,F6.3,1X,F5.2,1X,F4.2,1X,F5.2,1X,
     +  F4.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F5.2,
     +  1X,F5.1,1X,F5.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,F6.3,1X,F5.3,1X,
     +  F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F3.1,1X,F5.1,1X,F5.2,1X,F7.3,
     +  1X,F7.3,1X,F7.3,1X,F7.3,1X,F5.1,1X,F8.4,1X,F6.3,1X,F4.2,1X,
     +  F6.3,1X,F5.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F8.5,1X,E19.17,1X,
     +  E21.18,1X,F18.16,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'glade1.2.dat')
      write(6,*) '....Loading file: glade1.2.dat'
      do i__=1,1918147
        read(1,'(A354)')ar__
        read(ar__,1)
     +  RAdeg(i__),DEdeg(i__),Dist(i__),Bmag(i__),BmagHyp(i__),
     +  e_BmagHyp(i__),ImagHyp(i__),e_ImagHyp(i__),modzHyp(i__),
     +  mod0Hyp(i__),logd25Hyp(i__),e_logd25Hyp(i__),logr25Hyp(i__),
     +  e_logr25Hyp(i__),logdcHyp(i__),PAHyp(i__),BmagHypC(i__),
     +  ImagHypC(i__),U_BHypC(i__),B_VHypC(i__),Jmag2(i__),
     +  e_Jmag2(i__),Hmag2(i__),e_Hmag2(i__),Kmag2(i__),e_Kmag2(i__),
     +  a_b(i__),PAK(i__),BmagGWGC(i__),maj(i__),e_maj(i__),min(i__),
     +  e_min(i__),PAGWGC(i__),DistGWGC(i__),e_DistGWGC(i__),
     +  e_BmagGWGC(i__),Kmag2MPZ(i__),e_Kmag2MPZ(i__),Bmag2MPZ(i__),
     +  e_Bmag2MPZ(i__),B_Bmag2MPZ(i__),zsp2MPZ(i__),zph2MPZ(i__),
     +  e_zph2MPZ(i__),B_zph2MPZ(i__),Flag(i__)
        if (idig(ar__(45:49)).EQ.0) BmagHyp(i__) =  rNULL__
        if (idig(ar__(51:54)).EQ.0) e_BmagHyp(i__) =  rNULL__
        if (idig(ar__(56:60)).EQ.0) ImagHyp(i__) =  rNULL__
        if (idig(ar__(62:65)).EQ.0) e_ImagHyp(i__) =  rNULL__
        if (idig(ar__(67:71)).EQ.0) modzHyp(i__) =  rNULL__
        if (idig(ar__(73:77)).EQ.0) mod0Hyp(i__) =  rNULL__
        if (idig(ar__(79:83)).EQ.0) logd25Hyp(i__) =  rNULL__
        if (idig(ar__(85:88)).EQ.0) e_logd25Hyp(i__) =  rNULL__
        if (idig(ar__(90:93)).EQ.0) logr25Hyp(i__) =  rNULL__
        if (idig(ar__(95:98)).EQ.0) e_logr25Hyp(i__) =  rNULL__
        if (idig(ar__(100:104)).EQ.0) logdcHyp(i__) =  rNULL__
        if (idig(ar__(106:110)).EQ.0) PAHyp(i__) =  rNULL__
        if (idig(ar__(112:116)).EQ.0) BmagHypC(i__) =  rNULL__
        if (idig(ar__(118:122)).EQ.0) ImagHypC(i__) =  rNULL__
        if (idig(ar__(124:128)).EQ.0) U_BHypC(i__) =  rNULL__
        if (idig(ar__(130:134)).EQ.0) B_VHypC(i__) =  rNULL__
        if (idig(ar__(136:141)).EQ.0) Jmag2(i__) =  rNULL__
        if (idig(ar__(143:147)).EQ.0) e_Jmag2(i__) =  rNULL__
        if (idig(ar__(149:154)).EQ.0) Hmag2(i__) =  rNULL__
        if (idig(ar__(156:160)).EQ.0) e_Hmag2(i__) =  rNULL__
        if (idig(ar__(162:167)).EQ.0) Kmag2(i__) =  rNULL__
        if (idig(ar__(169:173)).EQ.0) e_Kmag2(i__) =  rNULL__
        if (idig(ar__(175:177)).EQ.0) a_b(i__) =  rNULL__
        if (idig(ar__(179:183)).EQ.0) PAK(i__) =  rNULL__
        if (idig(ar__(185:189)).EQ.0) BmagGWGC(i__) =  rNULL__
        if (idig(ar__(191:197)).EQ.0) maj(i__) =  rNULL__
        if (idig(ar__(199:205)).EQ.0) e_maj(i__) =  rNULL__
        if (idig(ar__(207:213)).EQ.0) min(i__) =  rNULL__
        if (idig(ar__(215:221)).EQ.0) e_min(i__) =  rNULL__
        if (idig(ar__(223:227)).EQ.0) PAGWGC(i__) =  rNULL__
        if (idig(ar__(229:236)).EQ.0) DistGWGC(i__) =  rNULL__
        if (idig(ar__(238:243)).EQ.0) e_DistGWGC(i__) =  rNULL__
        if (idig(ar__(245:248)).EQ.0) e_BmagGWGC(i__) =  rNULL__
        if (idig(ar__(250:255)).EQ.0) Kmag2MPZ(i__) =  rNULL__
        if (idig(ar__(257:261)).EQ.0) e_Kmag2MPZ(i__) =  rNULL__
        if (idig(ar__(263:268)).EQ.0) Bmag2MPZ(i__) =  rNULL__
        if (idig(ar__(270:275)).EQ.0) e_Bmag2MPZ(i__) =  rNULL__
        if (idig(ar__(277:282)).EQ.0) B_Bmag2MPZ(i__) =  rNULL__
        if (idig(ar__(284:291)).EQ.0) zsp2MPZ(i__) =  rNULL__
        if (idig(ar__(293:311)).EQ.0) zph2MPZ(i__) =  rNULL__
        if (idig(ar__(313:333)).EQ.0) e_zph2MPZ(i__) =  rNULL__
        if (idig(ar__(335:352)).EQ.0) B_zph2MPZ(i__) =  rNULL__
c    ..............Just test output...........
        write(6,1)
     +  RAdeg(i__),DEdeg(i__),Dist(i__),Bmag(i__),BmagHyp(i__),
     +  e_BmagHyp(i__),ImagHyp(i__),e_ImagHyp(i__),modzHyp(i__),
     +  mod0Hyp(i__),logd25Hyp(i__),e_logd25Hyp(i__),logr25Hyp(i__),
     +  e_logr25Hyp(i__),logdcHyp(i__),PAHyp(i__),BmagHypC(i__),
     +  ImagHypC(i__),U_BHypC(i__),B_VHypC(i__),Jmag2(i__),
     +  e_Jmag2(i__),Hmag2(i__),e_Hmag2(i__),Kmag2(i__),e_Kmag2(i__),
     +  a_b(i__),PAK(i__),BmagGWGC(i__),maj(i__),e_maj(i__),min(i__),
     +  e_min(i__),PAGWGC(i__),DistGWGC(i__),e_DistGWGC(i__),
     +  e_BmagGWGC(i__),Kmag2MPZ(i__),e_Kmag2MPZ(i__),Bmag2MPZ(i__),
     +  e_Bmag2MPZ(i__),B_Bmag2MPZ(i__),zsp2MPZ(i__),zph2MPZ(i__),
     +  e_zph2MPZ(i__),B_zph2MPZ(i__),Flag(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C Locate position of first digit in string; or return 0
      integer function idig(c)
      character*(*) c
      character*1 c1
      integer lc,i
      lc=len(c)
      idig=0
      do i=1,lc
         if(c(i:i).ne.' ') go to 1
      end do
    1 if(i.gt.lc) return
      c1=c(i:i)
      if(c1.eq.'.'.or.c1.eq.'-'.or.c1.eq.'+') i=i+1
      if(i.gt.lc) return
      c1=c(i:i)
      if(c1.ge.'0'.and.c1.le.'9') idig=i
      return
      end