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-Apr-24 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/MNRAS/407/465 Fast-rotating M dwarfs in NGC2516 (Jackson+, 2010) *================================================================================ *Chromospheric activity among fast-rotating M dwarfs in the open cluster NGC2516. * Jackson R.J., Jeffries R.D. * <Mon. Not. R. Astron. Soc., 407, 465-478 (2010)> * =2010MNRAS.407..465J C============================================================================= C Internal variables integer*4 i__ c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - C Declarations for 'table1.dat' ! Details of observing program 380.D-0479 integer*4 nr__ parameter (nr__=9) ! Number of records character*57 ar__ ! Full-size record C J2000 position composed of: RAdeg DEdeg integer*4 Ref ! Reference number integer*4 Run ! Run number character*10 Obs_date ! ("YYYY-MM-DD") Observation date character*5 Obs_time ! ("h:m") Star time of observation real*8 RAdeg ! (deg) Field centre right ascension (J2000) real*8 DEdeg ! (deg) Field centre declination (J2000) real*4 Seeing ! (arcsec) Average seeing real*4 Airmass ! Airmass integer*4 Nt ! Number of targets integer*4 Nt2 ! Number of new targets observed c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - C Declarations for 'table2.dat' ! Velocity data measured for targets in the open cluster NGC 2516 integer*4 nr__1 parameter (nr__1=237) ! Number of records character*94 ar__1 ! Full-size record C J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs real*8 RAdeg_1 ! (deg) Right Ascension J2000 real*8 DEdeg_1 ! (deg) Declination J2000 C ---------------------------------- ! (position vector(s) in degrees) character*8 v_IHA2007_ ! Source name (N-N-NNNN) (G1) integer*4 RAh ! (h) Right ascension (J2000) (G1) integer*4 RAm ! (min) Right ascension (J2000) (G1) real*4 RAs ! (s) Right ascension (J2000) (G1) character*1 DE_ ! Declination sign (J2000) (G1) integer*4 DEd ! (deg) Declination (J2000) (G1) integer*4 DEm ! (arcmin) Declination (J2000) (G1) real*4 DEs ! (arcsec) Declination (J2000) (G1) real*4 Per ! (d) Period (G1) real*4 Vmag ! (mag) V magnitude (2) real*4 Imag ! (mag) I_J_ magnitude (2) real*4 Kmag ! (mag) ?=- CIT K magnitude (3) character*1 n_Kmag ! [*] Note on Kmag (4) integer*4 S_N ! Signal-to-noise ratio real*4 RV ! (km/s) Radial velocity real*4 e_RV ! (km/s) rms uncertainty on RV character*1 l_vsini ! Limit flag on vsini real*4 vsini ! (km/s) Rotational velocity real*4 e_vsini ! (km/s) rms uncertainty on vsini character*3 Run_1 ! Run number(s) character*1 f__IHA2007_ ! [*] * indicates a non-member *Note (2): From Irwin et al. (2007, Cat. J/MNRAS/377/741), but corrected * with {Delta}I=0.080-0.0076I and {Delta}(V-I)=0.300-0.153(V-I). *Note (3): K-band photometry comes from 2MASS, but is transformed to the * CIT system (K_CIT_=K_2MASS_+0.024) *Note (4): In original files, Kmag=0.020, transformed into "---" at CDS. c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - C Declarations for 'table3.dat' ! Rotation periods, convective turnover times, Rossby numbers, EWs and chromospheric activity indices for the first two CaT lines (8498 and 8542{AA}) in candidate members of NGC 2516 integer*4 nr__2 parameter (nr__2=237) ! Number of records character*83 ar__2 ! Full-size record character*8 v_IHA2007__1 ! Source name (N-N-NNNN) (G1) real*4 logL ! ([Lsun]) Luminosity real*4 Per_1 ! (d) Period (G1) integer*4 T_0 ! (d) Turnover time real*4 logNR ! ([-]) Rossby number real*4 W8488 ! (0.1nm) CaT (8488{AA}) equivalent width real*4 e_W8488 ! (0.1nm) rms uncertainty on W8488 real*4 W8542 ! (0.1nm) CaT (8542{AA}) equivalent width real*4 e_W8542 ! (0.1nm) rms uncertainty on W8542 real*4 logR_1 ! ([-]) Chromospheric activity index of CaT (8488{AA}) real*4 e_logR_1 ! ([-]) rms uncertainty on logR'1 real*4 logR_2 ! ([-]) Chromospheric activity index of CaT (8542{AA}) real*4 e_logR_2 ! ([-]) rms uncertainty on logR'2 character*3 Run_2 ! Run(s) number character*1 f__IHA2007__1 ! [*] for stars falling outside our membership * criteria C============================================================================= C Loading file 'table1.dat' ! Details of observing program 380.D-0479 C Format for file interpretation 1 format( + I6,1X,I1,1X,A10,1X,A5,1X,F7.3,1X,F7.3,1X,F4.2,1X,F4.2,1X,I2, + 1X,I2) C Effective file loading open(unit=1,status='old',file= +'table1.dat') write(6,*) '....Loading file: table1.dat' do i__=1,9 read(1,'(A57)')ar__ read(ar__,1) + Ref,Run,Obs_date,Obs_time,RAdeg,DEdeg,Seeing,Airmass,Nt,Nt2 c ..............Just test output........... write(6,1) + Ref,Run,Obs_date,Obs_time,RAdeg,DEdeg,Seeing,Airmass,Nt,Nt2 c .......End.of.Just test output........... end do close(1) C============================================================================= C Loading file 'table2.dat' ! Velocity data measured for targets in the * open cluster NGC 2516 C Format for file interpretation 2 format( + 6X,A8,2X,I1,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F6.3,1X, + F5.2,1X,F5.2,1X,F5.2,A1,1X,I2,1X,F5.2,1X,F4.1,1X,A1,F5.1,1X, + F3.1,1X,A3,A1) C Effective file loading open(unit=1,status='old',file= +'table2.dat') write(6,*) '....Loading file: table2.dat' do i__=1,237 read(1,'(A94)')ar__1 read(ar__1,2) + v_IHA2007_,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Per,Vmag,Imag,Kmag, + n_Kmag,S_N,RV,e_RV,l_vsini,vsini,e_vsini,Run_1,f__IHA2007_ if (idig(ar__1(59:63)).EQ.0) Kmag = rNULL__ RAdeg_1 = rNULL__ DEdeg_1 = rNULL__ c Derive coordinates RAdeg_1 and DEdeg_1 from input data c (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown) if(RAh .GT. -180) RAdeg_1=RAh*15. if(RAm .GT. -180) RAdeg_1=RAdeg_1+RAm/4. if(RAs .GT. -180) RAdeg_1=RAdeg_1+RAs/240. if(DEd .GE. 0) DEdeg_1=DEd if(DEm .GE. 0) DEdeg_1=DEdeg_1+DEm/60. if(DEs .GE. 0) DEdeg_1=DEdeg_1+DEs/3600. if(DE_.EQ.'-'.AND.DEdeg_1.GE.0) DEdeg_1=-DEdeg_1 c ..............Just test output........... write(6,2) + v_IHA2007_,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Per,Vmag,Imag,Kmag, + n_Kmag,S_N,RV,e_RV,l_vsini,vsini,e_vsini,Run_1,f__IHA2007_ write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1 c .......End.of.Just test output........... end do close(1) C============================================================================= C Loading file 'table3.dat' ! Rotation periods, convective turnover times, * Rossby numbers, EWs and chromospheric activity * indices for the first two CaT lines (8498 and * 8542{AA}) in candidate members of NGC 2516 C Format for file interpretation 3 format( + 6X,A8,2X,F5.2,1X,F6.3,1X,I3,1X,F5.2,1X,F4.2,1X,F4.2,1X,F4.2, + 1X,F4.2,1X,F5.2,1X,F3.2,1X,F5.2,1X,F3.2,1X,A3,A1) C Effective file loading open(unit=1,status='old',file= +'table3.dat') write(6,*) '....Loading file: table3.dat' do i__=1,237 read(1,'(A83)')ar__2 read(ar__2,3) + v_IHA2007__1,logL,Per_1,T_0,logNR,W8488,e_W8488,W8542,e_W8542, + logR_1,e_logR_1,logR_2,e_logR_2,Run_2,f__IHA2007__1 c ..............Just test output........... write(6,3) + v_IHA2007__1,logL,Per_1,T_0,logNR,W8488,e_W8488,W8542,e_W8542, + logR_1,e_logR_1,logR_2,e_logR_2,Run_2,f__IHA2007__1 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