FORTRAN Generation
(/./ftp/cats/J/MNRAS/505/5567)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/505/5567 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-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/MNRAS/505/5567      Red Be Stars in the LMC and the SMC        (Vieira+, 2021)
*================================================================================
*Red Be stars in the Magellanic Clouds?
*    Vieira K., Garcia-Varela A., Sabogal B., Rimulo L.R., Hernandez J.
*   <Mon. Not. R. Astron. Soc., 505, 5567-5583 (2021)>
*   =2021MNRAS.505.5567V    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'tablea1.dat'	! Sample of the LMC Be stars data used
                                in this study

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

C  Position composed of: RAdeg DEdeg (Epoch=2015.5)
      integer*4     ID          ! Identifier number index from this work (idBe)
      character*16  OGLE        ! Designation HHMMSSss-DDMMSSs (J2000)
*                                 (OGLE) (G1)
      real*4        Vmag        ! (mag) Apparent magnitude in V band (Vmag) (G1)
      real*4        B_V         ! (mag) B-V colour index (B-V) (G1)
      real*4        V_I         ! (mag) V-I colour index (V-I) (G1)
      real*4        Type        ! [1/4] Type of the star (Type_num) (G2)
      integer*8     GaiaDR2     ! Gaia DR2 source identifier
*                                 (GaiaDR2_source_id) (G3)
      real*8        RAdeg       ! (deg) Barycentric right ascension (ICRS)
*                                 at Ep=2015.5 (ra) (G3)
      real*8        DEdeg       ! (deg) Barycentric declination (ICRS)
*                                 at Ep=2015.5 (dec) (G3)
      real*8        plx         ! (mas) ?=- Absolute stellar parallax (parallax) (G3)
      real*4        e_plx       ! (mas) ?=- Mean error of plx (parallax_error) (G3)
      real*8        pmRA        ! (mas/yr) ?=- Proper motion in right ascension direction
*                                 pmRA*cosDE (pmra) (G3)
      real*4        e_pmRA      ! (mas/yr) ?=- Mean error of pmRA (pmra_error) (G3)
      real*8        pmDE        ! (mas/yr) ?=- Proper motion in declination direction
*                                 (pmdec) (G3)
      real*4        e_pmDE      ! (mas/yr) ?=- Mean error of pmDE (pmdec_error) (G3)
      real*8        Gmag        ! (mag) G-band mean magnitude (Vega)
*                                 (phot_g_mean_mag) (G3)
      real*8        BPmag       ! (mag) ?=- Integrated BP mean magnitude (Vega)
*                                 (phot_bp_mean_mag) (G3)
      real*8        RPmag       ! (mag) ?=- Integrated RP mean magnitude (Vega)
*                                 (phot_rp_mean_mag) (G3)
      real*8        Rank        ! Position mag ranking value (rank) (G4)
      real*8        Chi         ! ?=- {Chi}-value for membership to the Clouds
*                                 ({Chi}) (G5)
      character*13  ONames      ! BEL crossmatch confirmed with linked catalogues
*                                 (other_names) (G6)
      real*4        Jmag        ! (mag) ?=- Apparent magnitude in J band (Jmag) (G7)
      real*4        Hmag        ! (mag) ?=- Apparent magnitude in  H band (Hmag) (G7)
      real*4        Ksmag       ! (mag) ?=- Apparent magnitude in Ks band (Ksmag) (G7)
      real*4        v3_6mag     ! (mag) ?=- Apparent magnitude Spitzer/IRAC at 3.6
*                                 micron band magnitude ([3.6]) (G8)
      real*4        v4_5mag     ! (mag) ?=- Apparent magnitude Spitzer/IRAC
*                                 at 4.5 micron band magnitude ([4.5]) (G8)
      real*4        v5_8mag     ! (mag) ?=- Apparent magnitude Spitzer/IRAC
*                                 at 5.8 micron band magnitude ([5.8]) (G8)
      real*4        v8_0mag     ! (mag) ?=- Apparent magnitude Spitzer/IRAC
*                                 at 8.0 micron band magnitude ([8.0]) (G8)

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

C  Declarations for 'tablea2.dat'	! Sample of the four exceptionally red Be stars,
                                ID = 909 is in the LMC and ID = 75, 184,
                                and 547 are in the SMC

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

C  Position composed of: RAdeg DEdeg (Epoch=2015.5)
      integer*4     ID_1        ! Identifier number index from this work (idBe)
      character*18  OGLE_1      ! Designation HHMMSSss-DDMMSSs (J2000)
*                                 (OGLE) (G1)
      real*4        Vmag_1      ! (mag) Apparent magnitude in V band (Vmag) (G1)
      real*4        B_V_1       ! (mag) B-V colour index (B-V) (G1)
      real*4        V_I_1       ! (mag) V-I colour index (V-I) (G1)
      real*4        Type_1      ! [1/4] Type of the star (Type_num) (G2)
      integer*8     GaiaDR2_1   ! Gaia DR2 source identifier
*                                 (GaiaDR2_source_id) (G3)
      real*8        RAdeg_1     ! (deg) Barycentric right ascension (ICRS)
*                                 at Ep=2015.5 (ra) (G3)
      real*8        DEdeg_1     ! (deg) Barycentric declination (ICRS)
*                                 at Ep=2015.5 (dec) (G3)
      real*8        plx_1       ! (mas) Absolute stellar parallax (parallax) (G3)
      real*4        e_plx_1     ! (mas) Mean error of plx (parallax_error) (G3)
      real*4        pmRA_1      ! (mas/yr) Proper motion in right ascension direction
*                                 pmRA*cosDE (pmra) (G3)
      real*4        e_pmRA_1    ! (mas/yr) Mean error of pmRA (pmra_error) (G3)
      real*4        pmDE_1      ! (mas/yr) Proper motion in declination direction
*                                 (pmdec) (G3)
      real*4        e_pmDE_1    ! (mas/yr) Mean error of pmDE (pmdec_error) (G3)
      real*8        Gmag_1      ! (mag) G-band mean magnitude (Vega)
*                                 (phot_g_mean_mag) (G3)
      real*8        BPmag_1     ! (mag) Integrated BP mean magnitude (Vega)
*                                 (phot_bp_mean_mag) (G3)
      real*8        RPmag_1     ! (mag) Integrated RP mean magnitude (Vega)
*                                 (phot_rp_mean_mag) (G3)
      real*8        Rank_1      ! Position mag ranking value (rank) (G4)
      real*8        Chi_1       ! {Chi}-value for membership to the Clouds
*                                 ({Chi}) (G5)
      character*14  ONames_1    ! BEL crossmatch confirmed with linked
*                                 catalogues (other_names) (G6)
      real*4        Jmag_1      ! (mag) Apparent magnitude in J band (Jmag) (G7)
      real*4        Hmag_1      ! (mag) Apparent magnitude in  H band (Hmag) (G7)
      real*4        Ksmag_1     ! (mag) Apparent magnitude in Ks band (Ksmag) (G7)
      real*4        v3_6mag_1   ! (mag) Apparent magnitude Spitzer/IRAC
*                                 at 3.6 micron band magnitude ([3.6]) (G8)
      real*4        v4_5mag_1   ! (mag) Apparent magnitude Spitzer/IRAC
*                                 at 4.5 micron band magnitude ([4.5]) (G8)
      real*4        v5_8mag_1   ! (mag) Apparent magnitude Spitzer/IRAC
*                                 at 5.8 micron band magnitude ([5.8]) (G8)
      real*4        v8_0mag_1   ! (mag) Apparent magnitude Spitzer/IRAC
*                                 at 8.0 micron band magnitude ([8.0]) (G8)

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

C  Declarations for 'tablea3.dat'	! Sample of the SMC Be stars data used
                                in this study

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

C  Position composed of: RAdeg DEdeg (Epoch=2015.5)
      integer*4     ID_2        ! Identifier number index from this work (idBe)
      character*18  OGLE_2      ! Designation HHMMSSss-DDMMSSs (J2000)
*                                 (OGLE) (G1)
      real*4        Vmag_2      ! (mag) Apparent magnitude in V band (Vmag) (G1)
      real*4        B_V_2       ! (mag) B-V colour index (B-V) (G1)
      real*4        V_I_2       ! (mag) V-I colour index (V-I) (G1)
      real*4        Type_2      ! [1/4] Type of the star (Type_num) (G2)
      integer*8     GaiaDR2_2   ! Gaia DR2 source identifier
*                                 (GaiaDR2_source_id) (G3)
      real*8        RAdeg_2     ! (deg) Barycentric right ascension (ICRS)
*                                 at Ep=2015.5 (ra) (G3)
      real*8        DEdeg_2     ! (deg) Barycentric declination (ICRS)
*                                 at Ep=2015.5 (dec) (G3)
      real*8        plx_2       ! (mas) ?=- Absolute stellar parallax (parallax) (G3)
      real*4        e_plx_2     ! (mas) ?=- Mean error of plx (parallax_error) (G3)
      real*8        pmRA_2      ! (mas/yr) ?=- Proper motion in right ascension direction
*                                 pmRA*cosDE (pmra) (G3)
      real*4        e_pmRA_2    ! (mas/yr) ?=- Mean error of pmRA (pmra_error) (G3)
      real*8        pmDE_2      ! (mas/yr) ?=- Proper motion in declination
*                                 direction (pmdec) (G3)
      real*4        e_pmDE_2    ! (mas/yr) ?=- Mean error of pmDE (pmdec_error) (G3)
      real*8        Gmag_2      ! (mag) G-band mean magnitude (Vega)
*                                 (phot_g_mean_mag) (G3)
      real*8        BPmag_2     ! (mag) ?=- Integrated BP mean magnitude (Vega)
*                                 (phot_bp_mean_mag) (G3)
      real*8        RPmag_2     ! (mag) ?=- Integrated RP mean magnitude (Vega)
*                                 (phot_rp_mean_mag) (G3)
      real*8        Rank_2      ! Position mag ranking value (rank) (G4)
      real*8        Chi_2       ! ?=- {Chi}-value for membership to the Clouds
*                                 ({Chi}) (G5)
      character*56  ONames_2    ! BEL crossmatch confirmed with linked
*                                 catalogues (other_names) (G6)
      real*4        Jmag_2      ! (mag) ?=- Apparent magnitude in J band (Jmag) (G7)
      real*4        Hmag_2      ! (mag) ?=- Apparent magnitude in  H band (Hmag) (G7)
      real*4        Ksmag_2     ! (mag) ?=- Apparent magnitude in Ks band (Ksmag) (G7)
      real*4        v3_6mag_2   ! (mag) ?=- Apparent magnitude Spitzer/IRAC
*                                 at 3.6 micron band magnitude ([3.6]) (G8)
      real*4        v4_5mag_2   ! (mag) ?=- Apparent magnitude Spitzer/IRAC
*                                 at 4.5 micron band magnitude ([4.5]) (G8)
      real*4        v5_8mag_2   ! (mag) ?=- Apparent magnitude Spitzer/IRAC
*                                 at 5.8 micron band magnitude ([5.8]) (G8)
      real*4        v8_0mag_2   ! (mag) ?=- Apparent magnitude Spitzer/IRAC
*                                 at 8.0 micron band magnitude ([8.0]) (G8)

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

C  Loading file 'tablea1.dat'	! Sample of the LMC Be stars data used
*                                in this study

C  Format for file interpretation

    1 format(
     +  I4,1X,A16,1X,F6.3,1X,F6.3,1X,F6.3,1X,F3.1,1X,I19,1X,F14.11,1X,
     +  F15.11,1X,F7.4,1X,F6.4,1X,F7.3,1X,F5.3,1X,F7.3,1X,F5.3,1X,
     +  F9.6,1X,F9.6,1X,F9.6,1X,F20.18,1X,F21.17,1X,A13,1X,F5.2,1X,
     +  F5.2,1X,F5.2,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea1.dat')
      write(6,*) '....Loading file: tablea1.dat'
      do i__=1,2393
        read(1,'(A273)')ar__
        read(ar__,1)
     +  ID,OGLE,Vmag,B_V,V_I,Type,GaiaDR2,RAdeg,DEdeg,plx,e_plx,pmRA,
     +  e_pmRA,pmDE,e_pmDE,Gmag,BPmag,RPmag,Rank,Chi,ONames,Jmag,Hmag,
     +  Ksmag,v3_6mag,v4_5mag,v5_8mag,v8_0mag
        if (idig(ar__(99:105)).EQ.0) plx =  rNULL__
        if (idig(ar__(107:112)).EQ.0) e_plx =  rNULL__
        if (idig(ar__(114:120)).EQ.0) pmRA =  rNULL__
        if (idig(ar__(122:126)).EQ.0) e_pmRA =  rNULL__
        if (idig(ar__(128:134)).EQ.0) pmDE =  rNULL__
        if (idig(ar__(136:140)).EQ.0) e_pmDE =  rNULL__
        if (idig(ar__(152:160)).EQ.0) BPmag =  rNULL__
        if (idig(ar__(162:170)).EQ.0) RPmag =  rNULL__
        if (idig(ar__(193:213)).EQ.0) Chi =  rNULL__
        if (idig(ar__(229:233)).EQ.0) Jmag =  rNULL__
        if (idig(ar__(235:239)).EQ.0) Hmag =  rNULL__
        if (idig(ar__(241:245)).EQ.0) Ksmag =  rNULL__
        if (idig(ar__(247:252)).EQ.0) v3_6mag =  rNULL__
        if (idig(ar__(254:259)).EQ.0) v4_5mag =  rNULL__
        if (idig(ar__(261:266)).EQ.0) v5_8mag =  rNULL__
        if (idig(ar__(268:273)).EQ.0) v8_0mag =  rNULL__
c    ..............Just test output...........
        write(6,1)
     +  ID,OGLE,Vmag,B_V,V_I,Type,GaiaDR2,RAdeg,DEdeg,plx,e_plx,pmRA,
     +  e_pmRA,pmDE,e_pmDE,Gmag,BPmag,RPmag,Rank,Chi,ONames,Jmag,Hmag,
     +  Ksmag,v3_6mag,v4_5mag,v5_8mag,v8_0mag
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablea2.dat'	! Sample of the four exceptionally red Be stars,
*                                ID = 909 is in the LMC and ID = 75, 184,
*                                and 547 are in the SMC

C  Format for file interpretation

    2 format(
     +  I3,1X,A18,1X,F6.3,1X,F6.3,1X,F6.3,1X,F3.1,1X,I19,1X,F14.11,1X,
     +  F15.11,1X,F7.4,1X,F6.4,1X,F5.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,
     +  F9.6,1X,F10.6,1X,F9.6,1X,F19.17,1X,F18.16,1X,A14,1X,F5.2,1X,
     +  F5.2,1X,F5.2,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea2.dat')
      write(6,*) '....Loading file: tablea2.dat'
      do i__=1,4
        read(1,'(A269)')ar__1
        read(ar__1,2)
     +  ID_1,OGLE_1,Vmag_1,B_V_1,V_I_1,Type_1,GaiaDR2_1,RAdeg_1,
     +  DEdeg_1,plx_1,e_plx_1,pmRA_1,e_pmRA_1,pmDE_1,e_pmDE_1,Gmag_1,
     +  BPmag_1,RPmag_1,Rank_1,Chi_1,ONames_1,Jmag_1,Hmag_1,Ksmag_1,
     +  v3_6mag_1,v4_5mag_1,v5_8mag_1,v8_0mag_1
c    ..............Just test output...........
        write(6,2)
     +  ID_1,OGLE_1,Vmag_1,B_V_1,V_I_1,Type_1,GaiaDR2_1,RAdeg_1,
     +  DEdeg_1,plx_1,e_plx_1,pmRA_1,e_pmRA_1,pmDE_1,e_pmDE_1,Gmag_1,
     +  BPmag_1,RPmag_1,Rank_1,Chi_1,ONames_1,Jmag_1,Hmag_1,Ksmag_1,
     +  v3_6mag_1,v4_5mag_1,v5_8mag_1,v8_0mag_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablea3.dat'	! Sample of the SMC Be stars data used
*                                in this study

C  Format for file interpretation

    3 format(
     +  I4,1X,A18,1X,F6.3,1X,F6.3,1X,F6.3,1X,F3.1,1X,I19,1X,F14.11,1X,
     +  F15.11,1X,F7.4,1X,F6.4,1X,F7.3,1X,F5.3,1X,F7.3,1X,F5.3,1X,
     +  F9.6,1X,F9.5,1X,F9.6,1X,F19.17,1X,F21.17,1X,A56,1X,F5.2,1X,
     +  F5.2,1X,F5.2,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea3.dat')
      write(6,*) '....Loading file: tablea3.dat'
      do i__=1,1004
        read(1,'(A317)')ar__2
        read(ar__2,3)
     +  ID_2,OGLE_2,Vmag_2,B_V_2,V_I_2,Type_2,GaiaDR2_2,RAdeg_2,
     +  DEdeg_2,plx_2,e_plx_2,pmRA_2,e_pmRA_2,pmDE_2,e_pmDE_2,Gmag_2,
     +  BPmag_2,RPmag_2,Rank_2,Chi_2,ONames_2,Jmag_2,Hmag_2,Ksmag_2,
     +  v3_6mag_2,v4_5mag_2,v5_8mag_2,v8_0mag_2
        if (idig(ar__2(101:107)).EQ.0) plx_2 =  rNULL__
        if (idig(ar__2(109:114)).EQ.0) e_plx_2 =  rNULL__
        if (idig(ar__2(116:122)).EQ.0) pmRA_2 =  rNULL__
        if (idig(ar__2(124:128)).EQ.0) e_pmRA_2 =  rNULL__
        if (idig(ar__2(130:136)).EQ.0) pmDE_2 =  rNULL__
        if (idig(ar__2(138:142)).EQ.0) e_pmDE_2 =  rNULL__
        if (idig(ar__2(154:162)).EQ.0) BPmag_2 =  rNULL__
        if (idig(ar__2(164:172)).EQ.0) RPmag_2 =  rNULL__
        if (idig(ar__2(194:214)).EQ.0) Chi_2 =  rNULL__
        if (idig(ar__2(273:277)).EQ.0) Jmag_2 =  rNULL__
        if (idig(ar__2(279:283)).EQ.0) Hmag_2 =  rNULL__
        if (idig(ar__2(285:289)).EQ.0) Ksmag_2 =  rNULL__
        if (idig(ar__2(291:296)).EQ.0) v3_6mag_2 =  rNULL__
        if (idig(ar__2(298:303)).EQ.0) v4_5mag_2 =  rNULL__
        if (idig(ar__2(305:310)).EQ.0) v5_8mag_2 =  rNULL__
        if (idig(ar__2(312:317)).EQ.0) v8_0mag_2 =  rNULL__
c    ..............Just test output...........
        write(6,3)
     +  ID_2,OGLE_2,Vmag_2,B_V_2,V_I_2,Type_2,GaiaDR2_2,RAdeg_2,
     +  DEdeg_2,plx_2,e_plx_2,pmRA_2,e_pmRA_2,pmDE_2,e_pmDE_2,Gmag_2,
     +  BPmag_2,RPmag_2,Rank_2,Chi_2,ONames_2,Jmag_2,Hmag_2,Ksmag_2,
     +  v3_6mag_2,v4_5mag_2,v5_8mag_2,v8_0mag_2
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