Conversion of standardized ReadMe file for
file /./ftp/cats/J/A_A/588/A104 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-May-18
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/588/A104 Molecular clouds and star formation (Gong+, 2016)
*================================================================================
*Molecular clouds and star formation toward the Galactic plane within
*216.25<=l<=218.75 and -0.75<=b<=1.25.
* Gong Y., Mao R.Q., Fang M., Zhang S.B., Su Y., Yang J., Jiang Z.B., Xu Y.,
* Wang M., Wang Y., Lu D.R., Sun J.X.
* <Astron. Astrophys. 588, A104 (2016)>
* =2016A&A...588A.104G (SIMBAD/NED BibCode)
C=============================================================================
C Internal variables
integer*4 i__
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'list.dat' ! List of fits datacubes
integer*4 nr__
parameter (nr__=3) ! Number of records
character*53 ar__ ! Full-size record
C Position composed of: GLON GLAT
real*4 GLON ! (deg) Galactic longitude of center
real*4 GLAT ! (deg) Galactic latitude of center
real*8 nu ! (MHz) Rest frequency
integer*4 FWHM ! (arcsec) Beam size
integer*4 size ! (Mbyte) Size of the fits cube
character*9 FileName ! Name of the fits cube, in subdirectory fits
character*14 Title ! Title of the fits file
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'tabled1.dat' ! The infrared photometric magnitudes of
identified YSO candidates in the surveyed region
integer*4 nr__1
parameter (nr__1=163) ! Number of records
character*119 ar__1 ! Full-size record
C Position composed of: GLON GLAT
character*19 Name ! Name (JHHMMSS.ss+DDMMSS.s)
real*8 GLON_1 ! (deg) Galactic longitude
real*4 GLAT_1 ! (deg) Galactic latitude
real*4 Jmag ! (mag) ?=- 2MASS J magnitude
real*4 e_Jmag ! (mag) ? rms uncertainty on Jmag
real*4 Hmag ! (mag) ?=- 2MASS H magnitude
real*4 e_Hmag ! (mag) ? rms uncertainty on Hmag
real*4 Ksmag ! (mag) ?=- 2MASS Ks magnitude
real*4 e_Ksmag ! (mag) ? rms uncertainty on Ksmag
real*4 W1mag ! (mag) ?=- WISE W1 magnitude
real*4 e_W1mag ! (mag) ? rms uncertainty on W1mag
real*4 W2mag ! (mag) ?=- WISE W2 magnitude
real*4 e_W2mag ! (mag) ? rms uncertainty on W2mag
real*4 W3mag ! (mag) ?=- WISE W3 magnitude
real*4 e_W3mag ! (mag) ? rms uncertainty on W3mag
real*4 W4mag ! (mag) ?=- WISE W4 magnitude
real*4 e_W4mag ! (mag) ? rms uncertainty on W4mag
real*4 Av ! (mag) ? Visual Extinxtion
character*2 Class ! [I II] YSO class
C=============================================================================
C Loading file 'list.dat' ! List of fits datacubes
C Format for file interpretation
1 format(F5.1,F5.2,1X,F10.6,1X,I2,1X,I3,1X,A9,1X,A14)
C Effective file loading
open(unit=1,status='old',file=
+'list.dat')
write(6,*) '....Loading file: list.dat'
do i__=1,3
read(1,'(A53)')ar__
read(ar__,1)GLON,GLAT,nu,FWHM,size,FileName,Title
c ..............Just test output...........
write(6,1)GLON,GLAT,nu,FWHM,size,FileName,Title
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
C Loading file 'tabled1.dat' ! The infrared photometric magnitudes of
* identified YSO candidates in the surveyed region
C Format for file interpretation
2 format(
+ A19,1X,F7.3,1X,F6.3,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,1X,F5.2,1X,F4.2,1X,
+ F4.2,1X,F4.2,2X,F4.1,1X,A2)
C Effective file loading
open(unit=1,status='old',file=
+'tabled1.dat')
write(6,*) '....Loading file: tabled1.dat'
do i__=1,163
read(1,'(A119)')ar__1
read(ar__1,2)
+ Name,GLON_1,GLAT_1,Jmag,e_Jmag,Hmag,e_Hmag,Ksmag,e_Ksmag,
+ W1mag,e_W1mag,W2mag,e_W2mag,W3mag,e_W3mag,W4mag,e_W4mag,Av,
+ Class
if (idig(ar__1(36:40)).EQ.0) Jmag = rNULL__
if(ar__1(42:45) .EQ. '') e_Jmag = rNULL__
if (idig(ar__1(47:51)).EQ.0) Hmag = rNULL__
if(ar__1(53:56) .EQ. '') e_Hmag = rNULL__
if (idig(ar__1(58:62)).EQ.0) Ksmag = rNULL__
if(ar__1(64:67) .EQ. '') e_Ksmag = rNULL__
if (idig(ar__1(69:73)).EQ.0) W1mag = rNULL__
if(ar__1(75:78) .EQ. '') e_W1mag = rNULL__
if (idig(ar__1(80:84)).EQ.0) W2mag = rNULL__
if(ar__1(86:89) .EQ. '') e_W2mag = rNULL__
if (idig(ar__1(91:95)).EQ.0) W3mag = rNULL__
if(ar__1(97:100) .EQ. '') e_W3mag = rNULL__
if (idig(ar__1(102:105)).EQ.0) W4mag = rNULL__
if(ar__1(107:110) .EQ. '') e_W4mag = rNULL__
if(ar__1(113:116) .EQ. '') Av = rNULL__
c ..............Just test output...........
write(6,2)
+ Name,GLON_1,GLAT_1,Jmag,e_Jmag,Hmag,e_Hmag,Ksmag,e_Ksmag,
+ W1mag,e_W1mag,W2mag,e_W2mag,W3mag,e_W3mag,W4mag,e_W4mag,Av,
+ Class
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