FORTRAN Generation
(/./ftp/cats/II/95)

Conversion of standardized ReadMe file for file /./ftp/cats/II/95 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-Apr-21
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. II/95       Stellar Component of the Galaxy, AFGL IR Survey (Grasdalen+ 1983)
*================================================================================
*The Stellar Component of the Galaxy as seen by the AFGL Infrared Sky Survey
*    Grasdalen G.L., Gehrz R.D., Hackwell J.A., Castelaz M., and Gullixson C.
*    <Astrophys. J. Suppl., 53, 413, (1983)>
*    =1983ApJS...53..413G
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'data.dat'	! Data

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

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

      integer*4     AFGL       (nr__) ! AFGL number
      character*6   IRC        (nr__) ! IRC (Cat. <II/2>) designation
      integer*4     HR         (nr__) ! ?=0 BS number = HR (Cat. <V/50>)
      character*9   BD         (nr__) ! BD designation
      character*10  ID         (nr__) ! Other Identification
      character*4   varType    (nr__) ! Type of Variable Star
      real*8        Period     (nr__) ! (d) ?=0.0000000 Period of variation
      character*3   Sp         (nr__) ! Spectral Type
      character*4   r_Sp       (nr__) ! *Source of spectral type
      integer*4     Lum        (nr__) ! *Luminosity class
      integer*4     RAh        (nr__) ! (h) RA hours (1950)
      integer*4     RAm        (nr__) ! (min) RA minutes (1950)
      real*4        RAs        (nr__) ! (s) RA seconds (1950)
      character*1   DE_        (nr__) ! Sign of declination
      integer*4     DEd        (nr__) ! (deg) Dec degrees (1950)
      integer*4     DEm        (nr__) ! (arcmin) Dec minutes (1950)
      real*4        DEs        (nr__) ! (arcsec) Dec seconds (1950)
      character*4   ref        (nr__) ! *Source of position
      character*1   rem        (nr__) ! [C] A note is detailed in file notes.dat
      character*3   class      (nr__) ! *Note on detection
      real*4        Vmag       (nr__) ! (mag) ?=0.00 Visual magnitude
      character*4   r_Vmag     (nr__) ! Source of mag (if any)
      real*4        Imag       (nr__) ! (mag) ?=0.00 IRC I' Magnitude
      real*4        Kmag       (nr__) ! (mag) ?=0.00 IRC k Magnitude
      real*4        mag4       (nr__) ! (mag) ?=99.0 AFGL mag at  4  microns
      real*4        mag11      (nr__) ! (mag) ?=99.0 AFGL mag at 11  microns
      real*4        mag20      (nr__) ! (mag) ?=0.0 AFGL mag at 20  microns
      real*4        mag27      (nr__) ! (mag) ?=0.0 AFGL mag at 27  microns
      character*6   obsDay     (nr__) ! ("DDMMYY") ? Day of WIRO observations
      real*4        mag2_3     (nr__) ! (mag) ?=99.99 WIRO magnitude at  2.3 microns
      real*4        mag3_6     (nr__) ! (mag) ?=99.99 WIRO magnitude at  3.6 microns
      real*4        mag4_9     (nr__) ! (mag) ?=99.99 WIRO magnitude at  4.9 microns
      real*4        mag8_7     (nr__) ! (mag) ?=99.99 WIRO magnitude at  8.7 microns
      real*4        mag10      (nr__) ! (mag) ?=99.99 WIRO magnitude at 10   microns
      real*4        mag11_4    (nr__) ! (mag) ?=99.99 WIRO magnitude at 11.4 microns
      real*4        mag12_6    (nr__) ! (mag) ?=99.99 WIRO magnitude at 12.6 microns
      real*4        mag19      (nr__) ! (mag) ?=99.99 WIRO magnitude at 19   microns
      real*4        mag23      (nr__) ! (mag) ?=99.99 WIRO magnitude at 23   microns
      character*3   Obs        (nr__) ! *WIRO observer
*Note on r_Sp, r_Vmag, ref:
*   AFGL = AFGL catalog (Cat. <II/94>)
*   AGK3 = Catalog der Astronomischen Gesellschaft (Cat. <I/61>)
*   BHR  = Baldwin, Harris & Ryle (1973)
*   CASE = Case surveys for late-type stars
*   CK1  = Cohen & Kuhi (1976PASP...88..535C)
*   CK2  = Cohen & Kuhi (1977PASP...89..829C)
*   DO   = Dearborn Catalog of Faint Red Stars (Cat. <II/68>)
*   G&H  = Gehrz & Hackwell (1976ApJ...206L.161G), including unpublished 
*          positions
*   GC   = Albany General Catalog (Cat. <I/113>)
*   GCVS = General Catalogue of Variable Stars (Cat. <II/214>)
*   GHB  = Gehrz, Hackwell & Briotta (1978ApJ...221L..23G)
*   GLG  = Grasdalen (1974ApJ...193..373G)
*   H&B  = Hansen & Blanco (1975AJ.....80.1011H)
*   H&L  = Harvey and Lada (1980ApJ...237...61H)
*   HBG  = Herbig (1956PASP...68..353H)
*   HGG  = Hackwell, Grasdalen & Gehrz (1982ApJ...252..250H)
*   HGSB = Hackwell et al. (1978ApJ...221..797H)
*   HR   = Yale Catalog of Bright Stars (see Cat. <V/50>)
*   IRC  = Infrared Catalog (Cat. <II/2>)
*   JYCE = Joyce et al. (1977ApJ...213L.125J)
*   KLMN = Kleinmann et al. (1979)
*   LADA = Lada et al. (1981ApJ...243..769L)
*   LKRL = Lebofsky et al. (1976)
*   LKVR = Low et al. (1976ApJ...206L.153L)
*   LSKR = Lebofsky et al. (1978ApJ...219..487L)
*   LWD  = Lockwood (1974ApJ...192..113L)
*   REID = Reid et al. (1980)
*   SAO  = Smithsonian Astrophysical Obs. Star Catalog (Cat. <I/131>)
*   SSJ  = Simon, Simon & Joyce (1979ApJ...230..127S)
*   SVS  = Catalog of Suspected Variable Stars
*   VOGT = Vogt (1973AJ.....78..389V)
*   WIRO = Positions determined at the WIRO
*   WWSJ = Wisniewski et al. 1967ApJ...148L..29W
*Note on Lum:
*     2  = Luminosity Class I and II
*     3  = Luminosity Class III
*     4  = Luminosity Class IV
*     5  = Luminosity Class V
*     6  = Luminosity Class c
*     7  = Luminosity Class g
*     8  = Luminosity Class d
*Note on class:
*   FMQ = Sources seen reliably only at 4microns
*   LL  = Sources seen reliably at 11, 20,or 27 microns
*   LST = Sources rejected from the WIRO survey
*Note on Obs:
*    GG  = Gary Grasdalen
*    JAH = John Hackwell
*    RDG = Robert D. Gehrz
*    BTA = Dan Briotta
*    G&H = Gehrz & Hackwell (1976, and additional unpublished data)

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

C  Declarations for 'notes.dat'	! Comments on individual sources (table 4)

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

      integer*4     AFGL_1     (nr__1) ! AFGL number
      character*73  text       (nr__1) ! Comment on individual source

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

C  Loading file 'data.dat'	! Data

C  Format for file interpretation

    1 format(
     +  I4,1X,A6,1X,I4,1X,A9,1X,A10,1X,A4,1X,F11.7,1X,A3,A4,1X,I1,1X,
     +  I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,A4,2X,A1,2X,A3,2X,
     +  F5.2,A4,1X,F5.2,1X,F5.2,2X,F4.1,2X,F4.1,2X,F4.1,2X,F4.1,1X,A6,
     +  1X,F5.2,F5.2,F5.2,F5.2,F5.2,F5.2,F5.2,F5.2,F5.2,1X,A3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'data.dat')
      write(6,*) '....Loading file: data.dat'
      do i__=1,810
        read(1,'(A205)')ar__
        read(ar__,1)
     +  AFGL(i__),IRC(i__),HR(i__),BD(i__),ID(i__),varType(i__),
     +  Period(i__),Sp(i__),r_Sp(i__),Lum(i__),RAh(i__),RAm(i__),
     +  RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),ref(i__),
     +  rem(i__),class(i__),Vmag(i__),r_Vmag(i__),Imag(i__),Kmag(i__),
     +  mag4(i__),mag11(i__),mag20(i__),mag27(i__),obsDay(i__),
     +  mag2_3(i__),mag3_6(i__),mag4_9(i__),mag8_7(i__),mag10(i__),
     +  mag11_4(i__),mag12_6(i__),mag19(i__),mag23(i__),Obs(i__)
        RAdeg(i__) = rNULL__
        DEdeg(i__) = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh(i__) .GT. -180) RAdeg(i__)=RAh(i__)*15.
        if(RAm(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAm(i__)/4.
        if(RAs(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAs(i__)/240.
        if(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
        if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DEs(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs(i__)/3600.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  AFGL(i__),IRC(i__),HR(i__),BD(i__),ID(i__),varType(i__),
     +  Period(i__),Sp(i__),r_Sp(i__),Lum(i__),RAh(i__),RAm(i__),
     +  RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),ref(i__),
     +  rem(i__),class(i__),Vmag(i__),r_Vmag(i__),Imag(i__),Kmag(i__),
     +  mag4(i__),mag11(i__),mag20(i__),mag27(i__),obsDay(i__),
     +  mag2_3(i__),mag3_6(i__),mag4_9(i__),mag8_7(i__),mag10(i__),
     +  mag11_4(i__),mag12_6(i__),mag19(i__),mag23(i__),Obs(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'notes.dat'	! Comments on individual sources (table 4)

C  Format for file interpretation

    2 format(I4,3X,A73)

C  Effective file loading

      open(unit=1,status='old',file=
     +'notes.dat')
      write(6,*) '....Loading file: notes.dat'
      do i__=1,106
        read(1,'(A80)')ar__1
        read(ar__1,2)AFGL_1(i__),text(i__)
c    ..............Just test output...........
        write(6,2)AFGL_1(i__),text(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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