FORTRAN Generation
(/./ftp/cats/J/ApJ/847/16)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/847/16 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/ApJ/847/16 NLTE spectroscopy. II. Galactic metal-poor stars (Bergemann+, 2017)
*================================================================================
*Non-local thermodynamic equilibrium stellar spectroscopy with 1D and <3D>
*models.
*II. Chemical properties of the Galactic metal-poor disk and the halo.
*    Bergemann M., Collet R., Schonrich R., Andrae R., Kovalev M., Ruchti G.,
*    Hansen C.J., Magic Z.
*   <Astrophys. J., 847, 16 (2017)>
*   =2017ApJ...847...16B
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! *Stellar parameters and derived Mg abundances for
                               the stellar sample

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

      character*21  Name       (nr__) ! Simbad data-base identifier
      integer*4     Teff1      (nr__) ! (K) [4004/6531] LTE-Fe effective temperature
      real*4        log_g_1    (nr__) ! ([cm/s2]) [0.5/4.4] LTE-Fe surface gravity
      real*4        v_Fe_H_1   (nr__) ! ([Sun]) [-3.2/-0.3] LTE-Fe metallicity
      real*4        V1         (nr__) ! (km/s) [0.5/3] LTE-Fe microturbulence
      integer*4     Teff2      (nr__) ! (K) [4043/6519] NLTE-Opt effective temperature
      real*4        log_g_2    (nr__) ! ([cm/s2]) [0.5/4.6] NLTE-Opt surface gravity
      real*4        v_Fe_H_2   (nr__) ! ([Sun]) [-2.8/-0.4] NLTE-Opt metallicity
      real*4        V2         (nr__) ! (km/s) [0.5/3.3] NLTE-Opt microturbulence
      real*4        v_Mg_1     (nr__) ! ([Sun]) [-0.03/0.7]? Log Mg/Fe abundance ratio:
*                                    1D LTE
      real*4        e__Mg_1    (nr__) ! ([Sun]) [0.1/0.3]? Uncertainty in [Mg]1
      real*4        v_Mg_2     (nr__) ! ([Sun]) [-0.02/0.7]? Log Mg/Fe abundance ratio:
*                                    NLTE-opt & LTE Mg
      real*4        e__Mg_2    (nr__) ! ([Sun]) [0.1/0.3]? Uncertainty in [Mg]2
      real*4        v_Mg_3     (nr__) ! ([Sun]) [-0.04/0.6]? Log Mg/Fe abundance ratio:
*                                    NLTE-opt & NLTE Mg
      real*4        e__Mg_3    (nr__) ! ([Sun]) [0.1/0.3]? Uncertainty in [Mg]3
      real*4        v_Mg_4     (nr__) ! ([Sun]) [0.02/0.6]? Log Mg/Fe abundance ratio:
*                                    NLTE-opt & <3D> NLTE Mg
      real*4        e__Mg_4    (nr__) ! ([Sun]) [0.1/0.3]? Uncertainty in [Mg]4
      integer*4     Flag       (nr__) ! [0/2]? Number of measured Mg I lines (1)
      real*4        Pop        (nr__) ! [1/3] Galactic population assignment
*Note (1): Flag as follow:
*    0 = none;
*    1 = 552.8nm;
*    2 = 552.8 and 571.1nm.

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

C  Declarations for 'table3.dat'	! Measurements of the equivalent widths of the
                               two MgI diagnostic

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

      character*21  Name_1     (nr__1) ! Simbad data-base identifier
      real*4        EW1        (nr__1) ! (10-13m) [41.9/267.1]? Equivalent width of the 552.8nm
*                              MgI line
      real*4        EW2        (nr__1) ! (10-13m) [2.3/143.5]? Equivalent width of the 571.1nm
*                              MgI line

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

C  Loading file 'table1.dat'	! *Stellar parameters and derived Mg abundances for
*                               the stellar sample

C  Format for file interpretation

    1 format(
     +  A21,1X,I4,1X,F4.2,1X,F5.2,1X,F4.2,1X,I4,1X,F4.2,1X,F5.2,1X,
     +  F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F4.2,
     +  1X,F4.2,1X,I1,1X,F3.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,319
        read(1,'(A112)')ar__
        read(ar__,1)
     +  Name(i__),Teff1(i__),log_g_1(i__),v_Fe_H_1(i__),V1(i__),
     +  Teff2(i__),log_g_2(i__),v_Fe_H_2(i__),V2(i__),v_Mg_1(i__),
     +  e__Mg_1(i__),v_Mg_2(i__),e__Mg_2(i__),v_Mg_3(i__),
     +  e__Mg_3(i__),v_Mg_4(i__),e__Mg_4(i__),Flag(i__),Pop(i__)
        if(ar__(65:69) .EQ. '') v_Mg_1(i__) = rNULL__
        if(ar__(71:74) .EQ. '') e__Mg_1(i__) = rNULL__
        if(ar__(76:80) .EQ. '') v_Mg_2(i__) = rNULL__
        if(ar__(82:85) .EQ. '') e__Mg_2(i__) = rNULL__
        if(ar__(87:91) .EQ. '') v_Mg_3(i__) = rNULL__
        if(ar__(93:96) .EQ. '') e__Mg_3(i__) = rNULL__
        if(ar__(98:101) .EQ. '') v_Mg_4(i__) = rNULL__
        if(ar__(103:106) .EQ. '') e__Mg_4(i__) = rNULL__
        if(ar__(108:108) .EQ. '') Flag(i__) = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  Name(i__),Teff1(i__),log_g_1(i__),v_Fe_H_1(i__),V1(i__),
     +  Teff2(i__),log_g_2(i__),v_Fe_H_2(i__),V2(i__),v_Mg_1(i__),
     +  e__Mg_1(i__),v_Mg_2(i__),e__Mg_2(i__),v_Mg_3(i__),
     +  e__Mg_3(i__),v_Mg_4(i__),e__Mg_4(i__),Flag(i__),Pop(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Measurements of the equivalent widths of the
*                               two MgI diagnostic

C  Format for file interpretation

    2 format(A21,1X,F6.2,1X,F6.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,319
        read(1,'(A35)')ar__1
        read(ar__1,2)Name_1(i__),EW1(i__),EW2(i__)
        if(ar__1(23:28) .EQ. '') EW1(i__) = rNULL__
        if(ar__1(30:35) .EQ. '') EW2(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)Name_1(i__),EW1(i__),EW2(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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