FORTRAN Generation
(/./ftp/cats/J/A_A/444/895)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/444/895 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-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+A/444/895       Spectroscopy of HD 45166                 (Steiner+, 2005)
*================================================================================
*The qWR star HD 45166: I. Observations and system parameters
*    Steiner J.E., Oliveira, A.S.
*   <Astron. Astrophys. 444, 895 (2005)>
*   =2005A&A...444..895S
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! Journal of observations

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

      character*10  Date        ! ("YYYY/MM/DD") Observation date (UT)
      character*9   Tel         ! Telescope
      real*4        Res         ! (0.1nm) Spectral resolution
      integer*4     ExpTime     ! (min) Exposure time
      integer*4     Nexp        ! Number of exposures
      integer*4     Lambdamin   ! (0.1nm) Spectral coverage, lower value
      integer*4     Lambdamax   ! (0.1nm) Spectral coverage, upper value

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

C  Declarations for 'table3.dat'	! Strong absorption lines (W_lambda_>0.02{AA})

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

      real*8        Lambda      ! (0.1nm) Wavelength
      character*1   u_Lambda    ! Uncertainty flag on Lambda
      real*4        Rest1       ! (0.1nm) ? First rest wavelength
      real*4        Rest2       ! (0.1nm) ? Second rest wavelength
      real*4        Rest3       ! (0.1nm) ? Third rest wavelength
      real*4        HRV         ! (km/s) ?=- Heliocenttric radial velocity
      character*1   u_HRV       ! Uncertainty flag on HRV
      real*8        EW          ! (0.1nm) ?=- Equivalent width
      character*1   u_EW        ! Uncertainty flag on EW
      real*4        FWHM        ! (km/s) ?=- Line Full Width Half Maximum
*                                      (only in tables 3 and 5)
      character*1   u_FWHM      ! Uncertainty flag on FWHM
      character*23  Id          ! Line identification

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

C  Declarations for 'table4.dat'	! Weak absorption lines (W_lambda_<0.02{AA})

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

      real*8        Lambda_1    ! (0.1nm) Wavelength
      character*1   u_Lambda_1  ! Uncertainty flag on Lambda
      real*4        Rest1_1     ! (0.1nm) ? First rest wavelength
      real*4        Rest2_1     ! (0.1nm) ? Second rest wavelength
      real*4        Rest3_1     ! (0.1nm) ? Third rest wavelength
      real*4        HRV_1       ! (km/s) ?=- Heliocenttric radial velocity
      character*1   u_HRV_1     ! Uncertainty flag on HRV
      real*8        EW_1        ! (0.1nm) ?=- Equivalent width
      character*1   u_EW_1      ! Uncertainty flag on EW
      real*4        FWHM_1      ! (km/s) ?=- Line Full Width Half Maximum
*                                      (only in tables 3 and 5)
      character*1   u_FWHM_1    ! Uncertainty flag on FWHM
      character*23  Id_1        ! Line identification

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

C  Declarations for 'table5.dat'	! Emission lines

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

      real*8        Lambda_2    ! (0.1nm) Wavelength
      character*1   u_Lambda_2  ! Uncertainty flag on Lambda
      real*4        Rest1_2     ! (0.1nm) ? First rest wavelength
      real*4        Rest2_2     ! (0.1nm) ? Second rest wavelength
      real*4        Rest3_2     ! (0.1nm) ? Third rest wavelength
      real*4        HRV_2       ! (km/s) ?=- Heliocenttric radial velocity
      character*1   u_HRV_2     ! Uncertainty flag on HRV
      real*8        EW_2        ! (0.1nm) ?=- Equivalent width
      character*1   u_EW_2      ! Uncertainty flag on EW
      real*4        FWHM_2      ! (km/s) ?=- Line Full Width Half Maximum
*                                      (only in tables 3 and 5)
      character*1   u_FWHM_2    ! Uncertainty flag on FWHM
      character*23  Id_2        ! Line identification

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

C  Loading file 'table2.dat'	! Journal of observations

C  Format for file interpretation

    1 format(A10,2X,A9,3X,F3.1,2X,I2,2X,I2,3X,I4,1X,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,12
        read(1,'(A51)')ar__
        read(ar__,1)Date,Tel,Res,ExpTime,Nexp,Lambdamin,Lambdamax
c    ..............Just test output...........
        write(6,1)Date,Tel,Res,ExpTime,Nexp,Lambdamin,Lambdamax
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Strong absorption lines (W_lambda_>0.02{AA})

C  Format for file interpretation

    2 format(
     +  F7.2,A1,1X,F5.2,1X,F4.2,1X,F4.2,1X,F4.1,A1,2X,F7.4,A1,2X,F5.1,
     +  A1,2X,A23)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,63
        read(1,'(A73)')ar__1
        read(ar__1,2)
     +  Lambda,u_Lambda,Rest1,Rest2,Rest3,HRV,u_HRV,EW,u_EW,FWHM,
     +  u_FWHM,Id
        if(ar__1(10:14) .EQ. '') Rest1 = rNULL__
        if(ar__1(16:19) .EQ. '') Rest2 = rNULL__
        if(ar__1(21:24) .EQ. '') Rest3 = rNULL__
        if (idig(ar__1(26:29)).EQ.0) HRV =  rNULL__
        if (idig(ar__1(33:39)).EQ.0) EW =  rNULL__
        if (idig(ar__1(43:47)).EQ.0) FWHM =  rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Lambda,u_Lambda,Rest1,Rest2,Rest3,HRV,u_HRV,EW,u_EW,FWHM,
     +  u_FWHM,Id
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Weak absorption lines (W_lambda_<0.02{AA})

C  Format for file interpretation

    3 format(
     +  F7.2,A1,1X,F5.2,1X,F4.2,1X,F4.2,1X,F4.1,A1,2X,F7.4,A1,2X,F5.1,
     +  A1,2X,A23)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,27
        read(1,'(A73)')ar__2
        read(ar__2,3)
     +  Lambda_1,u_Lambda_1,Rest1_1,Rest2_1,Rest3_1,HRV_1,u_HRV_1,
     +  EW_1,u_EW_1,FWHM_1,u_FWHM_1,Id_1
        if(ar__2(10:14) .EQ. '') Rest1_1 = rNULL__
        if(ar__2(16:19) .EQ. '') Rest2_1 = rNULL__
        if(ar__2(21:24) .EQ. '') Rest3_1 = rNULL__
        if (idig(ar__2(26:29)).EQ.0) HRV_1 =  rNULL__
        if (idig(ar__2(33:39)).EQ.0) EW_1 =  rNULL__
        if (idig(ar__2(43:47)).EQ.0) FWHM_1 =  rNULL__
c    ..............Just test output...........
        write(6,3)
     +  Lambda_1,u_Lambda_1,Rest1_1,Rest2_1,Rest3_1,HRV_1,u_HRV_1,
     +  EW_1,u_EW_1,FWHM_1,u_FWHM_1,Id_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table5.dat'	! Emission lines

C  Format for file interpretation

    4 format(
     +  F7.2,A1,1X,F5.2,1X,F4.2,1X,F4.2,1X,F4.1,A1,2X,F7.4,A1,2X,F5.1,
     +  A1,2X,A23)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,114
        read(1,'(A73)')ar__3
        read(ar__3,4)
     +  Lambda_2,u_Lambda_2,Rest1_2,Rest2_2,Rest3_2,HRV_2,u_HRV_2,
     +  EW_2,u_EW_2,FWHM_2,u_FWHM_2,Id_2
        if(ar__3(10:14) .EQ. '') Rest1_2 = rNULL__
        if(ar__3(16:19) .EQ. '') Rest2_2 = rNULL__
        if(ar__3(21:24) .EQ. '') Rest3_2 = rNULL__
        if (idig(ar__3(26:29)).EQ.0) HRV_2 =  rNULL__
        if (idig(ar__3(33:39)).EQ.0) EW_2 =  rNULL__
        if (idig(ar__3(43:47)).EQ.0) FWHM_2 =  rNULL__
c    ..............Just test output...........
        write(6,4)
     +  Lambda_2,u_Lambda_2,Rest1_2,Rest2_2,Rest3_2,HRV_2,u_HRV_2,
     +  EW_2,u_EW_2,FWHM_2,u_FWHM_2,Id_2
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