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-04 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. IV/28A Catalog of high proper motion stars (Ivanov, 2002) *================================================================================ *Cross-identifications of stars with high proper motion. * Ivanov G.A. * <Kinematika Fiz. Nebesn. Tel., 18, 287 (2002)> * =2002KFNT...18..287I C============================================================================= C Internal variables integer*4 i__ c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - C Declarations for 'stars.dat' ! Stars with FONAK1, AC2000, GSC numbers integer*4 nr__ parameter (nr__=230099) ! Number of records character*51 ar__ ! Full-size record C J2000.0 position composed of: RAh RAm RAs DE- DEd DEm DEs real*8 RAdeg ! (deg) Right Ascension J2000.0 real*8 DEdeg ! (deg) Declination J2000.0 C ---------------------------------- ! (position vector(s) in degrees) integer*4 Seq ! Sequential number of star integer*4 n_Seq ! [2]? When original data on two lines integer*4 u_RAh ! [1]? position accuracy Flag (1) integer*4 RAh ! (h) [0/24] Right ascension (J2000.0) integer*4 RAm ! (min) Right ascension (J2000.0) integer*4 RAs ! (s) [0,60] Right ascension (J2000.0) integer*4 u_DEd ! [1,6]? position accuracy Flag (1) character*1 DE_ ! Declination sign (J2000.0) integer*4 DEd ! (deg) Declination (J2000.0) integer*4 DEm ! (arcmin) Declination (J2000.0) integer*4 DEs ! (arcsec) [0,60] Declination (J2000.0) integer*4 mT ! ? Type of multiple system code (2) integer*4 mS ! ? Multiple system code (3) integer*4 u_AC2000 ! [1]? Flag uncertainty on AC2000 number integer*4 FONAK1_0 ! ? Chart number FONAK1.0 integer*4 AC2000 ! ? AC2000 number, Cat. <I/275> integer*4 u_GSC ! [1]? Flag uncertainty on GSC number integer*4 GSC ! ? GSC number (GSC NNNNN-NNNNN) Cat. <I/541> *Note (1): Position accuracy flag is: * 1 = uncertain on right ascension or declination * 6 = erroneous mean declination *Note (2): The type of multiple system takes the following values: * 1 = uncertainty of multiple system * 2 = rapid motion of companion (B) * 3 = eclipsing binary * 4 = orbital binary with orbital elements or without (B) * 5 = optical binary * 6 = true binary * 7 = astrometric binary * 8 = spectroscopic binary * 9 = uncertainty of spectroscopic binary * 10 = optical binary and eclipsing binary *Note (3): The Multiple system indicator takes the following values: * 20 = binary star (A) * 21 = binary star (B) * 22 = close binary star (A) * 23 = active binary star (A) * 30 = triple star (A) * 31 = triple star (B) * 32 = triple star (C) * 33 = active triple star (A) * 40 = multiple system (A,B,C,D,...),B,C,D,... - companions * 52 = close binary star (A) and triple star (A) * 62 = close binary star (A) and multiple system * 63 = active binary star (A) and multiple system C============================================================================= C Loading file 'stars.dat' ! Stars with FONAK1, AC2000, GSC numbers C Format for file interpretation 1 format( + I6,1X,I1,I1,I2,I2,I2,I1,A1,I2,I2,I2,I2,I2,1X,I1,I4,I7,I1,1X,I9) C Effective file loading open(unit=1,status='old',file= +'IV/28A/stars.dat') write(6,*) '....Loading file: stars.dat' do i__=1,230099 read(1,'(A51)')ar__ read(ar__,1) + Seq,n_Seq,u_RAh,RAh,RAm,RAs,u_DEd,DE_,DEd,DEm,DEs,mT,mS, + u_AC2000,FONAK1_0,AC2000,u_GSC,GSC if(ar__(8:8) .EQ. '') n_Seq = iNULL__ if(ar__(9:9) .EQ. '') u_RAh = iNULL__ if(ar__(16:16) .EQ. '') u_DEd = iNULL__ if(ar__(24:25) .EQ. '') mT = iNULL__ if(ar__(26:27) .EQ. '') mS = iNULL__ if(ar__(29:29) .EQ. '') u_AC2000 = iNULL__ if(ar__(30:33) .EQ. '') FONAK1_0 = iNULL__ if(ar__(34:40) .EQ. '') AC2000 = iNULL__ if(ar__(41:41) .EQ. '') u_GSC = iNULL__ if(ar__(43:51) .EQ. '') GSC = 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) + Seq,n_Seq,u_RAh,RAh,RAm,RAs,u_DEd,DE_,DEd,DEm,DEs,mT,mS, + u_AC2000,FONAK1_0,AC2000,u_GSC,GSC write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg c .......End.of.Just test output........... end do close(1) C============================================================================= stop end