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 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-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      (nr__) ! (deg) Right Ascension J2000
      real*8        DEdeg      (nr__) ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      character*3   VName      (nr__) ! Variable name (V1 to V34, V22-V34 are new),
*                                  <Cl* NGC 6333 SAW VNN> in Simbad
      character*7   VType      (nr__) ! Variable type (1)
      character*1   n_VType    (nr__) ! [c] c: Possibly EA
      real*4        v_Vmag_    (nr__) ! (mag) Average V magnitude
      real*4        v_imag_    (nr__) ! (mag) ?=- Average i magnitude
      character*1   l_AV       (nr__) ! Limit flag on AV
      real*4        AV         (nr__) ! (mag) Amplitude in V band
      character*1   n_AV       (nr__) ! [b] b: Depth of eclipse
      character*1   l_Ai       (nr__) ! Limit flag on Ai
      real*4        Ai         (nr__) ! (mag) ?=- Amplitude in i band
      character*1   n_Ai       (nr__) ! [b] b: Ai lists the depth of eclipse
      real*8        Per        (nr__) ! (d) ? Period, from this work
      character*1   n_Per      (nr__) ! [d] d: the real period may be twice this value
      real*4        beta       (nr__) ! (d/Myr) ? Secular period change {beta}=dP/dt
      real*8        HJDmax     (nr__) ! (d) ?=- Time of maximum eclipse (HJD-2450000)
      character*1   n_HJDmax   (nr__) ! [a] a: Time of minimum light
      real*8        Per1       (nr__) ! (d) ?=- Period from Clements papers (2)
      integer*4     RAh        (nr__) ! (h) Right ascension (J2000)
      integer*4     RAm        (nr__) ! (min) Right ascension (J2000)
      real*4        RAs        (nr__) ! (s) Right ascension (J2000)
      character*1   DE_        (nr__) ! Declination sign (J2000)
      integer*4     DEd        (nr__) ! (deg) Declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) Declination (J2000)
      real*4        DEs        (nr__) ! (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    (nr__1) ! Variable name, VNN
      character*5   Tel        (nr__1) ! [2.0H 1.5LS] Telescope: 2.0H=2m telescope in
*                                  Hanle; 1.5LS=1.54m telescope in La Silla, ESO.
      character*1   Fltr       (nr__1) ! [VI] Observation filter (V or I)
      real*8        HJD        (nr__1) ! (d) Heliocentric Julian date
      real*4        magst      (nr__1) ! (mag) Standard magnitude
      real*4        mag        (nr__1) ! (mag) Instrumental magnitude
      real*4        e_mag      (nr__1) ! (mag) Error on the magnitude
      real*8        Fref       (nr__1) ! (s-1) Reference flux (in ADU/s)
      real*4        e_Fref     (nr__1) ! (s-1) Error on the reference flux (in ADU/s)
      real*8        DFlux      (nr__1) ! (s-1) Differential flux (in ADU/s)
      real*8        e_DFlux    (nr__1) ! (s-1) Error on the differential flux (in ADU/s)
      real*4        p          (nr__1) ! [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(i__),VType(i__),n_VType(i__),v_Vmag_(i__),v_imag_(i__),
     +  l_AV(i__),AV(i__),n_AV(i__),l_Ai(i__),Ai(i__),n_Ai(i__),
     +  Per(i__),n_Per(i__),beta(i__),HJDmax(i__),n_HJDmax(i__),
     +  Per1(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__)
        if (idig(ar__(21:26)).EQ.0) v_imag_(i__) =  rNULL__
        if (idig(ar__(37:41)).EQ.0) Ai(i__) =  rNULL__
        if(ar__(45:53) .EQ. '') Per(i__) = rNULL__
        if(ar__(56:60) .EQ. '') beta(i__) = rNULL__
        if (idig(ar__(62:70)).EQ.0) HJDmax(i__) =  rNULL__
        if (idig(ar__(72:82)).EQ.0) Per1(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)
     +  VName(i__),VType(i__),n_VType(i__),v_Vmag_(i__),v_imag_(i__),
     +  l_AV(i__),AV(i__),n_AV(i__),l_Ai(i__),Ai(i__),n_Ai(i__),
     +  Per(i__),n_Per(i__),beta(i__),HJDmax(i__),n_HJDmax(i__),
     +  Per1(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(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 '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(i__),Tel(i__),Fltr(i__),HJD(i__),magst(i__),mag(i__),
     +  e_mag(i__),Fref(i__),e_Fref(i__),DFlux(i__),e_DFlux(i__),
     +  p(i__)
c    ..............Just test output...........
        write(6,2)
     +  VName_1(i__),Tel(i__),Fltr(i__),HJD(i__),magst(i__),mag(i__),
     +  e_mag(i__),Fref(i__),e_Fref(i__),DFlux(i__),e_DFlux(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