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

Conversion of standardized ReadMe file for file /./ftp/cats/VII/275 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 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       ! (deg) Right ascension (J2000)
      real*4        DEdeg       ! (deg) Declination (J2000)
      real*8        Dist        ! (Mpc) Distance (predicted if Flag = 3 or 4)
      real*4        Bmag        ! (mag) Apparent B magnitude
*                                         (predicted if Flag = 2 or 4)
      real*4        BmagHyp     ! (mag) ?=- HyperLEDA apparent B magnitude
      real*4        e_BmagHyp   ! (mag) ?=- rms uncertainty on BmagHyp
      real*4        ImagHyp     ! (mag) ?=- HyperLEDA apparent i magnitude
      real*4        e_ImagHyp   ! (mag) ?=- rms uncertainty on ImagHyp
      real*4        modzHyp     ! (mag) ?=- HyperLEDA redshift distance modulus
*                                         (modz=5log(DL)+25, where DL is the
*                                         luminosity distance in Mpc) (1)
      real*4        mod0Hyp     ! (mag) ?=- HyperLEDA true distance modulus
      real*4        logd25Hyp   ! ([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 ! ([0.1arcmin]) ?=- rms uncertainty on logd25Hyp
      real*4        logr25Hyp   ! ([-]) ?=- HyperLEDA decimal logarithm of
*                                         major axis / minor axis ratio
      real*4        e_logr25Hyp ! ([-]) ?=- rms uncertainty on logr25Hyp
      real*4        logdcHyp    ! ([0.1arcmin]) ?=- HyperLEDA decimal logarithm of
*                                         apparent corrected diameter
      real*4        PAHyp       ! (deg) ?=- HyperLEDA Position angle
*                                         (from north through east)
      real*4        BmagHypC    ! (mag) ?=- HyperLEDA apparent corrected B
*                                         magnitude
      real*4        ImagHypC    ! (mag) ?=- HyperLEDA apparent corrected I
*                                         magnitude
      real*4        U_BHypC     ! (mag) ?=- HyperLEDA total apparent corrected
*                                         U-B colour index
      real*4        B_VHypC     ! (mag) ?=- HyperLEDA total apparent corrected
*                                         B-V colour index
      real*4        Jmag2       ! (mag) ?=- 2MASS apparent J magnitude
      real*4        e_Jmag2     ! (mag) ?=- rms uncertainty on Jmag2
      real*4        Hmag2       ! (mag) ?=- 2MASS apparent H magnitude
      real*4        e_Hmag2     ! (mag) ?=- rms uncertainty on Hmag2
      real*4        Kmag2       ! (mag) ?=- 2MASS apparent K magnitude
      real*4        e_Kmag2     ! (mag) ?=- rms uncertainty on Kmag2
      real*4        a_b         ! ?=- Ratio of the semi-major and
*                                         semi-minor axes measured in 2MASS K
      real*4        PAK         ! (deg) ?=- Position angle measured in 2MASS K
      real*4        BmagGWGC    ! (mag) ?=- GWGC apparent B magnitude
      real*8        maj         ! (arcmin) ?=- GWGC major axis diameter
      real*8        e_maj       ! (arcmin) ?=- rms uncertainty on maj
      real*8        min         ! (arcmin) ?=- GWGC minor axis diameter
      real*8        e_min       ! (arcmin) ?=- rms uncertainty on min
      real*4        PAGWGC      ! (deg) ?=- GWGC position angle
*                                         (from north through east)
      real*8        DistGWGC    ! (Mpc) ?=- GWGC distance
      real*4        e_DistGWGC  ! (Mpc) ?=- rms uncertainty on DistGWGC
      real*4        e_BmagGWGC  ! (mag) ?=- rms uncertainty on BmagGWGC
      real*4        Kmag2MPZ    ! (mag) ?=- 2MPZ apparent K magnitude
      real*4        e_Kmag2MPZ  ! (mag) ?=- rms uncertainty on Kmag2MPZ
      real*4        Bmag2MPZ    ! (mag) ?=- 2MPZ apparent B magnitude
*                                         (predicted if Flag not 0)
      real*4        e_Bmag2MPZ  ! (mag) ?=- rms uncertainty on Bmag2MPZ or
*                                         lower value of Bmag2MPZ interval (2)
      real*4        B_Bmag2MPZ  ! (mag) ?=- Upper value of Bmag2MPZ interval (2)
      real*8        zsp2MPZ     ! ?=- 2MPZ spectroscopic redshift
      real*4        zph2MPZ     ! ?=- 2MPZ photometric redshift
*                                         (predicted if Flag not 0)
      real*4        e_zph2MPZ   ! []?=- rms uncertainty on zph2MPZ or
*                                         lower value of zph2MPZ interval (3)
      real*8        B_zph2MPZ   ! []?=- Upper value of zph2MPZ
*                                         interval (3)
      integer*4     Flag        ! [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,DEdeg,Dist,Bmag,BmagHyp,e_BmagHyp,ImagHyp,e_ImagHyp,
     +  modzHyp,mod0Hyp,logd25Hyp,e_logd25Hyp,logr25Hyp,e_logr25Hyp,
     +  logdcHyp,PAHyp,BmagHypC,ImagHypC,U_BHypC,B_VHypC,Jmag2,
     +  e_Jmag2,Hmag2,e_Hmag2,Kmag2,e_Kmag2,a_b,PAK,BmagGWGC,maj,
     +  e_maj,min,e_min,PAGWGC,DistGWGC,e_DistGWGC,e_BmagGWGC,
     +  Kmag2MPZ,e_Kmag2MPZ,Bmag2MPZ,e_Bmag2MPZ,B_Bmag2MPZ,zsp2MPZ,
     +  zph2MPZ,e_zph2MPZ,B_zph2MPZ,Flag
        if (idig(ar__(45:49)).EQ.0) BmagHyp =  rNULL__
        if (idig(ar__(51:54)).EQ.0) e_BmagHyp =  rNULL__
        if (idig(ar__(56:60)).EQ.0) ImagHyp =  rNULL__
        if (idig(ar__(62:65)).EQ.0) e_ImagHyp =  rNULL__
        if (idig(ar__(67:71)).EQ.0) modzHyp =  rNULL__
        if (idig(ar__(73:77)).EQ.0) mod0Hyp =  rNULL__
        if (idig(ar__(79:83)).EQ.0) logd25Hyp =  rNULL__
        if (idig(ar__(85:88)).EQ.0) e_logd25Hyp =  rNULL__
        if (idig(ar__(90:93)).EQ.0) logr25Hyp =  rNULL__
        if (idig(ar__(95:98)).EQ.0) e_logr25Hyp =  rNULL__
        if (idig(ar__(100:104)).EQ.0) logdcHyp =  rNULL__
        if (idig(ar__(106:110)).EQ.0) PAHyp =  rNULL__
        if (idig(ar__(112:116)).EQ.0) BmagHypC =  rNULL__
        if (idig(ar__(118:122)).EQ.0) ImagHypC =  rNULL__
        if (idig(ar__(124:128)).EQ.0) U_BHypC =  rNULL__
        if (idig(ar__(130:134)).EQ.0) B_VHypC =  rNULL__
        if (idig(ar__(136:141)).EQ.0) Jmag2 =  rNULL__
        if (idig(ar__(143:147)).EQ.0) e_Jmag2 =  rNULL__
        if (idig(ar__(149:154)).EQ.0) Hmag2 =  rNULL__
        if (idig(ar__(156:160)).EQ.0) e_Hmag2 =  rNULL__
        if (idig(ar__(162:167)).EQ.0) Kmag2 =  rNULL__
        if (idig(ar__(169:173)).EQ.0) e_Kmag2 =  rNULL__
        if (idig(ar__(175:177)).EQ.0) a_b =  rNULL__
        if (idig(ar__(179:183)).EQ.0) PAK =  rNULL__
        if (idig(ar__(185:189)).EQ.0) BmagGWGC =  rNULL__
        if (idig(ar__(191:197)).EQ.0) maj =  rNULL__
        if (idig(ar__(199:205)).EQ.0) e_maj =  rNULL__
        if (idig(ar__(207:213)).EQ.0) min =  rNULL__
        if (idig(ar__(215:221)).EQ.0) e_min =  rNULL__
        if (idig(ar__(223:227)).EQ.0) PAGWGC =  rNULL__
        if (idig(ar__(229:236)).EQ.0) DistGWGC =  rNULL__
        if (idig(ar__(238:243)).EQ.0) e_DistGWGC =  rNULL__
        if (idig(ar__(245:248)).EQ.0) e_BmagGWGC =  rNULL__
        if (idig(ar__(250:255)).EQ.0) Kmag2MPZ =  rNULL__
        if (idig(ar__(257:261)).EQ.0) e_Kmag2MPZ =  rNULL__
        if (idig(ar__(263:268)).EQ.0) Bmag2MPZ =  rNULL__
        if (idig(ar__(270:275)).EQ.0) e_Bmag2MPZ =  rNULL__
        if (idig(ar__(277:282)).EQ.0) B_Bmag2MPZ =  rNULL__
        if (idig(ar__(284:291)).EQ.0) zsp2MPZ =  rNULL__
        if (idig(ar__(293:311)).EQ.0) zph2MPZ =  rNULL__
        if (idig(ar__(313:333)).EQ.0) e_zph2MPZ =  rNULL__
        if (idig(ar__(335:352)).EQ.0) B_zph2MPZ =  rNULL__
c    ..............Just test output...........
        write(6,1)
     +  RAdeg,DEdeg,Dist,Bmag,BmagHyp,e_BmagHyp,ImagHyp,e_ImagHyp,
     +  modzHyp,mod0Hyp,logd25Hyp,e_logd25Hyp,logr25Hyp,e_logr25Hyp,
     +  logdcHyp,PAHyp,BmagHypC,ImagHypC,U_BHypC,B_VHypC,Jmag2,
     +  e_Jmag2,Hmag2,e_Hmag2,Kmag2,e_Kmag2,a_b,PAK,BmagGWGC,maj,
     +  e_maj,min,e_min,PAGWGC,DistGWGC,e_DistGWGC,e_BmagGWGC,
     +  Kmag2MPZ,e_Kmag2MPZ,Bmag2MPZ,e_Bmag2MPZ,B_Bmag2MPZ,zsp2MPZ,
     +  zph2MPZ,e_zph2MPZ,B_zph2MPZ,Flag
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