FORTRAN Generation
(/./ftp/cats/J/ApJ/785/159)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/785/159 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-Oct-09
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/ApJ/785/159    SONYC census of substellar objects in Lupus 3    (Muzic+, 2014)
*================================================================================
*Substellar objects in nearby young clusters (SONYC).
*VIII. Substellar population in Lupus 3.
*    Muzic K., Scholz A., Geers V.C., Jayawardhana R., Lopez Marti B.
*   <Astrophys. J., 785, 159 (2014)>
*   =2014ApJ...785..159M    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! Photometry and Spectral Types for the Objects
                                of Spectral Type M, or Slightly Earlier,
                                Identified Toward Lupus 3

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

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

      character*4   ID         (nr__) ! SONYC candidate identifier (S-NN) (G1)
      integer*4     RAh        (nr__) ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm        (nr__) ! (min) Minute of Right Ascension (J2000)
      real*4        RAs        (nr__) ! (s) Second of Right Ascension (J2000)
      character*1   DE_        (nr__) ! Sign of the Declination (J2000)
      integer*4     DEd        (nr__) ! (deg) Degree of Declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) Arcminute of Declination (J2000)
      real*4        DEs        (nr__) ! (arcsec) Arcsecond of Declination (J2000)
      real*4        imag       (nr__) ! (mag) MOSAIC-II i-band magnitude
      real*4        Jmag       (nr__) ! (mag) NEWFIRM J-band magnitude
      real*4        Ksmag      (nr__) ! (mag) NEWFIRM K_S_-band magnitude
      real*4        Av         (nr__) ! (mag) Absorption in V band from photometry
      character*1   l_SpType   (nr__) ! [<] Limit flag on SpType
      character*6   SpType     (nr__) ! Spectral type
      real*4        AvSp       (nr__) ! (mag) ? Absorption in V band from spectral type
      real*4        pmRA       (nr__) ! (mas/yr) ? Proper motion along RA (pmRA*cosDE)
      real*4        e_pmRA     (nr__) ! (mas/yr) ? Error on pmRA
      real*4        pmDE       (nr__) ! (mas/yr) ? Proper motion along DE
      real*4        e_pmDE     (nr__) ! (mas/yr) ? Error on pmDE
      character*1   Cand       (nr__) ! [yn-] Proper motion candidate (y=yes, n=no)
      real*4        EW         (nr__) ! (0.1nm) ? Equivalent width of the H{alpha} line
      character*9   Memb       (nr__) ! Cluster membership
      character*1   n_Memb     (nr__) ! [2/3] Note on Memb (1)
      character*22  Com        (nr__) ! Comment (2)
      character*3   r_Com      (nr__) ! [abcd, ] Comment reference(s) (3)
*Note (1): Note as follows:
*  2 = Background giant;
*  3 = Field dwarf.
*Note (2): Comment as follows:
*  C09 = Candidate member in Comeron et al. (2009, J/A+A/500/1045), Table 9;
*  M08 = IRAC YSO candidate from Merin et al. (2008, J/ApJS/177/551);
*  G06 = X-ray source from Gondoin (2006, J/A+A/454/595).
*Note (3): Reference as follows:
*  a = Comeron et al. 2003A&A...406.1001C;
*  b = Mortier et al. 2011MNRAS.418.1194M;
*  c = Allen et al. 2007ApJ...655.1095A;
*  d = Comeron et al. 2013A&A...554A..86C.

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

C  Declarations for 'table3.dat'	! Effective Temperature and Extinction Derived
                                from Models, for the Objects of Spectral Type M
                                (or Slightly Earlier) Toward Lupus 3

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

      character*4   ID_1       (nr__1) ! SONYC candidate identifier (S-NN) (G1)
      character*1   l_TeffAD   (nr__1) ! [>] Limit flag on TeffAD
      integer*4     TeffAD     (nr__1) ! (K) ? Effective temperature derived using
*                                   AMES-Dusty models (Allard et al.
*                                   2001ApJ...556..357A)
      real*4        AvAD       (nr__1) ! (mag) ? Absorption in V band corresponding to TeffAD
      integer*4     TeffBTS    (nr__1) ! (K) Effective temperature derived using
*                                   BT-Settl models (Allard et al.
*                                   2011ASPC..448...91A)
      real*4        AvBTS      (nr__1) ! (mag) Absorption in V band corresponding to TeffBTS
      integer*4     Teff       (nr__1) ! (K) ? Effective temperature
      character*1   n_Teff     (nr__1) ! [ab] Note on Teff (1)
      real*4        Avmean     (nr__1) ! (mag) ? Absorption in V band
*Note (1): Note as follows:
*  a = Parameters derived by Comeron et al. (2009, J/A+A/500/1045);
*  b = Parameters derived by Comeron et al. (2013A&A...554A..86C).

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

C  Declarations for 'table4.dat'	! Spectroscopically Confirmed Very Low Mass
                                Members of Lupus 3

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

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

      character*17  ID_2       (nr__2) ! Member of Lupus 3 identifier (1)
      integer*4     RAh_1      (nr__2) ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm_1      (nr__2) ! (min) Minute of Right Ascension (J2000)
      real*4        RAs_1      (nr__2) ! (s) Second of Right Ascension (J2000)
      character*1   DE__1      (nr__2) ! Sign of the Declination (J2000)
      integer*4     DEd_1      (nr__2) ! (deg) Degree of Declination (J2000)
      integer*4     DEm_1      (nr__2) ! (arcmin) Arcminute of Declination (J2000)
      real*4        DEs_1      (nr__2) ! (arcsec) Arcsecond of Declination (J2000)
      real*4        Jmag_1     (nr__2) ! (mag) ? J-band magnitude
      real*4        Ksmag_1    (nr__2) ! (mag) ? K_S_-band magnitude
      character*1   l_SpType1  (nr__2) ! [<] Limit flag on SpType1
      character*6   SpType1    (nr__2) ! Spectral type 1
      character*3   r_SpType1  (nr__2) ! [acdefgh, ] Spectral type 1 reference(s) (2)
      character*4   SpType2    (nr__2) ! Spectral type 2
      character*3   r_SpType2  (nr__2) ! [cdfgh, ] Spectral type 2 reference(s) (2)
      character*4   SpType3    (nr__2) ! Spectral type 3
      character*1   r_SpType3  (nr__2) ! [fgh] Spectral type 3 reference (2)
      character*4   SpType4    (nr__2) ! Spectral type 4
      character*1   r_SpType4  (nr__2) ! [h] Spectral type 4 reference (2)
      integer*4     Teff1      (nr__2) ! (K) ? Effective temperature 1
      character*3   r_Teff1    (nr__2) ! [acgh, ] Effective temperature 1 reference(s)
*                                  (2)
      integer*4     Teff2      (nr__2) ! (K) ? Effective temperature 2
      character*3   r_Teff2    (nr__2) ! [bh, ] Effective temperature 2 reference(s) (2)
      integer*4     Teff3      (nr__2) ! (K) ? Effective temperature 3
      character*1   r_Teff3    (nr__2) ! [c] Effective temperature 3 reference (2)
      character*17  Other      (nr__2) ! Other name
      character*1   r_Other    (nr__2) ! [c] Other name reference (2)
*Note (1): Identifiers are from:
*  Schwartz (1977ApJS...35..161S, Sz);
*  Comeron et al. (2003A&A...406.1001C, Par-Lup3);
*  Lopez Marti et al. (2005A&A...440..139L, Lup);
*  Mortier et al. (2011MNRAS.418.1194M, M);
*  2MASS (Cat. II/246, J16)
*  this paper (SONYC-Lup3).
*Note (2): Reference as follows:
*  a = This work;
*  b = Comeron et al. 2009, J/A+A/500/1045;
*  c = Comeron et al. 2013A&A...554A..86C;
*  d = Comeron et al. 2003A&A...406.1001C;
*  e = Allen et al. 2007ApJ...655.1095A;
*  f = Hughes et al. 1994AJ....108.1071H;
*  g = Mortier et al. 2011MNRAS.418.1194M;
*  h = Alcala et al. 2014, J/A+A/561/A2.

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

C  Loading file 'table2.dat'	! Photometry and Spectral Types for the Objects
*                                of Spectral Type M, or Slightly Earlier,
*                                Identified Toward Lupus 3

C  Format for file interpretation

    1 format(
     +  A4,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F4.1,1X,F4.1,
     +  1X,F4.1,1X,F4.1,1X,A1,A6,1X,F3.1,1X,F5.1,1X,F3.1,1X,F5.1,1X,
     +  F3.1,1X,A1,1X,F6.1,1X,A9,1X,A1,1X,A22,1X,A3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,27
        read(1,'(A128)')ar__
        read(ar__,1)
     +  ID(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),
     +  DEs(i__),imag(i__),Jmag(i__),Ksmag(i__),Av(i__),l_SpType(i__),
     +  SpType(i__),AvSp(i__),pmRA(i__),e_pmRA(i__),pmDE(i__),
     +  e_pmDE(i__),Cand(i__),EW(i__),Memb(i__),n_Memb(i__),Com(i__),
     +  r_Com(i__)
        if(ar__(58:60) .EQ. '') AvSp(i__) = rNULL__
        if(ar__(62:66) .EQ. '') pmRA(i__) = rNULL__
        if(ar__(68:70) .EQ. '') e_pmRA(i__) = rNULL__
        if(ar__(72:76) .EQ. '') pmDE(i__) = rNULL__
        if(ar__(78:80) .EQ. '') e_pmDE(i__) = rNULL__
        if(ar__(84:89) .EQ. '') EW(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,1)
     +  ID(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),
     +  DEs(i__),imag(i__),Jmag(i__),Ksmag(i__),Av(i__),l_SpType(i__),
     +  SpType(i__),AvSp(i__),pmRA(i__),e_pmRA(i__),pmDE(i__),
     +  e_pmDE(i__),Cand(i__),EW(i__),Memb(i__),n_Memb(i__),Com(i__),
     +  r_Com(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 'table3.dat'	! Effective Temperature and Extinction Derived
*                                from Models, for the Objects of Spectral Type M
*                                (or Slightly Earlier) Toward Lupus 3

C  Format for file interpretation

    2 format(A4,1X,A1,I4,1X,F3.1,1X,I4,1X,F3.1,1X,I4,1X,A1,1X,F3.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,27
        read(1,'(A34)')ar__1
        read(ar__1,2)
     +  ID_1(i__),l_TeffAD(i__),TeffAD(i__),AvAD(i__),TeffBTS(i__),
     +  AvBTS(i__),Teff(i__),n_Teff(i__),Avmean(i__)
        if(ar__1(7:10) .EQ. '') TeffAD(i__) = iNULL__
        if(ar__1(12:14) .EQ. '') AvAD(i__) = rNULL__
        if(ar__1(25:28) .EQ. '') Teff(i__) = iNULL__
        if(ar__1(32:34) .EQ. '') Avmean(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  ID_1(i__),l_TeffAD(i__),TeffAD(i__),AvAD(i__),TeffBTS(i__),
     +  AvBTS(i__),Teff(i__),n_Teff(i__),Avmean(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Spectroscopically Confirmed Very Low Mass
*                                Members of Lupus 3

C  Format for file interpretation

    3 format(
     +  A17,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F4.1,1X,
     +  F4.1,1X,A1,A6,A3,1X,A4,A3,1X,A4,A1,1X,A4,A1,1X,I4,A3,1X,I4,A3,
     +  I4,A1,1X,A17,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,82
        read(1,'(A122)')ar__2
        read(ar__2,3)
     +  ID_2(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),
     +  DEd_1(i__),DEm_1(i__),DEs_1(i__),Jmag_1(i__),Ksmag_1(i__),
     +  l_SpType1(i__),SpType1(i__),r_SpType1(i__),SpType2(i__),
     +  r_SpType2(i__),SpType3(i__),r_SpType3(i__),SpType4(i__),
     +  r_SpType4(i__),Teff1(i__),r_Teff1(i__),Teff2(i__),
     +  r_Teff2(i__),Teff3(i__),r_Teff3(i__),Other(i__),r_Other(i__)
        if(ar__2(43:46) .EQ. '') Jmag_1(i__) = rNULL__
        if(ar__2(48:51) .EQ. '') Ksmag_1(i__) = rNULL__
        if(ar__2(84:87) .EQ. '') Teff1(i__) = iNULL__
        if(ar__2(92:95) .EQ. '') Teff2(i__) = iNULL__
        if(ar__2(99:102) .EQ. '') Teff3(i__) = iNULL__
        RAdeg_1(i__) = rNULL__
        DEdeg_1(i__) = rNULL__
c  Derive coordinates RAdeg_1 and DEdeg_1 from input data
c  (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown)
        if(RAh_1(i__) .GT. -180) RAdeg_1(i__)=RAh_1(i__)*15.
        if(RAm_1(i__) .GT. -180) RAdeg_1(i__)=RAdeg_1(i__)+RAm_1(i__)/4.
        if(RAs_1(i__) .GT. -180) RAdeg_1(i__)=RAdeg_1(i__)+RAs_1(i__)/240.
        if(DEd_1(i__) .GE. 0) DEdeg_1(i__)=DEd_1(i__)
        if(DEm_1(i__) .GE. 0) DEdeg_1(i__)=DEdeg_1(i__)+DEm_1(i__)/60.
        if(DEs_1(i__) .GE. 0) DEdeg_1(i__)=DEdeg_1(i__)+DEs_1(i__)/3600.
        if(DE__1(i__).EQ.'-'.AND.DEdeg_1(i__).GE.0) DEdeg_1(i__)=-DEdeg_1(i__)
c    ..............Just test output...........
        write(6,3)
     +  ID_2(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),DE__1(i__),
     +  DEd_1(i__),DEm_1(i__),DEs_1(i__),Jmag_1(i__),Ksmag_1(i__),
     +  l_SpType1(i__),SpType1(i__),r_SpType1(i__),SpType2(i__),
     +  r_SpType2(i__),SpType3(i__),r_SpType3(i__),SpType4(i__),
     +  r_SpType4(i__),Teff1(i__),r_Teff1(i__),Teff2(i__),
     +  r_Teff2(i__),Teff3(i__),r_Teff3(i__),Other(i__),r_Other(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg_1(i__),DEdeg_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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