FORTRAN Generation
(/./ftp/cats/J/AJ/150/107)

Conversion of standardized ReadMe file for file /./ftp/cats/J/AJ/150/107 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 2026-Aug-15
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/AJ/150/107         Variable stars from TNTS. I. 2012-2014         (Yao+, 2015)
*================================================================================
*Photometry of variable stars from the THU-NAOC transient survey.
*I. The first two years.
*    Yao X., Wang L., Wang X., Zhang T., Chen J., Yuan W., Mo J., Li W., Jin Z.,
*    Wu X., Nie J., Zhou X.
*   <Astron. J., 150, 107 (2015)>
*   =2015AJ....150..107Y    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Variable stars

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

C  J2000 position composed of: RAh RAm RAs 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*4   Field      (nr__) ! Survey field identifier
      integer*4     Star       (nr__) ! Identifier within the field
      integer*4     RAh        (nr__) ! (h) Hour of Right Ascension (J2000) (1)
      integer*4     RAm        (nr__) ! (min) Minute of Right Ascension (J2000) (1)
      real*4        RAs        (nr__) ! (s) Second of Right Ascension (J2000) (1)
      integer*4     DEd        (nr__) ! (deg) Degree of Declination (J2000) (1)
      integer*4     DEm        (nr__) ! (arcmin) Arcminute of Declination (J2000) (1)
      real*4        DEs        (nr__) ! (arcsec) Arcsecond of Declination (J2000) (1)
      real*4        v_mag_     (nr__) ! (mag) [9.3/141.2] Mean unfiltered magnitude (2)
      real*4        Av         (nr__) ! (mag) [0.01/1.2] Line-of-sight extinction (3)
      real*4        Amp        (nr__) ! (mag) [0/3.8] Amplitude of variation (4)
      real*4        Js         (nr__) ! [0.31/30] Welch-Stetson variability index J_s_
*                                 (Stetson, 1996PASP..108..851S)
      real*8        Per1       (nr__) ! (d) [0.1/730]? Period from our measurement (Tsinghua
*                                 University-NAOC Transient Survey; TNTS)
      character*3   Meth       (nr__) ! Period calculate method (LS, PDM, or VSX) (5)
      real*8        Per2       (nr__) ! (d) [0.2/730]? Period from International Variable
*                                 Star Index (VSX; cat. B/vsx)
      real*8        T0         (nr__) ! [121/882]? Epoch when primary eclipse or minimum
*                                 light occurs
      character*7   Type       (nr__) ! Tentative classification about the variable star
*                                 whenever possible (6)
      character*1   VSX        (nr__) ! [V] Indicates a VSX variable (7)
      character*1   CSS        (nr__) ! [C] Indicates a CSS variable (7)
      character*1   New        (nr__) ! [N] Indicates a new variable
      character*1   LIN        (nr__) ! [L] Indicates a LINEAR variable (7)
*Note (1): Based on reference images from Tsinghua University-NAOC Transient
*     Survey (TNTS).
*Note (2): Calibrated with the R-band magnitudes of the Position and Proper
*     Motions eXtended (PPMX; cat. I/312) catalog.
*Note (3): Based on Schlafly & Finkbeiner (2011ApJ...737..103S).
*Note (4): Magnitude from maximum to minimum.
*Note (5): The methods are defined as below:
*    LS = Lomb-Scargle method;
*   PDM = Phase Dispersion Minimization method;
*   VSX = From International Variable Star Index (VSX; cat. B/vsx) catalogs.
*Note (6): Including previous identification of variables from VSX (cat. B/vsx)
*     database and GCVS (cat. B/gcvs), defined as follows:
*  ACEP = Anomalous Cepheids;
*    RS = RS Canum Venaticorum;
*    EC = Contact binary;
*    ES = Semi-detached binary;
*    ED = Detached binary;
*   CWA = W Virginis;
*    RR = RR Lyrae variable;
*    BL = "Blazhko effect";
*   CEP = Cepheids;
*  GDOR = Gamma Doradus star;
*  DSCT = Delta Scuti star;
*    SR = Semiregular pulsator;
*     M = Mira variable;
*   LPV = Long Period Variable;
*     L = Slow irregular variable.
*Note (7): Information flag defined as below:
*     V = Variable in International Variable Star Index (VSX; cat. B/vsx) of the
*         Association of Variable Star Observers (AAVSO);
*     C = Variable in Catalina Sky Survey (CSS) sample (Drake et al. 2014,
*         cat. J/ApJS/213/9);
*     L = Variable in Lincoln Near-Earth Asteroid Research (LINEAR) survey sample
*         (Palaversa et al. 2013, cat. J/AJ/146/101);
*     N = New variable.

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

C  Loading file 'table1.dat'	! Variable stars

C  Format for file interpretation

    1 format(
     +  A4,1X,I5,1X,I2,1X,I2,1X,F5.2,1X,I3,1X,I2,1X,F5.2,1X,F6.2,1X,
     +  F4.2,1X,F4.2,1X,F5.2,1X,F12.8,1X,A3,1X,F10.6,1X,F7.3,1X,A7,1X,
     +  A1,A1,A1,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,1237
        read(1,'(A107)')ar__
        read(ar__,1)
     +  Field(i__),Star(i__),RAh(i__),RAm(i__),RAs(i__),DEd(i__),
     +  DEm(i__),DEs(i__),v_mag_(i__),Av(i__),Amp(i__),Js(i__),
     +  Per1(i__),Meth(i__),Per2(i__),T0(i__),Type(i__),VSX(i__),
     +  CSS(i__),New(i__),LIN(i__)
        if(ar__(60:71) .EQ. '') Per1(i__) = rNULL__
        if(ar__(77:86) .EQ. '') Per2(i__) = rNULL__
        if(ar__(88:94) .EQ. '') T0(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.
c    ..............Just test output...........
        write(6,1)
     +  Field(i__),Star(i__),RAh(i__),RAm(i__),RAs(i__),DEd(i__),
     +  DEm(i__),DEs(i__),v_mag_(i__),Av(i__),Amp(i__),Js(i__),
     +  Per1(i__),Meth(i__),Per2(i__),T0(i__),Type(i__),VSX(i__),
     +  CSS(i__),New(i__),LIN(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

C=============================================================================
      stop
      end