FORTRAN Generation
(/./ftp/cats/J/other/IBVS/6137)

Conversion of standardized ReadMe file for file /./ftp/cats/J/other/IBVS/6137 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/other/IBVS/6137   New variables in M5 (NGC 5904)       (Arellano Ferro+, 2015)
*================================================================================
*New variables in M5 (NGC 5904) and some identification corrections.
*    Arellano Ferro A., Bramich D.M., Giridhar S., Luna A., Muneer S
*   <IAU Inform. Bull. Var. Stars IBVS, 6137 (2015)>
*   =2015IBVS.6137....1A
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'stars.dat'	! List of studied variables

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

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

      character*4   VName      (nr__) ! Variable name
      integer*4     RAh        (nr__) ! (h) Simbad Right ascension (J2000.0)
      integer*4     RAm        (nr__) ! (min) Simbad Right ascension (J2000.0)
      real*4        RAs        (nr__) ! (s) SImbad Right ascension (J2000.0)
      character*1   DE_        (nr__) ! Simbad Declination sign (J2000.0)
      integer*4     DEd        (nr__) ! (deg) Simbad Declination (J2000.0)
      integer*4     DEm        (nr__) ! (arcmin) Simbad Declination (J2000.0)
      real*4        DEs        (nr__) ! (arcsec) Simbad Declination (J2000.0)
      character*21  Simbad     (nr__) ! Simbad name

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

C  Declarations for 'table4.dat'	! New variable stars found in M5, V170-V181

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

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

      character*4   VName_1    (nr__1) ! Variable name (V170 to V181)
      character*6   VType      (nr__1) ! Variable type (SX Phe or SRA)
      integer*4     RAh_1      (nr__1) ! (h) Right ascension (J2000.0)
      integer*4     RAm_1      (nr__1) ! (min) Right ascension (J2000.0)
      real*4        RAs_1      (nr__1) ! (s) Right ascension (J2000.0)
      character*1   DE__1      (nr__1) ! Declination sign (J2000.0)
      integer*4     DEd_1      (nr__1) ! (deg) Declination (J2000.0)
      integer*4     DEm_1      (nr__1) ! (arcmin) Declination (J2000.0)
      real*4        DEs_1      (nr__1) ! (arcsec) Declination (J2000.0)
      real*8        Per        (nr__1) ! (d) [0.08/142]?=- Period
      real*8        Epoch      (nr__1) ! (d) ?=- Epoch of ephemeride
      real*4        v_Vmag_    (nr__1) ! (mag) [12/16] Mean V magnitude
      real*4        v_Imag_    (nr__1) ! (mag) [10/16] Mean I magnitude
      real*4        Vamp       (nr__1) ! (mag) [0.07/0.57] V band amplitude
      real*4        Iamp       (nr__1) ! (mag) [0.08/0.41] I band amplitude

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

C  Declarations for 'table1.dat'	! Time-series V and I photometry for all stars
                             discussed in this paper

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

      character*4   VName_2    (nr__2) ! Variable name, VNN
      character*1   Filt       (nr__2) ! [VI] Observation filter ("V" or "I")
      real*8        HJD        (nr__2) ! (d) Heliocentric Julian date
      real*4        magst      (nr__2) ! (mag) [10/23] Standard magnitude
      real*4        maginst    (nr__2) ! (mag) Instrumental magnitude
      real*4        e_maginst  (nr__2) ! (mag) Error on the magnitude
      real*8        Fref       (nr__2) ! (s-1) Reference flux (in ADU/s)
      real*4        e_Fref     (nr__2) ! (s-1) Error on the reference flux (in ADU/s)
      real*8        Fdiff      (nr__2) ! (s-1) Differential flux (in ADU/s)
      real*8        e_Fdiff    (nr__2) ! (s-1) Error on the differential flux (in ADU/s)
      real*4        p          (nr__2) ! [0.04/1.15] Photometric scale factor

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

C  Loading file 'stars.dat'	! List of studied variables

C  Format for file interpretation

    1 format(A4,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,A21)

C  Effective file loading

      open(unit=1,status='old',file=
     +'stars.dat')
      write(6,*) '....Loading file: stars.dat'
      do i__=1,44
        read(1,'(A50)')ar__
        read(ar__,1)
     +  VName(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Simbad(i__)
        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)
     +  VName(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Simbad(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'	! New variable stars found in M5, V170-V181

C  Format for file interpretation

    2 format(
     +  A4,1X,A6,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F10.6,
     +  1X,F9.4,1X,F5.2,1X,F5.2,1X,F4.2,1X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,12
        read(1,'(A78)')ar__1
        read(ar__1,2)
     +  VName_1(i__),VType(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),
     +  DE__1(i__),DEd_1(i__),DEm_1(i__),DEs_1(i__),Per(i__),
     +  Epoch(i__),v_Vmag_(i__),v_Imag_(i__),Vamp(i__),Iamp(i__)
        if (idig(ar__1(37:46)).EQ.0) Per(i__) =  rNULL__
        if (idig(ar__1(48:56)).EQ.0) Epoch(i__) =  rNULL__
        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,2)
     +  VName_1(i__),VType(i__),RAh_1(i__),RAm_1(i__),RAs_1(i__),
     +  DE__1(i__),DEd_1(i__),DEm_1(i__),DEs_1(i__),Per(i__),
     +  Epoch(i__),v_Vmag_(i__),v_Imag_(i__),Vamp(i__),Iamp(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg_1(i__),DEdeg_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table1.dat'	! Time-series V and I photometry for all stars
*                             discussed in this paper

C  Format for file interpretation

    3 format(
     +  A4,1X,A1,1X,F13.5,1X,F6.3,1X,F6.3,1X,F5.3,1X,F10.3,1X,F6.3,1X,
     +  F10.3,1X,F7.3,1X,F6.4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,32413
        read(1,'(A84)')ar__2
        read(ar__2,3)
     +  VName_2(i__),Filt(i__),HJD(i__),magst(i__),maginst(i__),
     +  e_maginst(i__),Fref(i__),e_Fref(i__),Fdiff(i__),e_Fdiff(i__),
     +  p(i__)
c    ..............Just test output...........
        write(6,3)
     +  VName_2(i__),Filt(i__),HJD(i__),magst(i__),maginst(i__),
     +  e_maginst(i__),Fref(i__),e_Fref(i__),Fdiff(i__),e_Fdiff(i__),
     +  p(i__)
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