FORTRAN Generation
(/./ftp/cats/J/MNRAS/434/1220)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/434/1220 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 2024-Mar-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/MNRAS/434/1220   Vi light curves of NGC6333 variables  (Arellano Ferro+, 2013)
*================================================================================
*A detailed census of variable stars in the globular cluster NGC 6333 (M9) from
*CCD differential photometry.
*    Arellano Ferro A., Bramich D.M., Figuera Jaimes R., Giridhar S., Kains N.,
*    Kuppuswamy K., Jorgensen U.G., Alsubai K.A., Andersen J.M., Bozza V.,
*    Browne P., Calchi Novati S., Damerdji Y., Diehl C., Dominik M., Dreizler S.,
*    Elyiv A., Giannini E., Harpsoe K., Hessman F.V., Hinse T.C., Hundertmark M.,
*    Juncher D., Kerins E., Korhonen H., Liebig C., Mancini L., Mathiasen M.,
*    Penny M.T., Rabus M., Rahvar S., Ricci D., Scarpetta G., Skottfelt J.,
*    Snodgrass C., Southworth J., Surdej J., Tregloan-Reed J., Vilela C.,
*    Wertz O.
*   <Mon. Not. R. Astron. Soc. 434, 1220 (2013)>
*   =2013MNRAS.434.1220A
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table3.dat'	! *General data for all of the confirmed variables
                             in NGC 6333 in the FOV of our images.

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

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

      character*3   VName       ! Variable name (V1 to V34, V22-V34 are new),
*                                  <Cl* NGC 6333 SAW VNN> in Simbad
      character*7   VType       ! Variable type (1)
      character*1   n_VType     ! [c] c: Possibly EA
      real*4        v_Vmag_     ! (mag) Average V magnitude
      real*4        v_imag_     ! (mag) ?=- Average i magnitude
      character*1   l_AV        ! Limit flag on AV
      real*4        AV          ! (mag) Amplitude in V band
      character*1   n_AV        ! [b] b: Depth of eclipse
      character*1   l_Ai        ! Limit flag on Ai
      real*4        Ai          ! (mag) ?=- Amplitude in i band
      character*1   n_Ai        ! [b] b: Ai lists the depth of eclipse
      real*8        Per         ! (d) ? Period, from this work
      character*1   n_Per       ! [d] d: the real period may be twice this value
      real*4        beta        ! (d/Myr) ? Secular period change {beta}=dP/dt
      real*8        HJDmax      ! (d) ?=- Time of maximum eclipse (HJD-2450000)
      character*1   n_HJDmax    ! [a] a: Time of minimum light
      real*8        Per1        ! (d) ?=- Period from Clements papers (2)
      integer*4     RAh         ! (h) Right ascension (J2000)
      integer*4     RAm         ! (min) Right ascension (J2000)
      real*4        RAs         ! (s) Right ascension (J2000)
      character*1   DE_         ! Declination sign (J2000)
      integer*4     DEd         ! (deg) Declination (J2000)
      integer*4     DEm         ! (arcmin) Declination (J2000)
      real*4        DEs         ! (arcsec) Declination (J2000)
*Note (1): Labels 'Bl' and 'd' are for Blazhko variables and double-mode
*    RR Lyrae, respectively; 'An.Cep' stands for Anomalous Cepheid, 
*    'E' for Eclising binary (possibly EA), 'EW' for contact eclipsing
*    binaries (W UMa-type), 'LPV' for Long-Period Variable.
*Note (2): The best previous period estimates for each variable from the Clement
*  series of papers (Clement et al., 1984, Cat. J/AJ/89/1707;
*  Clement & Walker 1991, Cat. J/AJ/101/1352;
*  Clement & Shelton 1996, Cat. J/AJ/112/618, 1999, Cat. J/AJ/118/453)
*  are reported for comparison with our refined periods.

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

C  Declarations for 'table2.dat'	! V and i light curves

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

      character*3   VName_1     ! Variable name, VNN
      character*5   Tel         ! [2.0H 1.5LS] Telescope: 2.0H=2m telescope in
*                                  Hanle; 1.5LS=1.54m telescope in La Silla, ESO.
      character*1   Fltr        ! [VI] Observation filter (V or I)
      real*8        HJD         ! (d) Heliocentric Julian date
      real*4        magst       ! (mag) Standard magnitude
      real*4        mag         ! (mag) Instrumental magnitude
      real*4        e_mag       ! (mag) Error on the magnitude
      real*8        Fref        ! (s-1) Reference flux (in ADU/s)
      real*4        e_Fref      ! (s-1) Error on the reference flux (in ADU/s)
      real*8        DFlux       ! (s-1) Differential flux (in ADU/s)
      real*8        e_DFlux     ! (s-1) Error on the differential flux (in ADU/s)
      real*4        p           ! [0.3/1.4] Photometric scale factor

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

C  Loading file 'table3.dat'	! *General data for all of the confirmed variables
*                             in NGC 6333 in the FOV of our images.

C  Format for file interpretation

    1 format(
     +  A3,1X,A7,A1,1X,F6.3,1X,F6.3,1X,A1,F5.3,A1,1X,A1,F5.3,A1,2X,
     +  F9.7,A1,1X,F5.2,1X,F9.4,A1,F11.7,2X,I2,1X,I2,1X,F5.2,1X,A1,I2,
     +  1X,I2,1X,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,34
        read(1,'(A107)')ar__
        read(ar__,1)
     +  VName,VType,n_VType,v_Vmag_,v_imag_,l_AV,AV,n_AV,l_Ai,Ai,n_Ai,
     +  Per,n_Per,beta,HJDmax,n_HJDmax,Per1,RAh,RAm,RAs,DE_,DEd,DEm,
     +  DEs
        if (idig(ar__(21:26)).EQ.0) v_imag_ =  rNULL__
        if (idig(ar__(37:41)).EQ.0) Ai =  rNULL__
        if(ar__(45:53) .EQ. '') Per = rNULL__
        if(ar__(56:60) .EQ. '') beta = rNULL__
        if (idig(ar__(62:70)).EQ.0) HJDmax =  rNULL__
        if (idig(ar__(72:82)).EQ.0) Per1 =  rNULL__
        RAdeg = rNULL__
        DEdeg = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh .GT. -180) RAdeg=RAh*15.
        if(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
        if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  VName,VType,n_VType,v_Vmag_,v_imag_,l_AV,AV,n_AV,l_Ai,Ai,n_Ai,
     +  Per,n_Per,beta,HJDmax,n_HJDmax,Per1,RAh,RAm,RAs,DE_,DEd,DEm,
     +  DEs
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! V and i light curves

C  Format for file interpretation

    2 format(
     +  A3,1X,A5,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=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,14438
        read(1,'(A89)')ar__1
        read(ar__1,2)
     +  VName_1,Tel,Fltr,HJD,magst,mag,e_mag,Fref,e_Fref,DFlux,
     +  e_DFlux,p
c    ..............Just test output...........
        write(6,2)
     +  VName_1,Tel,Fltr,HJD,magst,mag,e_mag,Fref,e_Fref,DFlux,
     +  e_DFlux,p
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