CDS.headStuff2
FORTRAN Generation
Conversion of standardized ReadMe file for
catalog 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 2024-May-03 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/AZh/84/147 Light curves of V838 Mon and V4332 Sgr (Goranskii+, 2007) *================================================================================ *Comparative spectral analysis of the peculiar red novae V838 Mon and V4332 Sgr *in quiescence after their outbursts. * Goranskii V.P., Barsukova E.A. * <Astron. Zh. 84, 147 (2007)> * =2007AZh....84..147G * =2007ARep...51..126G C============================================================================= C Internal variables integer*4 i__ c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - C Declarations for 'v4332sgr.dat' ! V4332 Sgr light curves integer*4 nr__ parameter (nr__=138) ! Number of records character*50 ar__ ! Full-size record real*8 HJD ! (d) Heliocentric Julian date real*4 Vmag ! (mag) ?=- Johnson V magnitude real*4 Bmag ! (mag) ?=- Johnson B magnitude real*4 Umag ! (mag) ?=- Johnson U magnitude real*4 Rcmag ! (mag) ?=- Cousins R magnitude real*4 Icmag ! (mag) ?=- Cousins I magnitude character*2 Ref ! Datasource code, not detailed in the paper C============================================================================= C Loading file 'v4332sgr.dat' ! V4332 Sgr light curves C Format for file interpretation 1 format(F12.4,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,A2) C Effective file loading open(unit=1,status='old',file= +'J/AZh/84/147/v4332sgr.dat') write(6,*) '....Loading file: v4332sgr.dat' do i__=1,138 read(1,'(A50)')ar__ read(ar__,1)HJD,Vmag,Bmag,Umag,Rcmag,Icmag,Ref if (idig(ar__(14:19)).EQ.0) Vmag = rNULL__ if (idig(ar__(21:26)).EQ.0) Bmag = rNULL__ if (idig(ar__(28:33)).EQ.0) Umag = rNULL__ if (idig(ar__(35:40)).EQ.0) Rcmag = rNULL__ if (idig(ar__(42:47)).EQ.0) Icmag = rNULL__ c ..............Just test output........... write(6,1)HJD,Vmag,Bmag,Umag,Rcmag,Icmag,Ref 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