FORTRAN Generation
(/./ftp/cats/J/A_A/691/A144)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/691/A144 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-05
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/691/A144    Metallicities of red giants in S-PLUS (Molina-Jorquera+, 2024)
*================================================================================
*Determination of metallicities of red giant stars using machine learning
*techniques applied to the narrow and broadband photometry of the S-PLUS survey.
*    Molina-Jorquera F., Damke G., Fernandez-Olivares D., Jaque-Arancibia M.,
*    Almeida-Fernandes F., Daflon S., Schoenell W., Ribeiro T., Kanaan A.,
*    Torres-Flores S., Mendes de Oliveira C.
*    <Astron. Astrophys. 691, A144 (2024)>
*    =2024A&A...691A.144M        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'catalog.dat'	! Source catalog with derived metallicities

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

C  J2000.0 position composed of: RAdeg DEdeg
      real*8        RAdeg       ! (deg) Right Ascension (J2000.0) (1)
      real*8        DEdeg       ! (deg) Declination (J2000.0) (1)
      real*4        E_B_V_S11   ! (mag) Color excess (2)
      real*4        umag        ! (mag) Dereddened S-PLUS AB u magnitude
      real*4        e_umag      ! (mag) Uncertainty in u magnitude (1)
      real*4        F378mag     ! (mag) Dereddened S-PLUS AB F378 magnitude
      real*4        e_F378mag   ! (mag) Uncertainty in F378 magnitude (1)
      real*4        F395mag     ! (mag) Dereddened S-PLUS AB F395 magnitude
      real*4        e_F395mag   ! (mag) Uncertainty in F395 magnitude (1)
      real*4        F410mag     ! (mag) Dereddened S-PLUS AB F410 magnitude
      real*4        e_F410mag   ! (mag) Uncertainty in F410 magnitude (1)
      real*4        F430mag     ! (mag) Dereddened S-PLUS AB F430 magnitude
      real*4        e_F430mag   ! (mag) Uncertainty in F430 magnitude (1)
      real*4        gmag        ! (mag) Dereddened S-PLUS AB g magnitude
      real*4        e_gmag      ! (mag) Uncertainty in g magnitude (1)
      real*4        F515mag     ! (mag) Dereddened S-PLUS AB F515 magnitude
      real*4        e_F515mag   ! (mag) Uncertainty in F515 magnitude (1)
      real*4        rmag        ! (mag) Dereddened S-PLUS AB r magnitude
      real*4        e_rmag      ! (mag) Uncertainty in r magnitude (1)
      real*4        F660mag     ! (mag) Dereddened S-PLUS AB F660 magnitude
      real*4        e_F660mag   ! (mag) Uncertainty in F660 magnitude (1)
      real*4        imag        ! (mag) Dereddened S-PLUS AB i magnitude
      real*4        e_imag      ! (mag) Uncertainty in i magnitude (1)
      real*4        F861mag     ! (mag) Dereddened S-PLUS AB F861 magnitude
      real*4        e_F861mag   ! (mag) Uncertainty in F861 magnitude (1)
      real*4        zmag        ! (mag) Dereddened S-PLUS AB z magnitude
      real*4        e_zmag      ! (mag) Uncertainty in z magnitude (1)
      real*4        F378_u      ! (mag) Dereddened colour index in F378-u
      real*4        F395_g      ! (mag) Dereddened colour index in F395-g
      real*4        F410_g      ! (mag) Dereddened colour index in F410-g
      real*4        F430_g      ! (mag) Dereddened colour index in F430-g
      real*4        F515_g      ! (mag) Dereddened colour index in F515-g
      real*4        F660_r      ! (mag) Dereddened colour index in F660-r
      real*4        F861_z      ! (mag) Dereddened colour index in F861-z
      real*4        u_g         ! (mag) Dereddened colour index in u-g
      real*4        u_r         ! (mag) Dereddened colour index in u-r
      real*4        u_i         ! (mag) Dereddened colour index in u-i
      real*4        u_z         ! (mag) Dereddened colour index in u-z
      real*4        g_r         ! (mag) Dereddened colour index in g-r
      real*4        g_i         ! (mag) Dereddened colour index in g-i
      real*4        g_z         ! (mag) Dereddened colour index in g-z
      real*4        r_i         ! (mag) Dereddened colour index in r-i
      real*4        r_z         ! (mag) Dereddened colour index in r-z
      real*4        i_z         ! (mag) Dereddened colour index in i-z
      real*4        Pgiant      ! Probability that star is a giant from
*                                   Neural Network classifier
      real*4        v_M_H_      ! ([-]) Value of [M/H] derived by
*                                   Neural Network regressor
*Note (1): Value adopted from Mendes de Oliveira et al. (2019MNRAS.489..241M)
*     S-PLUS Data Release 3.
*Note (2): Color excess value adopted from Schlafly & Finkbeiner
*     (2011ApJ...737..103S).

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

C  Loading file 'catalog.dat'	! Source catalog with derived metallicities

C  Format for file interpretation

    1 format(
     +  F8.4,1X,F8.4,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,
     +  1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,
     +  F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,
     +  1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F5.3,1X,
     +  F5.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F5.3,1X,F5.3,1X,F5.3,1X,F5.3,
     +  1X,F6.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F5.3,1X,F5.3,1X,
     +  F6.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'catalog.dat')
      write(6,*) '....Loading file: catalog.dat'
      do i__=1,51865
        read(1,'(A301)')ar__
        read(ar__,1)
     +  RAdeg,DEdeg,E_B_V_S11,umag,e_umag,F378mag,e_F378mag,F395mag,
     +  e_F395mag,F410mag,e_F410mag,F430mag,e_F430mag,gmag,e_gmag,
     +  F515mag,e_F515mag,rmag,e_rmag,F660mag,e_F660mag,imag,e_imag,
     +  F861mag,e_F861mag,zmag,e_zmag,F378_u,F395_g,F410_g,F430_g,
     +  F515_g,F660_r,F861_z,u_g,u_r,u_i,u_z,g_r,g_i,g_z,r_i,r_z,i_z,
     +  Pgiant,v_M_H_
c    ..............Just test output...........
        write(6,1)
     +  RAdeg,DEdeg,E_B_V_S11,umag,e_umag,F378mag,e_F378mag,F395mag,
     +  e_F395mag,F410mag,e_F410mag,F430mag,e_F430mag,gmag,e_gmag,
     +  F515mag,e_F515mag,rmag,e_rmag,F660mag,e_F660mag,imag,e_imag,
     +  F861mag,e_F861mag,zmag,e_zmag,F378_u,F395_g,F410_g,F430_g,
     +  F515_g,F660_r,F861_z,u_g,u_r,u_i,u_z,g_r,g_i,g_z,r_i,r_z,i_z,
     +  Pgiant,v_M_H_
c    .......End.of.Just test output...........
      end do
      close(1)

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