FORTRAN Generation
()

Conversion of standardized ReadMe file for catalog 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.5, on 2013-May-22
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__=-1.e37)     	! NULL real number
      parameter  (iNULL__=-2147483647)	! NULL int  number

C=============================================================================
Cat. II/218              Sternberg Supernova Catalogue     (Tsvetkov+ 1998)
*================================================================================
*Sternberg Astronomical Institute Supernova Catalogue (1998July Version)
*     Tsvetkov D.Yu., Pavlyuk N.N., Bartunov O.S.
*    <SAISN group (1998)>
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'sn.dat'	! The Catalog

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

      real*8        RA_         ! (deg) Right Ascension J2000.0
      real*8        Dec         ! (deg)     Declination J2000.0
      character*6   SN          ! SN designation
      character*12  Gname       ! Galaxy identification from NGC (N), IC (I),
*                                     MCG (M), UGC (U) and ESO (E) catalogues.
      integer*4     RAGh        ! (h) [0/23]? Galaxy Right Ascension (J2000.0)
      real*4        RAGm        ! (min) [0/60[? Galaxy Right Ascension (J2000.0)
      character*1   DEG_        ! Galaxy Declination (J2000.0)
      integer*4     DEGd        ! (deg) [0/90]? Galaxy Declination (J2000.0)
      real*4        DEGm        ! (arcmin) [0/60[? Galaxy Declination (J2000.0)
      real*4        Gmag        ! (mag) ? Photographic magnitude of Galaxy
      integer*4     r_Gmag      ! *[1,3]? Source of magnitude
      integer*4     Gpa         ! (deg) ? Position angle measured from North to East
      integer*4     Gi          ! (deg) ? Inclination angle for disk-like systems
*                                     (i = 0 for face-on systems)
      integer*4     GVhel       ! (km/s) ? Heliocentric recession velocity
      character*1   u_GVhel     ! Uncertainty flag (:) on GVhel
      character*6   Gtype       ! Morphological type
      real*4        GlogR       ! ? Decimal log of axial ratio
      real*4        GlogD       ! ([0.1arcmin]) ? Decimal log of apparent isophotal
*                                       major diameter
      integer*4     GTRC3       ! ? Numerical code of morphological type as
*                                       in RC3
      integer*4     GLcRC3      ! ? Luminosity class as in RC3
      real*8        EWoff       ! (arcsec) ? E/W offset of SN in arcsec from
*                                      the nucleus of the parent galaxy
      character*1   EW          ! [EW] East or West direction
      real*8        NSoff       ! (arcsec) ? N/S offset of SN from nucleus
      character*1   NS          ! [NS] North or South direction
      real*4        mag         ! (mag) ? Magnitude at maximum: Photographic or band
      character*1   l_mag       ! *[>=] Note about the magnitude
      character*1   n_mag       ! [UBVRIJ] Passband of photometry
      character*1   u_mag       ! Uncertainty flag (:) on mag
      character*5   datMax      ! Date of maximum light
      character*5   datDisc     ! Date of discovery
      character*6   Type        ! SN type
      integer*4     RAh         ! (h) [0/23]? SN Right Ascension (J2000.0)
      integer*4     RAm         ! (min) [0/60[? SN Right Ascension (J2000.0)
      real*4        RAs         ! (s) [0/60[? SN Right Ascension (J2000.0)
      character*1   DE_         ! SN Declination (J2000.0)
      integer*4     DEd         ! (deg) [0/90]? SN Declination (J2000.0)
      integer*4     DEm         ! (arcmin) [0/60[? SN Declination (J2000.0)
      real*4        DEs         ! (arcsec) [0/60[? SN Declination (J2000.0)
      character*2   Uncert      ! [? ] "?" and "??" designate uncertain
*                                       and very uncertain SN.
      character*2   Disc        ! *Code for SN search programme (Observatory)
      character*85  Text        ! Discoverer and comments; the asterisk (*)
*                                       indicates a note in file "notes.dat"
*Note on r_Gmag:
*    1 = from PGC catalogue,
*    2 = from the IAU Circular reporting SN discovery.
*    3 = "very uncertain magnitudes from different sources"
*        (occurs for 1991P and 1991ao)
*Note on Disc: Observatory code where SN was discovered:
*     AS Asiago Observatory
*     BA Berkeley Automatic SN search
*     BE Beijing Astronomical Observatory Supernova Survey (Weidong Li,
*        Qiran Qiao, Yulei Qiu, Jingyao Hu);
*     CA Cote d'Azur Observatory
*     CR Cerro el Roble Observatory
*     CT Cerro Tololo Observatory
*     ER Experience de Recherche d'Objets Sombres (EROS) collaboration
*        (O. Perdereau, J.C.Hamilton);
*     EV Visual SN search of R.Evans
*     GA Sternberg Astronomical Institute
*     HB Supernovae discovered with help of HST
*     HZ High-Z Supernova Search Team (R.P. Kirshner, P. Garnavich,
*        P. Challis et al.);
*     IT Italian Professionals and Amateurs; (S. Pesci, M. Villi,
*        A. Gabrielcic et al. )
*     JP Other Japanese Professionals and Amateurs (Aoki, K. Okazaki et al.);
*     KO Konkoly Observatory
*     KU Supernovae discovered by R. Kushida,
*        Yatsugatake South Base Observatory, Japan;
*     MD University of Texas McDonald Observatory Supernova Search Team
*        (M.T. Adams, T. Montemayor, D.A. Howell, J.C. Wheeler, M.H. Ward,
*        and W. Wren)
*     MN SNe discovered by R.H.McNaught
*     MS Mount Stromlo Abell Cluster Supernova Search Team (L. Germany,
*        D. Reiss, C. Stubbs, B. Schmidt, S. Chan);
*     P1 Palomar Observatory SN search 1958-1974
*     P2 Palomar Observatory SN search 1937-1940
*     P3 SNe discovered on POSS plates
*     P4 SNe discovered on plates of second POSS
*     PE Perth observatory supernova search program (A. Williams and R. Martin);
*     SC The Supernova Cosmology Project (S. Perlmutter et al.);
*     TE Supernovae discovered by M. Schwartz (Tenagra Observatory, Oregon, USA);
*     WJ Supernovae discovered by W. Johnson, CA;
*     ZM Zimmerwald Observatory
*Note on l_mag:
*     ">" means "brighter than or equal to",
*     "=" denotes the magnitude at maximum.

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

C  Declarations for 'notes.dat'	! Notes to individual supernovae.

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

      character*6   SN_1        ! SN designation
      character*72  Text_1      ! Text of note

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

C  Loading file 'sn.dat'	! The Catalog

C  Format for file interpretation

    1 format(
     +  A6,1X,A12,I2,1X,F5.2,1X,A1,I2,1X,F4.1,1X,F4.1,1X,I1,1X,I3,1X,
     +  I2,I6,A1,A6,1X,F4.2,1X,F4.2,1X,I2,1X,I1,1X,F7.2,A1,F7.2,A1,1X,
     +  F4.1,A1,A1,A1,4X,A5,1X,A5,1X,A6,1X,I2,1X,I2,1X,F6.3,A1,I2,1X,
     +  I2,1X,F5.2,1X,A2,1X,A2,1X,A85)

C  Effective file loading

      open(unit=1,file='sn.dat', status='old')
      write(6,*) '....Loading file: sn.dat'
      do i__=1,1362
        read(1,'(A242)')ar__
        read(ar__,1)
     +  SN,Gname,RAGh,RAGm,DEG_,DEGd,DEGm,Gmag,r_Gmag,Gpa,Gi,GVhel,
     +  u_GVhel,Gtype,GlogR,GlogD,GTRC3,GLcRC3,EWoff,EW,NSoff,NS,mag,
     +  l_mag,n_mag,u_mag,datMax,datDisc,Type,RAh,RAm,RAs,DE_,DEd,DEm,
     +  DEs,Uncert,Disc,Text
        if(ar__(20:21) .EQ. '') RAGh = iNULL__
        if(ar__(23:27) .EQ. '') RAGm = rNULL__
        if(ar__(30:31) .EQ. '') DEGd = iNULL__
        if(ar__(33:36) .EQ. '') DEGm = rNULL__
        if(ar__(38:41) .EQ. '') Gmag = rNULL__
        if(ar__(43:43) .EQ. '') r_Gmag = iNULL__
        if(ar__(45:47) .EQ. '') Gpa = iNULL__
        if(ar__(49:50) .EQ. '') Gi = iNULL__
        if(ar__(51:56) .EQ. '') GVhel = iNULL__
        if(ar__(65:68) .EQ. '') GlogR = rNULL__
        if(ar__(70:73) .EQ. '') GlogD = rNULL__
        if(ar__(75:76) .EQ. '') GTRC3 = iNULL__
        if(ar__(78:78) .EQ. '') GLcRC3 = iNULL__
        if(ar__(80:86) .EQ. '') EWoff = rNULL__
        if(ar__(88:94) .EQ. '') NSoff = rNULL__
        if(ar__(97:100) .EQ. '') mag = rNULL__
        if(ar__(127:128) .EQ. '') RAh = iNULL__
        if(ar__(130:131) .EQ. '') RAm = iNULL__
        if(ar__(133:138) .EQ. '') RAs = rNULL__
        if(ar__(140:141) .EQ. '') DEd = iNULL__
        if(ar__(143:144) .EQ. '') DEm = iNULL__
        if(ar__(146:150) .EQ. '') DEs = rNULL__
c       Derive coordinates RA_ and Dec from input data
c       (RA_ and Dec are set to rNULL_ when unknown)
        RA_ = RAh
        if(RAh .GE. 0) RA_=RAh*15.
        if(RAm .GE. 0) RA_=RA_+RAm/4.
        if(RAs .GE. 0) RA_=RA_+RAs/240.
        Dec = DEd
        if(DEm .GE. 0) Dec=Dec+DEm/60.
        if(DEs .GE. 0) Dec=Dec+DEs/3600.
        if(DE_.EQ.'-'.AND.Dec.GE.0) Dec=-Dec
c    ..............Just test output...........
        write(6,1)
     +  SN,Gname,RAGh,RAGm,DEG_,DEGd,DEGm,Gmag,r_Gmag,Gpa,Gi,GVhel,
     +  u_GVhel,Gtype,GlogR,GlogD,GTRC3,GLcRC3,EWoff,EW,NSoff,NS,mag,
     +  l_mag,n_mag,u_mag,datMax,datDisc,Type,RAh,RAm,RAs,DE_,DEd,DEm,
     +  DEs,Uncert,Disc,Text
        write(6,'(6H Pos: 2F8.4)') RA_,Dec
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'notes.dat'	! Notes to individual supernovae.

C  Format for file interpretation

    2 format(A6,2X,A72)

C  Effective file loading

      open(unit=1,file='notes.dat', status='old')
      write(6,*) '....Loading file: notes.dat'
      do i__=1,188
        read(1,'(A80)')ar__1
        read(ar__1,2)SN_1,Text_1
c    ..............Just test output...........
        write(6,2)SN_1,Text_1
c    .......End.of.Just test output...........
      end do
      close(1)

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