FORTRAN Generation
(/./ftp/cats/J/A_A/587/A130)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/587/A130 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 2026-Oct-14
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/587/A130      HCO and CH_3_O in prestellar cores         (Bacmann+, 2016)
*===============================================================================
*The origin of gas-phase HCO and CH_3_O radicals in prestellar cores.
*    Bacmann A., Faure A.
*    <Astron. Astrophys. 587, A130 (2016)>
*    =2016A&A...587A.130B        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Observed sources and their properties

      integer*4 nr__
      parameter (nr__=8)	! Number of records
      character*52 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*7   Source      ! Source name
      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*4        nc_H2       ! (cm-2) H_2_ column density
      character*9   Region      ! Region
      character*4   r_nc_H2     ! References for nc(H2) (1)
*Note (1): References as follows:
*           1 = Roy et al. (2014A&A...562A.138R)
*           2 = Brady Ford & Shirley (2011ApJ...728..144F)
*           3 = Tafalla et al. (2004A&A...416..191T)
*           4 = Tafalla & Santiago (2004A&A...414L..53T)
*           5 = Bacmann et al. (2002A&A...389L...6B)

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

C  Declarations for 'table3.dat'	! Line parameters for HCO transitions

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

      character*7   Source_1    ! Source name
      real*8        Freq        ! (MHz) Frequency of the transition
      real*4        rms         ! (mK) rms noise in spectrum
      integer*4     Tmb         ! (mK) ?=- Line peak intensity, T_mb_
      real*4        dv          ! (km/s) ?=- Linewidth
      character*1   l_Int       ! Limit flag on intensity
      real*4        Int         ! (K.km/s) Integrated intensity
      real*4        e_Int       ! (K.km/s) ?=- Error on integrated intensity
      character*27  FileName    ! Name of corresponding spectrum file in
*                                    subdirectory sp (1)
*Note (1): in a few cases, two or three transitions are on the same spectrum.

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

C  Declarations for 'table4.dat'	! Line parameters for CH_3_O transitions

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

      character*7   Source_2    ! Source name
      real*8        Freq_1      ! (MHz) Frequency of the transition
      real*4        rms_1       ! (mK) rms noise in spectrum
      integer*4     Tmb_1       ! (mK) ?=- Line peak intensity, T_mb_
      real*4        dv_1        ! (km/s) ?=- Linewidth
      character*1   l_Int_1     ! Limit flag on intensity
      real*4        Int_1       ! (K.km/s) Integrated intensity
      real*4        e_Int_1     ! (K.km/s) ?=- Error on integrated intensity
      character*25  FileName_1  ! Name of corresponding spectrum file in
*                                    subdirectory sp (1)
*Note (1): in a few cases, two transitions are on the same spectrum.

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

C  Declarations for 'table5.dat'	! Line parameters for CH_3_OH transitions

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

      character*7   Source_3    ! Source name
      real*8        Freq_2      ! (MHz) Frequency of the transition
      real*4        rms_2       ! (mK) rms noise in spectrum
      integer*4     Tmb_2       ! (mK) ?=- Line peak intensity, T_mb_
      real*4        dv_2        ! (km/s) ?=- Linewidth
      character*1   l_Int_2     ! Limit flag on intensity
      real*4        Int_2       ! (K.km/s) Integrated intensity
      real*4        e_Int_2     ! (K.km/s) ?=- Error on integrated intensity
      character*27  FileName_2  ! Name of corresponding spectrum file in
*                                    subdirectory sp (1)
*Note (1): in a few cases, two or three transitions are on the same spectrum.

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

C  Declarations for 'sp/*'	! Spectra for all sources and all transitions

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

      real*8        Freq_3      ! (MHz) Frequency
      real*4        Int_3       ! (K) Intensity in Ta* unit

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

C  Loading file 'table1.dat'	! Observed sources and their properties

C  Format for file interpretation

    1 format(
     +  A7,2X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,E4.1,1X,A9,
     +  1X,A4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,8
        read(1,'(A52)')ar__
        read(ar__,1)
     +  Source,RAh,RAm,RAs,DE_,DEd,DEm,DEs,nc_H2,Region,r_nc_H2
        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)
     +  Source,RAh,RAm,RAs,DE_,DEd,DEm,DEs,nc_H2,Region,r_nc_H2
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Line parameters for HCO transitions

C  Format for file interpretation

    2 format(
     +  A7,3X,F9.2,1X,F5.1,1X,I4,2X,F4.2,2X,A1,F5.3,4X,F5.3,1X,A27)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,32
        read(1,'(A81)')ar__1
        read(ar__1,2)Source_1,Freq,rms,Tmb,dv,l_Int,Int,e_Int,FileName
        if (Tmb .EQ. 45) Tmb =  iNULL__
        if (idig(ar__1(33:36)).EQ.0) dv =  rNULL__
        if (idig(ar__1(49:53)).EQ.0) e_Int =  rNULL__
c    ..............Just test output...........
        write(6,2)Source_1,Freq,rms,Tmb,dv,l_Int,Int,e_Int,FileName
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Line parameters for CH_3_O transitions

C  Format for file interpretation

    3 format(
     +  A7,3X,F9.2,1X,F5.1,1X,I4,2X,F4.2,2X,A1,E7.1,2X,E7.1,1X,A25)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,96
        read(1,'(A81)')ar__2
        read(ar__2,3)
     +  Source_2,Freq_1,rms_1,Tmb_1,dv_1,l_Int_1,Int_1,e_Int_1,
     +  FileName_1
        if (Tmb_1 .EQ. 45) Tmb_1 =  iNULL__
        if (idig(ar__2(33:36)).EQ.0) dv_1 =  rNULL__
        if (idig(ar__2(49:55)).EQ.0) e_Int_1 =  rNULL__
c    ..............Just test output...........
        write(6,3)
     +  Source_2,Freq_1,rms_1,Tmb_1,dv_1,l_Int_1,Int_1,e_Int_1,
     +  FileName_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table5.dat'	! Line parameters for CH_3_OH transitions

C  Format for file interpretation

    4 format(
     +  A7,3X,F9.2,1X,F5.1,1X,I4,2X,F4.2,2X,A1,F5.3,4X,F5.3,1X,A27)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,148
        read(1,'(A81)')ar__3
        read(ar__3,4)
     +  Source_3,Freq_2,rms_2,Tmb_2,dv_2,l_Int_2,Int_2,e_Int_2,
     +  FileName_2
        if (Tmb_2 .EQ. 45) Tmb_2 =  iNULL__
        if (idig(ar__3(33:36)).EQ.0) dv_2 =  rNULL__
        if (idig(ar__3(49:53)).EQ.0) e_Int_2 =  rNULL__
c    ..............Just test output...........
        write(6,4)
     +  Source_3,Freq_2,rms_2,Tmb_2,dv_2,l_Int_2,Int_2,e_Int_2,
     +  FileName_2
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'sp/*'	! Spectra for all sources and all transitions

C  Format for file interpretation

    5 format(F13.4,1X,E15.4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'sp/*')
      write(6,*) '....Loading file: sp/*'
      do i__=1,252
        read(1,'(A29)')ar__4
        read(ar__4,5)Freq_3,Int_3
c    ..............Just test output...........
        write(6,5)Freq_3,Int_3
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