FORTRAN Generation
(/./ftp/cats/J/A_A/526/A28)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/526/A28 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 2024-Mar-19
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. J/A+A/526/A28    SDSS-II supernovae NTT and NOT spectroscopy    (Oestman+, 2011)
*================================================================================
*NTT and NOT spectroscopy of SDSS-II supernovae.
*    Oestman L., Nordin J., Goobar A., Amanullah R., Smith M., Sollerman J.,
*    Stanishev V., Stritzinger M.D., Bassett B.A., Davis T.M., Edmondson E.,
*    Frieman J.A., Garnavich P.M., Lampeitl H., Leloudas G., Marriner J.,
*    Nichol R.C., Romer K., Sako M., Schneider D.P., Zheng C.
*   <Astron. Astrophys., 526, A28 (2011)>
*   =2011A&A...526A..28O
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'tablea1.dat'	! Information about the observations

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

      integer*4     ID          ! [12778/22284] Source ID number,
*                                  <SDSS-II SNNNNNN> in Simbad
      integer*4     SPID        ! Spectrum SPID (1)
      character*6   SN          ! IAU name (YYYYaa)
      character*3   Tel         ! [NOT NTT] Telescope used
      real*4        Slit        ! (arcsec) Slit width
      integer*4     Texp        ! (s) Exposure time
      real*4        Air         ! Airmass
      real*4        See         ! (arcsec) Seeing (2)
*Note (1): Most of the spectra in the table that lack IAU names are
*     photometric SNe without reliable spectroscopic confirmation and
*     unclassified objects.
*Note (2): The FWHM seeing at 5000{AA} for the airmass at which the
*     observations were conducted.

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

C  Declarations for 'tablea2.dat'	! Spectroscopic typing and redshift determination

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

      integer*4     ID_1        ! [12778/22284] Source ID number
      integer*4     SPID_1      ! Spectrum SPID number
      character*13  Type1       ! SDSS SN type (3)
      character*14  Type2       ! NTT/NOT SN type (4)
      real*4        LC          ! (d) ? Number of days in rest frame from B-band
*                                    maximum obtained from the lightcurve (5)
      real*4        e_LC        ! (d) ? Error on  LC
      character*1   n_LC        ! [p] Note on LC (6)
      real*4        SNID        ! (d) ? Number of days in rest frame from B-band
*                                    maximum obtained from SNID (7)
      real*4        e_SNID      ! (d) ? Error on SNID
      real*8        ze          ! ? SDSS redshift (8)
      real*8        e_ze        ! ? Error on ze
      real*8        z           ! ? SNID redshift
      real*8        e_z         ! ? Error on z
      character*8   Notes       ! Notes (9)
*Note (3): The overall SDSS type which is based on the results from the NTT/NOT
*  analysis in combination with spectra from other telescopes.
*Note (4): The typing of the individual spectra in this analysis is based on the
*  result from SNID in combination with a visual inspection. If a subtype could
*  be determined, this is given in the table, otherwise only the type. Thus, when
*  the type is given as solely Ia, this means that SNID could not determine if it
*  is a normal SN Ia or a non-normal (peculiar, SN 1991T or SN 1991bg). In the
*  cases where all template spectra which could be matched with the input
*  spectrum with SNID belong to the same SN, the name of the SN is written within
*  parenthesis. When the type is NotSN or Gal, this usually means that the
*  transient was too faint, or the observing conditions were not good enough, so
*  that the contribution from the host galaxy dominates the spectrum.
*Note (5): An age is given when the object has been classified as a SN Ia, as
*  well as there were enough photometry to build a lightcurve.
*Note (6): The sign "p" is added after the lightcurve age when the lightcurve
*  lacked photometry either before or after maximum brightness.
*Note (7): If no error is given, there was only one template fitting the
*  requirements in SNID.
*Note (8): The object redshifts from Zheng et al. (in preparation), which have
*  their origin in SDSS DR7 redshifts in combination with measurements of
*  both NTT/NOT spectra and other spectra.
*Note (9): Additional information as follows:
*  s = when the SNID type was determined from the host-galaxy subtracted spectrum
*  f = if there were few template spectra matching the input spectrum, at which
*      fewer than 5 spectra were used to determine the type, the redshift
*      and/or the age
*  v = when the type obtained from SNID was changed after the visual inspection
* zg = when the redshift is not obtained from SDSS DR7, and determined from
*      galaxy lines
* zs = when the redshift is not obtained from SDSS DR7, and determined from
*      SN features
* zt = if the redshift was determined through template fitting

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

C  Declarations for 'tablea3.dat'	! *Spectral quality

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

      integer*4     ID_2        ! [12778/22284] Source ID number
      integer*4     SPID_2      ! Spectrum ID number
      real*4        Host        ! [0/1]?=- Host contamination (10)
      character*1   n_Host      ! [e] e when estimation based on an
*                                     extrapolation of the photometry
      real*4        Sloss       ! [0/1] Estimated maximum differential slit loss
*                                  due to atmospheric refraction affecting the SN
*                                  light in the wavelength region 4000-8000{AA}
*                                  (observed frame)
*Note (10): The estimated host-galaxy contamination in the observed spectra,
*     i.e. before host-galaxy subtraction has been attempted, for
*     wavelengths corresponding to the g filter in observed frame.

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

C  Loading file 'tablea1.dat'	! Information about the observations

C  Format for file interpretation

    1 format(I5,1X,I4,1X,A6,1X,A3,1X,F3.1,1X,I4,1X,F4.2,1X,F3.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea1.dat')
      write(6,*) '....Loading file: tablea1.dat'
      do i__=1,290
        read(1,'(A39)')ar__
        read(ar__,1)ID,SPID,SN,Tel,Slit,Texp,Air,See
c    ..............Just test output...........
        write(6,1)ID,SPID,SN,Tel,Slit,Texp,Air,See
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablea2.dat'	! Spectroscopic typing and redshift determination

C  Format for file interpretation

    2 format(
     +  I5,1X,I4,1X,A13,1X,A14,1X,F6.2,1X,F4.2,A1,1X,F5.1,1X,F5.1,2X,
     +  F7.5,1X,F7.5,2X,F7.5,1X,F7.5,1X,A8)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea2.dat')
      write(6,*) '....Loading file: tablea2.dat'
      do i__=1,290
        read(1,'(A107)')ar__1
        read(ar__1,2)
     +  ID_1,SPID_1,Type1,Type2,LC,e_LC,n_LC,SNID,e_SNID,ze,e_ze,z,
     +  e_z,Notes
        if(ar__1(41:46) .EQ. '') LC = rNULL__
        if(ar__1(48:51) .EQ. '') e_LC = rNULL__
        if(ar__1(54:58) .EQ. '') SNID = rNULL__
        if(ar__1(60:64) .EQ. '') e_SNID = rNULL__
        if(ar__1(67:73) .EQ. '') ze = rNULL__
        if(ar__1(75:81) .EQ. '') e_ze = rNULL__
        if(ar__1(84:90) .EQ. '') z = rNULL__
        if(ar__1(92:98) .EQ. '') e_z = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  ID_1,SPID_1,Type1,Type2,LC,e_LC,n_LC,SNID,e_SNID,ze,e_ze,z,
     +  e_z,Notes
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablea3.dat'	! *Spectral quality

C  Format for file interpretation

    3 format(I5,1X,I4,1X,F3.1,A1,1X,F3.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea3.dat')
      write(6,*) '....Loading file: tablea3.dat'
      do i__=1,290
        read(1,'(A19)')ar__2
        read(ar__2,3)ID_2,SPID_2,Host,n_Host,Sloss
        if (idig(ar__2(12:14)).EQ.0) Host =  rNULL__
c    ..............Just test output...........
        write(6,3)ID_2,SPID_2,Host,n_Host,Sloss
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