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 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 2026-Oct-06
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      (nr__) ! (deg) Right Ascension (J2000.0) (1)
      real*8        DEdeg      (nr__) ! (deg) Declination (J2000.0) (1)
      real*4        E_B_V_S11  (nr__) ! (mag) Color excess (2)
      real*4        umag       (nr__) ! (mag) Dereddened S-PLUS AB u magnitude
      real*4        e_umag     (nr__) ! (mag) Uncertainty in u magnitude (1)
      real*4        F378mag    (nr__) ! (mag) Dereddened S-PLUS AB F378 magnitude
      real*4        e_F378mag  (nr__) ! (mag) Uncertainty in F378 magnitude (1)
      real*4        F395mag    (nr__) ! (mag) Dereddened S-PLUS AB F395 magnitude
      real*4        e_F395mag  (nr__) ! (mag) Uncertainty in F395 magnitude (1)
      real*4        F410mag    (nr__) ! (mag) Dereddened S-PLUS AB F410 magnitude
      real*4        e_F410mag  (nr__) ! (mag) Uncertainty in F410 magnitude (1)
      real*4        F430mag    (nr__) ! (mag) Dereddened S-PLUS AB F430 magnitude
      real*4        e_F430mag  (nr__) ! (mag) Uncertainty in F430 magnitude (1)
      real*4        gmag       (nr__) ! (mag) Dereddened S-PLUS AB g magnitude
      real*4        e_gmag     (nr__) ! (mag) Uncertainty in g magnitude (1)
      real*4        F515mag    (nr__) ! (mag) Dereddened S-PLUS AB F515 magnitude
      real*4        e_F515mag  (nr__) ! (mag) Uncertainty in F515 magnitude (1)
      real*4        rmag       (nr__) ! (mag) Dereddened S-PLUS AB r magnitude
      real*4        e_rmag     (nr__) ! (mag) Uncertainty in r magnitude (1)
      real*4        F660mag    (nr__) ! (mag) Dereddened S-PLUS AB F660 magnitude
      real*4        e_F660mag  (nr__) ! (mag) Uncertainty in F660 magnitude (1)
      real*4        imag       (nr__) ! (mag) Dereddened S-PLUS AB i magnitude
      real*4        e_imag     (nr__) ! (mag) Uncertainty in i magnitude (1)
      real*4        F861mag    (nr__) ! (mag) Dereddened S-PLUS AB F861 magnitude
      real*4        e_F861mag  (nr__) ! (mag) Uncertainty in F861 magnitude (1)
      real*4        zmag       (nr__) ! (mag) Dereddened S-PLUS AB z magnitude
      real*4        e_zmag     (nr__) ! (mag) Uncertainty in z magnitude (1)
      real*4        F378_u     (nr__) ! (mag) Dereddened colour index in F378-u
      real*4        F395_g     (nr__) ! (mag) Dereddened colour index in F395-g
      real*4        F410_g     (nr__) ! (mag) Dereddened colour index in F410-g
      real*4        F430_g     (nr__) ! (mag) Dereddened colour index in F430-g
      real*4        F515_g     (nr__) ! (mag) Dereddened colour index in F515-g
      real*4        F660_r     (nr__) ! (mag) Dereddened colour index in F660-r
      real*4        F861_z     (nr__) ! (mag) Dereddened colour index in F861-z
      real*4        u_g        (nr__) ! (mag) Dereddened colour index in u-g
      real*4        u_r        (nr__) ! (mag) Dereddened colour index in u-r
      real*4        u_i        (nr__) ! (mag) Dereddened colour index in u-i
      real*4        u_z        (nr__) ! (mag) Dereddened colour index in u-z
      real*4        g_r        (nr__) ! (mag) Dereddened colour index in g-r
      real*4        g_i        (nr__) ! (mag) Dereddened colour index in g-i
      real*4        g_z        (nr__) ! (mag) Dereddened colour index in g-z
      real*4        r_i        (nr__) ! (mag) Dereddened colour index in r-i
      real*4        r_z        (nr__) ! (mag) Dereddened colour index in r-z
      real*4        i_z        (nr__) ! (mag) Dereddened colour index in i-z
      real*4        Pgiant     (nr__) ! Probability that star is a giant from
*                                   Neural Network classifier
      real*4        v_M_H_     (nr__) ! ([-]) 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(i__),DEdeg(i__),E_B_V_S11(i__),umag(i__),e_umag(i__),
     +  F378mag(i__),e_F378mag(i__),F395mag(i__),e_F395mag(i__),
     +  F410mag(i__),e_F410mag(i__),F430mag(i__),e_F430mag(i__),
     +  gmag(i__),e_gmag(i__),F515mag(i__),e_F515mag(i__),rmag(i__),
     +  e_rmag(i__),F660mag(i__),e_F660mag(i__),imag(i__),e_imag(i__),
     +  F861mag(i__),e_F861mag(i__),zmag(i__),e_zmag(i__),F378_u(i__),
     +  F395_g(i__),F410_g(i__),F430_g(i__),F515_g(i__),F660_r(i__),
     +  F861_z(i__),u_g(i__),u_r(i__),u_i(i__),u_z(i__),g_r(i__),
     +  g_i(i__),g_z(i__),r_i(i__),r_z(i__),i_z(i__),Pgiant(i__),
     +  v_M_H_(i__)
c    ..............Just test output...........
        write(6,1)
     +  RAdeg(i__),DEdeg(i__),E_B_V_S11(i__),umag(i__),e_umag(i__),
     +  F378mag(i__),e_F378mag(i__),F395mag(i__),e_F395mag(i__),
     +  F410mag(i__),e_F410mag(i__),F430mag(i__),e_F430mag(i__),
     +  gmag(i__),e_gmag(i__),F515mag(i__),e_F515mag(i__),rmag(i__),
     +  e_rmag(i__),F660mag(i__),e_F660mag(i__),imag(i__),e_imag(i__),
     +  F861mag(i__),e_F861mag(i__),zmag(i__),e_zmag(i__),F378_u(i__),
     +  F395_g(i__),F410_g(i__),F430_g(i__),F515_g(i__),F660_r(i__),
     +  F861_z(i__),u_g(i__),u_r(i__),u_i(i__),u_z(i__),g_r(i__),
     +  g_i(i__),g_z(i__),r_i(i__),r_z(i__),i_z(i__),Pgiant(i__),
     +  v_M_H_(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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