FORTRAN Generation
(/./ftp/cats/J/ApJS/233/6)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJS/233/6 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 2024-Apr-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/ApJS/233/6     SNe II light curves & spectra from the CfA     (Hicken+, 2017)
*================================================================================
*Type II supernova light curves and spectra from the CfA.
*    Hicken M., Friedman A.S., Blondin S., Challis P., Berlind P., Calkins M.,
*    Esquerdo G., Matheson T., Modjaz M., Rest A., Kirshner R.P.
*   <Astrophys. J. Suppl. Ser., 233, 6-6 (2017)>
*   =2017ApJS..233....6H    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! SN II discovery data

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

      character*8   SN         (nr__) ! Supernova designation
      character*3   Type       (nr__) ! SN Type
      character*1   r_Type     (nr__) ! [ab] Reference for Type (1)
      character*13  Host       (nr__) ! Host Galaxy Name
      character*1   r_Host     (nr__) ! [N ] Reference for Host Galaxy (2)
      real*8        z          (nr__) ! [0.002/0.04] Heliocentric redshift
      character*9   Ref        (nr__) ! Discovery Reference, IAUC or CBET
      character*1   Opt        (nr__) ! [y-] Optical light curve?
      character*1   NIR        (nr__) ! [y-] NIR light curve?
      integer*4     Nsp        (nr__) ! [0/16] Number of CfA optical spectra
*Note (1): Reference for Type as follows:
*    a = Type from http://w.astro.berkeley.edu/bait/2007/sn2007cu.html;
*    b = Type from Pastorello+ (2015, J/MNRAS/449/1921)
*Note (2): Reference for Host: take from Discovery Reference (see column "Ref")
*          or "N" = Host galaxy from NED.

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

C  Declarations for 'table2.dat'	! Journal of spectroscopic observations

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

      character*8   SN_1       (nr__1) ! Supernova designation
      real*8        MJD        (nr__1) ! (d) Modified Julian Date of observation,
*                                    mid-point
      character*4   Tel        (nr__1) ! Telescope+instrument used (1)
      integer*4     Wmin       (nr__1) ! (0.1nm) [3150/3760] Spectrum minimum wavelength
      integer*4     Wmax       (nr__1) ! (0.1nm) [7368/8476] Spectrum maximum wavelength
      real*4        Disp       (nr__1) ! (0.1nm/pix) [1.4/2] Spectral dispersion
      real*4        Airmass    (nr__1) ! [1/2.4] Observation airmass
      integer*4     Nobs       (nr__1) ! [2/4]? Number of co additions
      integer*4     Exp        (nr__1) ! (s) [60/2400] Exposure time, per coadd
*Note (1): Telescope and instrument used for this spectrum as follows:
*    FAST = FLWO 1.5m+FAST;
*    MMT  = MMT+Blue Channel.

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

C  Declarations for 'table3.dat'	! Standard system star sequences

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

C  J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg      (nr__2) ! (deg) Right Ascension J2000
      real*8        DEdeg      (nr__2) ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      character*8   SN_2       (nr__2) ! Supernova designation
      integer*4     Star       (nr__2) ! [1/87] Standard Star used
      integer*4     RAh        (nr__2) ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm        (nr__2) ! (min) Minute of Right Ascension (J2000)
      real*4        RAs        (nr__2) ! (s) Second of Right Ascension (J2000)
      character*1   DE_        (nr__2) ! Sign of the Declination (J2000)
      integer*4     DEd        (nr__2) ! (deg) Degree of Declination (J2000)
      integer*4     DEm        (nr__2) ! (arcmin) Arcminute of Declination (J2000)
      real*4        DEs        (nr__2) ! (arcsec) Arcsecond of Declination (J2000)
      real*4        Vmag       (nr__2) ! (mag) [11.4/18.8] V band magnitude of standard star
      real*4        e_Vmag     (nr__2) ! (mag) [0.01/0.2] Uncertainty in Vmag
      integer*4     NV         (nr__2) ! [1/12] Number of nights of calibration in V band
      real*4        U_B        (nr__2) ! (mag) [-1/1.4]? U-B color index of standard star
      real*4        e_U_B      (nr__2) ! (mag) [0.04/0.3]? Uncertainty in U-B
      integer*4     NU         (nr__2) ! [1/7]?=0 Number of nights of calibration in U band
      real*4        B_V        (nr__2) ! (mag) [0.04/2] B-V color index of standard star
      real*4        e_B_V      (nr__2) ! (mag) [0.01/0.2] Uncertainty in B-V
      integer*4     NB         (nr__2) ! [1/12] Number of nights of calibration in B band
      real*4        V_r        (nr__2) ! (mag) [-0.07/1.1]? V-r color index of standard star
      real*4        e_V_r      (nr__2) ! (mag) [0.009/0.1]? Uncertainty in V-r
      integer*4     Nr         (nr__2) ! [1/12]?=0 Number of nights of calibration in
*                               r band (1)
      real*4        V_i        (nr__2) ! (mag) [-0.2/2.4]? V-i color index of standard star
      real*4        e_V_i      (nr__2) ! (mag) [0.009/0.2]? Uncertainty in V-i
      integer*4     Ni         (nr__2) ! [1/12]?=0 Number of nights of calibration in
*                               i band (1)
*Note (1): The generic letters r and i are used in the final 4 column headers
*    and should be interpreted as R and I bands, respectively, for SN 2000eo,
*    2001ez, 2001fa, 2002bx and 2002em and as r' and i' bands, respectively,
*    for the rest. Additional passband information can be found in Hicken+
*    (2012, J/ApJS/200/12).

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

C  Declarations for 'table4.dat'	! Natural-system SN light curves

      integer*4 nr__3
      parameter (nr__3=3143)	! Number of records
      character*51 ar__3  	! Full-size record

      character*8   SN_3       (nr__3) ! Supernova designation
      character*2   Filt       (nr__3) ! [BUVRIi'r'u' ] Filter used in the observation
      real*8        MJD_1      (nr__3) ! (d) Modified Julian Date of observation, mid-point
      integer*4     Nh         (nr__3) ! [0/20] Number of host-galaxy images (1)
      real*8        omag       (nr__3) ! (mag) [14.1/21.9] Observed magnitude in Filt
      real*4        e_omag     (nr__3) ! (mag) [0.01/0.5] Uncertainty in omag (2)
      character*4   CfA        (nr__3) ! CfA light curve production campaign
      character*4   Cam        (nr__3) ! Camera (3)
*Note (1): Number of host-galaxy images subtracted from the same data image.
*    Nhost=0 means no host-galaxy subtraction was performed and the SN was
*    sufficiently removed from the host galaxy.
*Note (2): The uncertainty is the same as the light curve uncertainty as used
*          in Hicken+ (2009, J/ApJ/700/331) and is the same as
*          {sigma}_pipe in Hicken+ (2012A, J/ApJS/200/12).
*Note (3): Camera the SN data was acquired with. For CfA4 data, a 1 or 2 is
*    appended to 'KEP' to indicate if it was taken during period 1 (before
*    2009 August 15 (MJD=55058) or period 2 (after) and which set of
*    natural-system bandpasses should be used. The period is of crucial
*    importance for the color terms used.

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

C  Declarations for 'table5.dat'	! Standard-system SN light curves

      integer*4 nr__4
      parameter (nr__4=3143)	! Number of records
      character*41 ar__4  	! Full-size record

      character*8   SN_4       (nr__4) ! Supernova designation
      character*2   Filt_1     (nr__4) ! [BUVRIi'r'u' ] Filter used in the observation
      real*8        MJD_2      (nr__4) ! (d) Modified Julian Date of observation, mid-point
      integer*4     Nh_1       (nr__4) ! [0/20] Number of host-galaxy images (1)
      real*8        omag_1     (nr__4) ! (mag) [14.1/22] Observed magnitude in Filt
      real*4        e_omag_1   (nr__4) ! (mag) [0.01/0.5] Uncertainty in omag (2)
*Note (1): Number of host-galaxy images subtracted from the same data image.
*    Nhost=0 means no host-galaxy subtraction was performed and the SN was
*    sufficiently removed from the host galaxy.
*Note (2): The uncertainty is the same as the light curve uncertainty as used
*    in Hicken+ (2009, J/ApJ/700/331) and is the same as
*    {sigma}_pipe in Hicken+ (2012A, J/ApJS/200/12).

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

C  Declarations for 'table6.dat'	! PAIRITEL NIR natural-system SN light curves

      integer*4 nr__5
      parameter (nr__5=816)	! Number of records
      character*32 ar__5  	! Full-size record

      character*8   SN_5       (nr__5) ! Supernova designation
      character*1   Filt_2     (nr__5) ! [JHK] Filter used in the observation
      real*8        MJD_3      (nr__5) ! (d) Modified Julian Date of observation, mid-point
      real*4        omag_2     (nr__5) ! (mag) [13.9/18.8] Observed magnitude in Filt
      real*4        e_omag_2   (nr__5) ! (mag) [0.001/0.7] Uncertainty in omag

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

C  Declarations for 'spec.dat'	! List of spectra for 48 type II supernovae

      integer*4 nr__6
      parameter (nr__6=195)	! Number of records
      character*49 ar__6  	! Full-size record

      character*8   SN_6       (nr__6) ! Supernova designation
      character*30  FileName   (nr__6) ! Name of the file in subdirectory sp (1)
      real*8        MJD_4      (nr__6) ! (d) Modified Julian Date of the spectrum
*Note (1): The file naming convention for each spectrum is:
*          <SN name>-<UT date>-<tel/inst>.txt

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

C  Declarations for 'sp/*'	! Individual spectrum of 48 type II SNe
                                  in ASCII format

      integer*4 nr__7
      parameter (nr__7=195)	! Number of records
      character*36 ar__7  	! Full-size record

      real*8        lambda     (nr__7) ! (0.1nm) [3150/8477] Observed wavelength,
*                                         in Angstroems {AA} units (1)
      real*4        Flux       (nr__7) ! (0.1mW/m2/nm) Observed flux, erg/s/cm^2^/{AA} (2)
      real*4        e_Flux     (nr__7) ! (0.1mW/m2/nm) ? Flux error, one sigma;
*                                         in erg/s/cm^2^/{AA} units (3)
*Note (1): The observed wavelength includes a heliocentric correction.
*Note (2): No attempt has been made to scale the spectra to match the
*          available photometry. The spectra have *not* been de-redshifted or
*          de-reddened.
*Note (3): The flux error is computed based on the optimal extraction
*          algorithm of Horne (1986PASP...98..609H).

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

C  Loading file 'table1.dat'	! SN II discovery data

C  Format for file interpretation

    1 format(
     +  A8,1X,A3,1X,A1,1X,A13,1X,A1,1X,F8.6,1X,A9,1X,A1,1X,A1,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,60
        read(1,'(A56)')ar__
        read(ar__,1)
     +  SN(i__),Type(i__),r_Type(i__),Host(i__),r_Host(i__),z(i__),
     +  Ref(i__),Opt(i__),NIR(i__),Nsp(i__)
c    ..............Just test output...........
        write(6,1)
     +  SN(i__),Type(i__),r_Type(i__),Host(i__),r_Host(i__),z(i__),
     +  Ref(i__),Opt(i__),NIR(i__),Nsp(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Journal of spectroscopic observations

C  Format for file interpretation

    2 format(A8,1X,F9.3,1X,A4,1X,I4,1X,I4,1X,F4.2,1X,F4.2,1X,I1,1X,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,195
        read(1,'(A50)')ar__1
        read(ar__1,2)
     +  SN_1(i__),MJD(i__),Tel(i__),Wmin(i__),Wmax(i__),Disp(i__),
     +  Airmass(i__),Nobs(i__),Exp(i__)
        if(ar__1(45:45) .EQ. '') Nobs(i__) = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  SN_1(i__),MJD(i__),Tel(i__),Wmin(i__),Wmax(i__),Disp(i__),
     +  Airmass(i__),Nobs(i__),Exp(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Standard system star sequences

C  Format for file interpretation

    3 format(
     +  A8,1X,I2,1X,I2,1X,I2,1X,F6.3,1X,A1,I2,1X,I2,1X,F5.2,1X,F6.3,
     +  1X,F5.3,1X,I2,2X,F6.3,3X,F5.3,1X,I1,1X,F5.3,1X,F5.3,1X,I2,1X,
     +  F6.3,1X,F5.3,1X,I2,1X,F6.3,1X,F5.3,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,1228
        read(1,'(A118)')ar__2
        read(ar__2,3)
     +  SN_2(i__),Star(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),Vmag(i__),e_Vmag(i__),NV(i__),
     +  U_B(i__),e_U_B(i__),NU(i__),B_V(i__),e_B_V(i__),NB(i__),
     +  V_r(i__),e_V_r(i__),Nr(i__),V_i(i__),e_V_i(i__),Ni(i__)
        if(ar__2(56:61) .EQ. '') U_B(i__) = rNULL__
        if(ar__2(65:69) .EQ. '') e_U_B(i__) = rNULL__
        if(ar__2(88:93) .EQ. '') V_r(i__) = rNULL__
        if(ar__2(95:99) .EQ. '') e_V_r(i__) = rNULL__
        if(ar__2(104:109) .EQ. '') V_i(i__) = rNULL__
        if(ar__2(111:115) .EQ. '') e_V_i(i__) = rNULL__
        RAdeg(i__) = rNULL__
        DEdeg(i__) = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh(i__) .GT. -180) RAdeg(i__)=RAh(i__)*15.
        if(RAm(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAm(i__)/4.
        if(RAs(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAs(i__)/240.
        if(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
        if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DEs(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs(i__)/3600.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,3)
     +  SN_2(i__),Star(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),Vmag(i__),e_Vmag(i__),NV(i__),
     +  U_B(i__),e_U_B(i__),NU(i__),B_V(i__),e_B_V(i__),NB(i__),
     +  V_r(i__),e_V_r(i__),Nr(i__),V_i(i__),e_V_i(i__),Ni(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Natural-system SN light curves

C  Format for file interpretation

    4 format(A8,1X,A2,1X,F11.5,1X,I2,1X,F7.4,1X,F6.4,1X,A4,1X,A4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,3143
        read(1,'(A51)')ar__3
        read(ar__3,4)
     +  SN_3(i__),Filt(i__),MJD_1(i__),Nh(i__),omag(i__),e_omag(i__),
     +  CfA(i__),Cam(i__)
c    ..............Just test output...........
        write(6,4)
     +  SN_3(i__),Filt(i__),MJD_1(i__),Nh(i__),omag(i__),e_omag(i__),
     +  CfA(i__),Cam(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table5.dat'	! Standard-system SN light curves

C  Format for file interpretation

    5 format(A8,1X,A2,1X,F11.5,1X,I2,1X,F7.4,1X,F6.4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,3143
        read(1,'(A41)')ar__4
        read(ar__4,5)
     +  SN_4(i__),Filt_1(i__),MJD_2(i__),Nh_1(i__),omag_1(i__),
     +  e_omag_1(i__)
c    ..............Just test output...........
        write(6,5)
     +  SN_4(i__),Filt_1(i__),MJD_2(i__),Nh_1(i__),omag_1(i__),
     +  e_omag_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table6.dat'	! PAIRITEL NIR natural-system SN light curves

C  Format for file interpretation

    6 format(A8,1X,A1,1X,F8.2,1X,F6.3,1X,F5.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table6.dat')
      write(6,*) '....Loading file: table6.dat'
      do i__=1,816
        read(1,'(A32)')ar__5
        read(ar__5,6)
     +  SN_5(i__),Filt_2(i__),MJD_3(i__),omag_2(i__),e_omag_2(i__)
c    ..............Just test output...........
        write(6,6)
     +  SN_5(i__),Filt_2(i__),MJD_3(i__),omag_2(i__),e_omag_2(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'spec.dat'	! List of spectra for 48 type II supernovae

C  Format for file interpretation

    7 format(A8,1X,A30,1X,F9.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'spec.dat')
      write(6,*) '....Loading file: spec.dat'
      do i__=1,195
        read(1,'(A49)')ar__6
        read(ar__6,7)SN_6(i__),FileName(i__),MJD_4(i__)
c    ..............Just test output...........
        write(6,7)SN_6(i__),FileName(i__),MJD_4(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'sp/*'	! Individual spectrum of 48 type II SNe
*                                  in ASCII format

C  Format for file interpretation

    8 format(F7.2,1X,E14.9,1X,E13.8)

C  Effective file loading

      open(unit=1,status='old',file=
     +'sp/*')
      write(6,*) '....Loading file: sp/*'
      do i__=1,195
        read(1,'(A36)')ar__7
        read(ar__7,8)lambda(i__),Flux(i__),e_Flux(i__)
        if(ar__7(24:36) .EQ. '') e_Flux(i__) = rNULL__
c    ..............Just test output...........
        write(6,8)lambda(i__),Flux(i__),e_Flux(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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