FORTRAN Generation
(/./ftp/cats/J/A_A/531/A157)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/531/A157 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-14
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/531/A157    LMC planetary nebulae (VMC Survey II)      (Miszalski+, 2011)
*================================================================================
*The VMC survey.
*II. A multi-wavelength study of LMC planetary nebulae and their mimics.
*    Miszalski B., Napiwotzki R., Cioni M.-R.L., Groenewegen M.A.T.,
*    Oliveira J.M., Udalski A.
*   <Astron. Astrophys., 531, A157 (2011)>
*   =2011A&A...531A.157M
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table23.dat'	! Basic properties and classifications of the sample

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

C  J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg       ! (deg) Right Ascension J2000
      real*8        DEdeg       ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      character*6   Name        ! Source name
      integer*4     RP          ! ? RP number (Reid+Parker J/MNRAS/365/401 and
*                                  J/MNRAS/373/521, <[RP2006] NNNN> in Simbad)
      integer*4     RAh         ! (h) Right ascension (J2000)
      integer*4     RAm         ! (min) Right ascension (J2000)
      real*4        RAs         ! (s) Right ascension (J2000)
      character*1   DE_         ! Declination sign (J2000)
      integer*4     DEd         ! (deg) Declination (J2000)
      integer*4     DEm         ! (arcmin) Declination (J2000)
      real*4        DEs         ! (arcsec) Declination (J2000)
      character*3   Tile        ! Tile name
      character*1   WFI         ! [Y/N] WFI observation?
      character*1   n_WFI       ! [+] Note on WFI observation (1)
      character*8   Type        ! Type of object (G1)
      character*15  Prop        ! Properties (3)
      character*1   t1          ! [TLP] RP type, True/Likely/Possible PN
      character*29  Prop1       ! RP properties (4)
*Note (1): + when WFI observations listed in Table 4, while all others have
*     WFI observations taken from the ESO reduced data described in
*     Miszalski et al. (2011A&A...529A..77M).
*Note (3): Properties code as follows:
*   H = significant H{alpha} emission
*  WH = weak H{alpha} emission
*  DH = diffuse H{alpha} emission
*   R = resolved nebula
*   S = stellar/unresolved
*   B = close to bright star
*   U = unusual morphology atypical of PNe
*Note (4): Abbreviations used:
*   b = bright
*   c = circular
*   e = elliptical
*   f = faint
*   s = small
*   p = point source
*  irreg = irregular
*  ds = double star
*  bp = bipolar. See Reid & Parker, 2006, Cat. J/MNRAS/373/521

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

C  Declarations for 'tablea1.dat'	! Optical magnitudes from Zaritsky et al.
                              (2004AJ....128.1606Z)

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

      character*6   Name_1      ! Source name
      character*8   Type_1      ! Type of object (G1)
      character*2   Status      ! [NC ND] Status: NC = no survey coverage,
*                                                  ND = non-detection
      real*4        Umag        ! (mag) ?=- Johnson U magnitude
      real*4        e_Umag      ! (mag) ?=- rms uncertainty on Umag
      real*4        Bmag        ! (mag) ?=- Johnson B magnitude
      real*4        e_Bmag      ! (mag) ?=- rms uncertainty on Bmag
      real*4        Vmag        ! (mag) ?=- Johnson V magnitude
      character*1   n_Vmag      ! [*] value from Soszynski 2009 (2)
      real*4        e_Vmag      ! (mag) ?=- rms uncertainty on Vmag
      real*4        imag        ! (mag) ?=- Gunn i magnitude
      character*1   n_imag      ! [*] value from Soszynski 2009 (2)
      real*4        e_imag      ! (mag) ?=- rms uncertainty on imag
      real*4        U_B         ! (mag) ?=- Johnson U-B colour index
      real*4        B_V         ! (mag) ?=- Johnson B-V colour index
      real*4        V_i         ! (mag) ?=- Johnson-Gunn V-i colour index
*Note (2): * when replaced with mean values from Soszynski et al.
*     (2009, Cat. J/AcA/59/239).

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

C  Declarations for 'tablea2.dat'	! VMC magnitudes (VISTA Magellanic Cloud survey)

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

      character*6   Name_2      ! Source Name
      character*8   Type_2      ! Type of object (G1)
      integer*4     Class       ! [-2/1]? Classification (unspecified)
      character*15  Aper        ! Aperture
      real*4        Ymag        ! (mag) ? Y (1um) magnitude
      real*4        e_Ymag      ! (mag) ? rms uncertainty on Ymag
      real*4        Jmag        ! (mag) ? Johnson J magnitude
      real*4        e_Jmag      ! (mag) ? rms uncertainty on Jmag
      real*4        Ksmag       ! (mag) ? Ks magnitude
      real*4        e_Ksmag     ! (mag) ? rms uncertainty on Ksmag
      real*4        J_Ks        ! (mag) ? J-Ks colour index
      real*4        Y_J         ! (mag) ? Y-J colour index

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

C  Declarations for 'tablea3.dat'	! SAGE MIR magnitudes

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

      character*6   Name_3      ! Source Name
      character*8   Type_3      ! Type of object (G1)
      character*3   IRAC        ! [AP CAT EX NC ND] Code for photometry (5)
      character*4   MIPS        ! [AP CAT EXTD NC ND?] Code for photometry (5)
      real*4        J_Ks_1      ! (mag) ?=- Johnson J-Ks colour index
      real*4        v_3_6_      ! (mag) ?=- Spitzer/IRAC 3.6um magnitude
      real*4        e__3_6_     ! (mag) ?=- rms uncertainty on [3.6]
      real*4        v_4_5_      ! (mag) ?=- Spitzer/IRAC 4.5um magnitude
      real*4        e__4_5_     ! (mag) ?=- rms uncertainty on [4.5]
      real*4        v_5_8_      ! (mag) ?=- Spitzer/IRAC 5.8um magnitude
      real*4        e__5_8_     ! (mag) ?=- rms uncertainty on [5.8]
      real*4        v_8_0_      ! (mag) ?=- Spitzer/IRAC 8.0um magnitude
      real*4        e__8_0_     ! (mag) ?=- rms uncertainty on [8.0]
      real*4        v_24_       ! (mag) ?=- Spitzer/MIPS 24um magnitude
      real*4        e__24_      ! (mag) ?=- rms uncertainty on [24]
*Note (5): Code for photometry as follows;
*     AP = measured photometry, with assigned 1{sigma} errors of
*          0.25, 0.25, 0.30, 0.35 and 0.40mag in 3.6, 4.5, 5.8, 8.0 and
*          24.0um bands, respectively
*     CAT = catalogue photometry
*     EX, EXTD = extended (no values)
*     NC = no survey coverage
*     ND = non-detection

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

C  Loading file 'table23.dat'	! Basic properties and classifications of the sample

C  Format for file interpretation

    1 format(
     +  A6,1X,I4,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,A3,1X,
     +  A1,A1,1X,A8,1X,A15,1X,A1,1X,A29)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table23.dat')
      write(6,*) '....Loading file: table23.dat'
      do i__=1,102
        read(1,'(A99)')ar__
        read(ar__,1)
     +  Name,RP,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Tile,WFI,n_WFI,Type,Prop,
     +  t1,Prop1
        if(ar__(8:11) .EQ. '') RP = iNULL__
        RAdeg = rNULL__
        DEdeg = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh .GT. -180) RAdeg=RAh*15.
        if(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
        if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  Name,RP,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Tile,WFI,n_WFI,Type,Prop,
     +  t1,Prop1
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablea1.dat'	! Optical magnitudes from Zaritsky et al.
*                              (2004AJ....128.1606Z)

C  Format for file interpretation

    2 format(
     +  A6,1X,A8,1X,A2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,A1,1X,
     +  F4.2,1X,F5.2,A1,1X,F4.2,1X,F5.2,1X,F5.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea1.dat')
      write(6,*) '....Loading file: tablea1.dat'
      do i__=1,102
        read(1,'(A82)')ar__1
        read(ar__1,2)
     +  Name_1,Type_1,Status,Umag,e_Umag,Bmag,e_Bmag,Vmag,n_Vmag,
     +  e_Vmag,imag,n_imag,e_imag,U_B,B_V,V_i
        if (idig(ar__1(20:24)).EQ.0) Umag =  rNULL__
        if (idig(ar__1(26:29)).EQ.0) e_Umag =  rNULL__
        if (idig(ar__1(31:35)).EQ.0) Bmag =  rNULL__
        if (idig(ar__1(37:40)).EQ.0) e_Bmag =  rNULL__
        if (idig(ar__1(42:46)).EQ.0) Vmag =  rNULL__
        if (idig(ar__1(49:52)).EQ.0) e_Vmag =  rNULL__
        if (idig(ar__1(54:58)).EQ.0) imag =  rNULL__
        if (idig(ar__1(61:64)).EQ.0) e_imag =  rNULL__
        if (idig(ar__1(66:70)).EQ.0) U_B =  rNULL__
        if (idig(ar__1(72:76)).EQ.0) B_V =  rNULL__
        if (idig(ar__1(78:82)).EQ.0) V_i =  rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Name_1,Type_1,Status,Umag,e_Umag,Bmag,e_Bmag,Vmag,n_Vmag,
     +  e_Vmag,imag,n_imag,e_imag,U_B,B_V,V_i
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablea2.dat'	! VMC magnitudes (VISTA Magellanic Cloud survey)

C  Format for file interpretation

    3 format(
     +  A6,2X,A8,1X,I2,1X,A15,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,
     +  1X,F4.2,1X,F5.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea2.dat')
      write(6,*) '....Loading file: tablea2.dat'
      do i__=1,102
        read(1,'(A80)')ar__2
        read(ar__2,3)
     +  Name_2,Type_2,Class,Aper,Ymag,e_Ymag,Jmag,e_Jmag,Ksmag,
     +  e_Ksmag,J_Ks,Y_J
        if(ar__2(18:19) .EQ. '') Class = iNULL__
        if(ar__2(37:41) .EQ. '') Ymag = rNULL__
        if(ar__2(43:46) .EQ. '') e_Ymag = rNULL__
        if(ar__2(48:52) .EQ. '') Jmag = rNULL__
        if(ar__2(54:57) .EQ. '') e_Jmag = rNULL__
        if(ar__2(59:63) .EQ. '') Ksmag = rNULL__
        if(ar__2(65:68) .EQ. '') e_Ksmag = rNULL__
        if(ar__2(70:74) .EQ. '') J_Ks = rNULL__
        if(ar__2(76:80) .EQ. '') Y_J = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  Name_2,Type_2,Class,Aper,Ymag,e_Ymag,Jmag,e_Jmag,Ksmag,
     +  e_Ksmag,J_Ks,Y_J
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'tablea3.dat'	! SAGE MIR magnitudes

C  Format for file interpretation

    4 format(
     +  A6,2X,A8,1X,A3,1X,A4,1X,F5.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,F5.2,1X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea3.dat')
      write(6,*) '....Loading file: tablea3.dat'
      do i__=1,102
        read(1,'(A86)')ar__3
        read(ar__3,4)
     +  Name_3,Type_3,IRAC,MIPS,J_Ks_1,v_3_6_,e__3_6_,v_4_5_,e__4_5_,
     +  v_5_8_,e__5_8_,v_8_0_,e__8_0_,v_24_,e__24_
        if (idig(ar__3(27:31)).EQ.0) J_Ks_1 =  rNULL__
        if (idig(ar__3(33:37)).EQ.0) v_3_6_ =  rNULL__
        if (idig(ar__3(39:42)).EQ.0) e__3_6_ =  rNULL__
        if (idig(ar__3(44:48)).EQ.0) v_4_5_ =  rNULL__
        if (idig(ar__3(50:53)).EQ.0) e__4_5_ =  rNULL__
        if (idig(ar__3(55:59)).EQ.0) v_5_8_ =  rNULL__
        if (idig(ar__3(61:64)).EQ.0) e__5_8_ =  rNULL__
        if (idig(ar__3(66:70)).EQ.0) v_8_0_ =  rNULL__
        if (idig(ar__3(72:75)).EQ.0) e__8_0_ =  rNULL__
        if (idig(ar__3(77:81)).EQ.0) v_24_ =  rNULL__
        if (idig(ar__3(83:86)).EQ.0) e__24_ =  rNULL__
c    ..............Just test output...........
        write(6,4)
     +  Name_3,Type_3,IRAC,MIPS,J_Ks_1,v_3_6_,e__3_6_,v_4_5_,e__4_5_,
     +  v_5_8_,e__5_8_,v_8_0_,e__8_0_,v_24_,e__24_
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