FORTRAN Generation
(/./ftp/cats/J/A_A/578/A128)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/578/A128 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-29
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/A+A/578/A128      VI light curves of NGC4590 variables          (Kains+, 2015)
*================================================================================
*A census of variability in globular cluster M68 (NGC 4590).
*    Kains N., Arellano Ferro A., Figuera Jaimes R., Bramich D. M., Skottfelt J.,
*    Jorgensen U.G., Tsapras Y., Street R.A., Browne P., Dominik M., Horne K.,
*    Hundertmark M., Ipatov S., Snodgrass C., Steele I.A., Alsubai K.A.,
*    Bozza V., Calchi Novati S., Ciceri S., D'Ago G., Galianni P., Gu S.-H.,
*    Harpsoe K., Hinse T.C., Juncher D., Korhonen H., Mancini L., Popovas A.,
*    Rabus M., Rahvar S., Southworth J., Surdej J., Vilela C., Wang X.-B.,
*    Wertz O.
*   <Astron. Astrophys. 578, A128 (2015)>
*   =2015A&A...578A.128K
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table43.dat'	! Data for all confirmed variable stars in NGC4590

      integer*4 nr__
      parameter (nr__=50)	! Number of records
      character*97 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 ID (V1 to V53, V40-V42 missing)
      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)
      real*8        Ep          ! (d) [2697/6434]?=- Epoch (HJD-2450000)
      real*8        Per         ! (d) [0.03/323]?=- Variability period
      real*4        beta        ! (d/Myr) [-1.1/1.6]?=- Period-change rate parameter
*                                   {beta}, where relevant (in 2.738x10^-9^)
      real*4        v_Vmag_     ! (mag) [9.8/18.1]?=- Intensity-weighted mean
*                                   V magnitude (1)
      real*4        v_Imag_     ! (mag) [15/17.68]?=- Intensity-weighted mean
*                                   I magnitude (1)
      character*2   l_Vamp      ! [~ >=] Limit flag on Vamp
      real*4        Vamp        ! (mag) [0.1/4.1]?=- Amplitude in V band
      character*1   u_Iamp      ! [~] Uncertainty flag on Iamp
      real*4        Iamp        ! (mag) [0.1/0.8]?=- Amplitude in I band
      character*10  VType       ! Variable type: RR0/1, SX Phe, or Mira
      character*2   n_VType     ! [bd+? ] Note on VType (2)
*Note (1): calculated from Fourier fits for all RRL stars, as the mean magnitude
*   is stable even for unsatisfactory fits. For stars without good Fourier fits,
*   amplitudes are calculated from the data. For V27, the data are taken from
*   the ASAS catalogue Pojmanski (2002AcA....52..397P, Cat. II/264).
*   The data for V32 are taken from Clement et al. (1993ApJ...412..183C,
*   Cat. J/ApJ/412/183), as that star is outside of our field of view.
*Note (2): Notes as follows:
*   b = star which exhibit Blazhko modulation in their light curve
*   d = double-mode pulsation
*   + = this star is FI Hydra
*   ? = uncertainty flag

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

C  Declarations for 'ngc4590.dat'	! *V and I light curves for 49 variables

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

      character*3   VName_1     ! Variable ID (VNN)
      character*1   Filter      ! [VI] Filter (V or I)
      real*8        JD          ! (d) Julian date
      real*4        mag_s       ! (mag) [12.7/18.5] Standard magnitude
      real*4        mag_i       ! (mag) [14.8/21.3] Instrumental magnitude
      real*4        e_mag_i     ! (mag) [0.001/0.2] Error on the magnitude
      real*8        Fref        ! (s-1) [44/5832] Reference flux (in ADU/s)
      real*4        e_Fref      ! (s-1) [0.9/1.6] Error on the reference flux (in ADU/s)
      real*8        DFlux       ! (s-1) [-11069/11018] Differential flux (in ADU/s)
      real*8        e_DFlux     ! (s-1) [2/56] Error on the differential flux (in ADU/s)
      real*4        p           ! [0.5/3.1] Photometric scale factor

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

C  Loading file 'table43.dat'	! Data for all confirmed variable stars in NGC4590

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'table43.dat')
      write(6,*) '....Loading file: table43.dat'
      do i__=1,50
        read(1,'(A97)')ar__
        read(ar__,1)
     +  VName,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Ep,Per,beta,v_Vmag_,v_Imag_,
     +  l_Vamp,Vamp,u_Iamp,Iamp,VType,n_VType
        if (idig(ar__(31:39)).EQ.0) Ep =  rNULL__
        if (idig(ar__(41:51)).EQ.0) Per =  rNULL__
        if (idig(ar__(53:58)).EQ.0) beta =  rNULL__
        if (idig(ar__(60:64)).EQ.0) v_Vmag_ =  rNULL__
        if (idig(ar__(66:70)).EQ.0) v_Imag_ =  rNULL__
        if (idig(ar__(74:77)).EQ.0) Vamp =  rNULL__
        if (idig(ar__(80:83)).EQ.0) Iamp =  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,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Ep,Per,beta,v_Vmag_,v_Imag_,
     +  l_Vamp,Vamp,u_Iamp,Iamp,VType,n_VType
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'ngc4590.dat'	! *V and I light curves for 49 variables

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'ngc4590.dat')
      write(6,*) '....Loading file: ngc4590.dat'
      do i__=1,21747
        read(1,'(A82)')ar__1
        read(ar__1,2)
     +  VName_1,Filter,JD,mag_s,mag_i,e_mag_i,Fref,e_Fref,DFlux,
     +  e_DFlux,p
c    ..............Just test output...........
        write(6,2)
     +  VName_1,Filter,JD,mag_s,mag_i,e_mag_i,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