FORTRAN Generation
(/./ftp/cats/J/A_A/627/A161)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/627/A161 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-May-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/627/A161   CARMENES stars multi wavelength measurements (Passegger+, 2019)
*================================================================================
*The CARMENES search for exoplanets around M dwarfs. Photospheric parameters of
*target stars from high-resolution spectroscopy.
*II. Simultaneous multi wavelength range modeling of activity insensitive lines.
*    Passegger V.M., Schweitzer A., Shulyak D., Nagel E., Hauschildt P.H.,
*    Reiners A., Amado P.J., Caballero J.A., Cortes-Contreras M.,
*    Dominguez-Fernandez A.J., Quirrenbach A., Ribas I., Azarro M.,
*    Anglada-Escude G., Bauer F.F., Bejar V.J.S., Dreizler S., Guenther E.W.,
*    Henning T., Jeffers S.V., Kaminski A., Kuerster M., Lafarga M., Martin E.L.,
*    Montes D., Morales J.C., Schmidt J.H.M.M., Zechmeister M.
*    <Astron. Astrophys. 627, A161 (2019)>
*    =2019A&A...627A.161P        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'tableb1.dat'	! Basic information of investigated M dwarfs

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

C  Position composed of: RAh RAm RAs DE- DEd DEm DEs (Epoch=2016)
      character*11  Karmn       ! Carmencita identifier (JHHMMm+DDMMA)
      character*21  Name        ! Star name
      character*6   GJ          ! ?=0 GJ number
      integer*4     RAh         ! (h) Right Ascension (ICRS, Ep=2016)
      integer*4     RAm         ! (min) Right Ascension (ICRS, Ep=2016)
      real*4        RAs         ! (s) Right Ascension (ICRS, Ep=2016)
      character*1   DE_         ! Declination sign (ICRS, Ep=2016)
      integer*4     DEd         ! (deg) Declination (ICRS, Ep=2016)
      integer*4     DEm         ! (arcmin) Declination (ICRS, Ep=2016)
      real*4        DEs         ! (arcsec) Declination (ICRS, Ep=2016)
      character*5   SpType      ! MK spectral type
      character*1   l_vsini     ! Upper limit flag for rotational velocity
      real*4        vsini       ! (km/s) Rotational velocity
      real*4        Age         ! (Gyr) Assumed age
      integer*4     factive     ! [0/1] Flag for Activity; 1 if active

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

C  Declarations for 'tableb2.dat'	! Basic astrophysical parameters of investigated
                                 M dwarfs in multiple wavelength ranges
                                 (corrected version)

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

      character*11  Karmn_1     ! Carmencita identifier (JHHMMm+DDMMA)
      integer*4     TeffVN      ! (K) ? Effective temperature in VIS+NIR
      integer*4     e_TeffVN    ! (K) ? Error in effective temperature in VIS+NIR
      real*4        loggVN      ! ([cm/s2]) ? Surface gravity in VIS+NIR
      real*4        e_loggVN    ! ([cm/s2]) ? Error in surface gravity in VIS+NIR
      real*4        v_Fe_H_VN   ! ([-]) ? Metallicity in VIS+NIR
      real*4        e__Fe_H_VN  ! ([-]) ? Error in metallicity in VIS+NIR
      integer*4     TeffN       ! (K) ? Effective temperature in NIR
      integer*4     e_TeffN     ! (K) ? Error in effective temperature in NIR
      real*4        loggN       ! ([cm/s2]) ? Surface gravity in NIR
      real*4        e_loggN     ! ([cm/s2]) ? Error in surface gravity in NIR
      real*4        v_Fe_H_N    ! ([-]) ? Metallicity in NIR
      real*4        e__Fe_H_N   ! ([-]) ? Error in metallicity in NIR
      integer*4     TeffV       ! (K) ? Effective temperature in VIS
      integer*4     e_TeffV     ! (K) ? Error in effective temperature in VIS
      real*4        loggV       ! ([cm/s2]) ? Surface gravity in VIS
      real*4        e_loggV     ! ([cm/s2]) ? Error in surface gravity in VIS
      real*4        v_Fe_H_V    ! ([-]) ? Metallicity in VIS
      real*4        e__Fe_H_V   ! ([-]) ? Error in metallicity in VIS

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

C  Loading file 'tableb1.dat'	! Basic information of investigated M dwarfs

C  Format for file interpretation

    1 format(
     +  A11,2X,A21,1X,A6,3X,I2,1X,I2,1X,F5.2,3X,A1,I2,1X,I2,1X,F4.1,
     +  3X,A5,2X,A1,F4.1,2X,F4.2,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tableb1.dat')
      write(6,*) '....Loading file: tableb1.dat'
      do i__=1,282
        read(1,'(A92)')ar__
        read(ar__,1)
     +  Karmn,Name,GJ,RAh,RAm,RAs,DE_,DEd,DEm,DEs,SpType,l_vsini,
     +  vsini,Age,factive
c    ..............Just test output...........
        write(6,1)
     +  Karmn,Name,GJ,RAh,RAm,RAs,DE_,DEd,DEm,DEs,SpType,l_vsini,
     +  vsini,Age,factive
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tableb2.dat'	! Basic astrophysical parameters of investigated
*                                 M dwarfs in multiple wavelength ranges
*                                 (corrected version)

C  Format for file interpretation

    2 format(
     +  A11,2X,I4,2X,I3,3X,F4.2,3X,F4.2,3X,F5.2,3X,F4.2,3X,I4,2X,I3,
     +  3X,F4.2,3X,F4.2,3X,F5.2,3X,F4.2,3X,I4,2X,I3,3X,F4.2,3X,F4.2,
     +  3X,F5.2,3X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tableb2.dat')
      write(6,*) '....Loading file: tableb2.dat'
      do i__=1,282
        read(1,'(A133)')ar__1
        read(ar__1,2)
     +  Karmn_1,TeffVN,e_TeffVN,loggVN,e_loggVN,v_Fe_H_VN,e__Fe_H_VN,
     +  TeffN,e_TeffN,loggN,e_loggN,v_Fe_H_N,e__Fe_H_N,TeffV,e_TeffV,
     +  loggV,e_loggV,v_Fe_H_V,e__Fe_H_V
        if(ar__1(14:17) .EQ. '') TeffVN = iNULL__
        if(ar__1(20:22) .EQ. '') e_TeffVN = iNULL__
        if(ar__1(26:29) .EQ. '') loggVN = rNULL__
        if(ar__1(33:36) .EQ. '') e_loggVN = rNULL__
        if(ar__1(40:44) .EQ. '') v_Fe_H_VN = rNULL__
        if(ar__1(48:51) .EQ. '') e__Fe_H_VN = rNULL__
        if(ar__1(55:58) .EQ. '') TeffN = iNULL__
        if(ar__1(61:63) .EQ. '') e_TeffN = iNULL__
        if(ar__1(67:70) .EQ. '') loggN = rNULL__
        if(ar__1(74:77) .EQ. '') e_loggN = rNULL__
        if(ar__1(81:85) .EQ. '') v_Fe_H_N = rNULL__
        if(ar__1(89:92) .EQ. '') e__Fe_H_N = rNULL__
        if(ar__1(96:99) .EQ. '') TeffV = iNULL__
        if(ar__1(102:104) .EQ. '') e_TeffV = iNULL__
        if(ar__1(108:111) .EQ. '') loggV = rNULL__
        if(ar__1(115:118) .EQ. '') e_loggV = rNULL__
        if(ar__1(122:126) .EQ. '') v_Fe_H_V = rNULL__
        if(ar__1(130:133) .EQ. '') e__Fe_H_V = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Karmn_1,TeffVN,e_TeffVN,loggVN,e_loggVN,v_Fe_H_VN,e__Fe_H_VN,
     +  TeffN,e_TeffN,loggN,e_loggN,v_Fe_H_N,e__Fe_H_N,TeffV,e_TeffV,
     +  loggV,e_loggV,v_Fe_H_V,e__Fe_H_V
c    .......End.of.Just test output...........
      end do
      close(1)

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