FORTRAN Generation
(/./ftp/cats/J/A_AS/126/479)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_AS/126/479 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/A+AS/126/479      NIR photometry of IRAS sources. III  (Garcia-Lario+, 1997)
*================================================================================
*Near infrared photometry of IRAS sources with colours
*like planetary nebulae. III.
*       Garcia-Lario P., Manchado A., Pych W., Pottasch S.R.
*      <Astron. Astrophys. Suppl. Ser. 126, 479 (1997)>
*      =1997A&AS..126..479G      (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'stars.dat'	! List of stars in tables 3, 4 or 6.

      integer*4 nr__
      parameter (nr__=336)	! Number of records
      character*46 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)

      integer*4     RAh        (nr__) ! (h) Right Ascension J2000 (hours) (1)
      integer*4     RAm        (nr__) ! (min) Right Ascension J2000 (minutes) (1)
      real*4        RAs        (nr__) ! (s) Right Ascension J2000 (seconds) (1)
      character*1   DE_        (nr__) ! Declination J2000 (sign) (1)
      integer*4     DEd        (nr__) ! (deg) Declination J2000 (degrees)
      integer*4     DEm        (nr__) ! (arcmin) Declination J2000 (minutes) (1)
      integer*4     DEs        (nr__) ! (arcsec) Declination J2000 (seconds) (1)
      character*6   Cat        (nr__) ! Catalog "IRAS", "IRAS-F"
      character*10  IRAS       (nr__) ! Source name as it appears in the tables
      character*5   Tables     (nr__) ! [3,4,6 ] Table number dealing with the source
*Note (1): position taken from Simbad

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

C  Declarations for 'table6.dat'	! Classification of individual sources

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

      integer*4     GLMP       (nr__1) ! Sequence number in the sample
      character*1   f_GLMP     (nr__1) ! [*] Indicates a note in file notes.tex
      character*10  IRAS_1     (nr__1) ! IRAS name
      character*28  Onames     (nr__1) ! Other names in the literature
      real*8        F12um      (nr__1) ! (Jy) IRAS flux density at 12 microns
      real*4        v_12___25_ (nr__1) ! (mag) IRAS colour [12]-[25]  = 2.5log(F(25)/F(12))
      real*4        v_25___60_ (nr__1) ! (mag) IRAS colour [25]-[60]  = 2.5log(F(60)/F(25))
      integer*4     LRS        (nr__1) ! ? LRS class (see Cat. <III/197>)
      integer*4     VAR        (nr__1) ! IRAS variability index
      character*8   NIR        (nr__1) ! Code from I to V indicating the position of
*                                   the source in the NIR two-colour diagram
      character*4   CO         (nr__1) ! CO detection code (1)
      character*17  r_CO       (nr__1) ! Reference for the CO detection in refs.dat
      character*7   OH         (nr__1) ! OH detection code (2)
      character*13  r_OH       (nr__1) ! Reference for the OH detection in refs.dat
      character*28  Type       (nr__1) ! Tentative classification
*Note (1): the code for CO detection takes the following values:
*      N   = Not detected
*      Y   = Detected
*      Y_n = Narrow Emission Detected
*      Y?  = Possible detection
*Note (2): the code for OH detection takes the following values:
*      N   = Not detected
*      Y   = Double peak
*      Y'  = Absorption
*      Y?  = Possible detection
*      Y_1 = Single peak
*      Y_1?= Possible Single peak
*      Y_m = Multiple peaks
*   Y_1667_= Detected only at 1667 MHz

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

C  Declarations for 'table3.dat'	! Observed magnitudes

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

      character*10  IRAS_2     (nr__2) ! IRAS name, or SAO number
      character*1   m_IRAS     (nr__2) ! Multiplicity index on IRAS
      character*2   l_Jmag     (nr__2) ! [>= ] Limit flag on Jmag
      real*4        Jmag       (nr__2) ! (mag) ? J magnitude
      real*4        e_Jmag     (nr__2) ! (mag) ? rms uncertainty on Jmag
      character*2   l_Hmag     (nr__2) ! [>= ] Limit flag on Hmag
      real*4        Hmag       (nr__2) ! (mag) ? H magnitude
      real*4        e_Hmag     (nr__2) ! (mag) ? rms uncertainty on Hmag
      real*4        Kmag       (nr__2) ! (mag) ? K magnitude
      real*4        e_Kmag     (nr__2) ! (mag) ? rms uncertainty on Kmag
      character*2   l_L_mag    (nr__2) ! [>= ] Limit flag on L'mag
      real*4        L_mag      (nr__2) ! (mag) ? L' magnitude
      real*4        e_L_mag    (nr__2) ! (mag) ? rms uncertainty on L'mag
      character*2   l_Mmag     (nr__2) ! [>= ] Limit flag on Mmag
      real*4        Mmag       (nr__2) ! (mag) ? M magnitude
      real*4        e_Mmag     (nr__2) ! (mag) ? rms uncertainty on Mmag
      integer*4     Run        (nr__2) ! Run number
      character*14  r_IRAS     (nr__2) ! References detailed in file refs.dat

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

C  Declarations for 'table4.dat'	! IRAS sources not detected in the K band

      integer*4 nr__3
      parameter (nr__3=42)	! Number of records
      character*20 ar__3  	! Full-size record

      character*10  IRAS_3     (nr__3) ! IRAS name
      integer*4     n_IRAS     (nr__3) ! [1/4]? Note (1)
      character*3   Run_1      (nr__3) ! Run numbers
*Note (1): the numbers have the following meaning:
*       1: Detected in run (8)
*       2: The object detected in run (2) is 40" away from the IRAS position
*       3: Detected in run (6)
*       4: Detected in run (7)

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

C  Declarations for 'refs.dat'	! References

      integer*4 nr__4
      parameter (nr__4=99)	! Number of records
      character*80 ar__4  	! Full-size record

      integer*4     RefNo      (nr__4) ! Reference number
      character*77  Text       (nr__4) ! Text of reference, including the bibcode

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

C  Loading file 'stars.dat'	! List of stars in tables 3, 4 or 6.

C  Format for file interpretation

    1 format(I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,3X,A6,A10,2X,A5)

C  Effective file loading

      open(unit=1,status='old',file=
     +'stars.dat')
      write(6,*) '....Loading file: stars.dat'
      do i__=1,336
        read(1,'(A46)')ar__
        read(ar__,1)
     +  RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),
     +  DEs(i__),Cat(i__),IRAS(i__),Tables(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)
     +  RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),DEm(i__),
     +  DEs(i__),Cat(i__),IRAS(i__),Tables(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 'table6.dat'	! Classification of individual sources

C  Format for file interpretation

    2 format(
     +  I4,A1,A10,1X,A28,1X,F8.3,F5.2,1X,F5.2,1X,I2,1X,I2,1X,A8,A4,
     +  A17,1X,A7,1X,A13,1X,A28)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table6.dat')
      write(6,*) '....Loading file: table6.dat'
      do i__=1,324
        read(1,'(A151)')ar__1
        read(ar__1,2)
     +  GLMP(i__),f_GLMP(i__),IRAS_1(i__),Onames(i__),F12um(i__),
     +  v_12___25_(i__),v_25___60_(i__),LRS(i__),VAR(i__),NIR(i__),
     +  CO(i__),r_CO(i__),OH(i__),r_OH(i__),Type(i__)
        if(ar__1(66:67) .EQ. '') LRS(i__) = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  GLMP(i__),f_GLMP(i__),IRAS_1(i__),Onames(i__),F12um(i__),
     +  v_12___25_(i__),v_25___60_(i__),LRS(i__),VAR(i__),NIR(i__),
     +  CO(i__),r_CO(i__),OH(i__),r_OH(i__),Type(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Observed magnitudes

C  Format for file interpretation

    3 format(
     +  A10,A1,A2,F5.2,1X,F4.2,1X,A2,F5.2,1X,F4.2,2X,F5.2,1X,F4.2,1X,
     +  A2,F4.2,1X,F4.2,1X,A2,F4.2,1X,F4.2,1X,I1,1X,A14)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,254
        read(1,'(A89)')ar__2
        read(ar__2,3)
     +  IRAS_2(i__),m_IRAS(i__),l_Jmag(i__),Jmag(i__),e_Jmag(i__),
     +  l_Hmag(i__),Hmag(i__),e_Hmag(i__),Kmag(i__),e_Kmag(i__),
     +  l_L_mag(i__),L_mag(i__),e_L_mag(i__),l_Mmag(i__),Mmag(i__),
     +  e_Mmag(i__),Run(i__),r_IRAS(i__)
        if(ar__2(14:18) .EQ. '') Jmag(i__) = rNULL__
        if(ar__2(20:23) .EQ. '') e_Jmag(i__) = rNULL__
        if(ar__2(27:31) .EQ. '') Hmag(i__) = rNULL__
        if(ar__2(33:36) .EQ. '') e_Hmag(i__) = rNULL__
        if(ar__2(39:43) .EQ. '') Kmag(i__) = rNULL__
        if(ar__2(45:48) .EQ. '') e_Kmag(i__) = rNULL__
        if(ar__2(52:55) .EQ. '') L_mag(i__) = rNULL__
        if(ar__2(57:60) .EQ. '') e_L_mag(i__) = rNULL__
        if(ar__2(64:67) .EQ. '') Mmag(i__) = rNULL__
        if(ar__2(69:72) .EQ. '') e_Mmag(i__) = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  IRAS_2(i__),m_IRAS(i__),l_Jmag(i__),Jmag(i__),e_Jmag(i__),
     +  l_Hmag(i__),Hmag(i__),e_Hmag(i__),Kmag(i__),e_Kmag(i__),
     +  l_L_mag(i__),L_mag(i__),e_L_mag(i__),l_Mmag(i__),Mmag(i__),
     +  e_Mmag(i__),Run(i__),r_IRAS(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! IRAS sources not detected in the K band

C  Format for file interpretation

    4 format(A10,1X,I1,1X,A3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,42
        read(1,'(A20)')ar__3
        read(ar__3,4)IRAS_3(i__),n_IRAS(i__),Run_1(i__)
        if(ar__3(12:12) .EQ. '') n_IRAS(i__) = iNULL__
c    ..............Just test output...........
        write(6,4)IRAS_3(i__),n_IRAS(i__),Run_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! References

C  Format for file interpretation

    5 format(I2,1X,A77)

C  Effective file loading

      open(unit=1,status='old',file=
     +'refs.dat')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,99
        read(1,'(A80)')ar__4
        read(ar__4,5)RefNo(i__),Text(i__)
c    ..............Just test output...........
        write(6,5)RefNo(i__),Text(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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