Conversion of standardized ReadMe file for
file /./ftp/cats/J/MNRAS/425/2116 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-Sep-10
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/425/2116 Arizona CDFS Environment Survey, ACES (Cooper+, 2012)
*================================================================================
*The Arizona CDFS Environment Survey (ACES): A Magellan/IMACS spectroscopic
*survey of the Chandra Deep Field-South.
* Cooper M.C., Yan R., Dickinson M., Juneau S., Lotz J.M., Newman J.A.,
* Papovich C., Salim S., Walth G., Weiner B.J., Willmer C.N.A.
* <Mon. Not. R. Astron. Soc., 425, 2116-2127 (2012)>
* =2012MNRAS.425.2116C
C=============================================================================
C Internal variables
integer*4 i__
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'table1.dat' ! Slitmask observation information
integer*4 nr__
parameter (nr__=40) ! Number of records
character*61 ar__ ! Full-size record
C J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs
real*8 RAdeg (nr__) ! (deg) Right Ascension J2000
real*8 DEdeg (nr__) ! (deg) Declination J2000
C ---------------------------------- ! (position vector(s) in degrees)
character*7 Mask (nr__) ! Name of the IMACS slitmask
character*10 Date (nr__) ! ("YYYY/MM/DD") Observation date (UT)
integer*4 RAh (nr__) ! (h) Slitmask center right ascension (J2000)
integer*4 RAm (nr__) ! (min) Slitmask center right ascension (J2000)
real*4 RAs (nr__) ! (s) Slitmask center right ascension (J2000)
character*1 DE_ (nr__) ! Slitmask center Declination sign (J2000)
integer*4 DEd (nr__) ! (deg) Slitmask center Declination (J2000)
integer*4 DEm (nr__) ! (arcmin) Slitmask center Declination (J2000)
real*4 DEs (nr__) ! (arcsec) Slitmask center Declination (J2000)
integer*4 PA (nr__) ! (deg) Position angle of the slitmask (E of N)
integer*4 N0 (nr__) ! Number of targets on slitmask.
integer*4 Nz (nr__) ! Number of secure (Q = -1, 3, 4) redshifts
* measured on slitmask
integer*4 ExpTime (nr__) ! (s) Total exposure time for slitmask
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'table2.dat' ! ACES redshift catalogue
integer*4 nr__1
parameter (nr__1=12983) ! Number of records
character*83 ar__1 ! Full-size record
C J2000 position composed of: RAdeg DEdeg
integer*4 Seq (nr__1) ! [121/63431] Object identification number in the
* R-band catalogue of Wolf et al. (2004,
* Cat. II/253)
real*8 RAdeg_1 (nr__1) ! (deg) Right ascension (J2000) (1)
real*8 DEdeg_1 (nr__1) ! (deg) Declination (J2000) (1)
real*4 Rmag (nr__1) ! (mag) R-band magnitude in the AB system (1)
character*7 Mask_1 (nr__1) ! Name of the IMACS slitmask on which the object
* was observed
integer*4 Slit (nr__1) ! Number of slit on the IMACS slitmask
* corresponding to the object
real*8 MJD (nr__1) ! (d) Modified Julian date of observation
integer*4 Flag (nr__1) ! [0/1] Targeting flag:
* 0 = main R-band selected target;
* 1 = Spitzer/MIPS 70um target
real*8 z (nr__1) ! ?=- Redshift derived from the observed spectrum
real*8 zhel (nr__1) ! ?=- Heliocentric-frame redshift.
integer*4 Q (nr__1) ! [-2/4] Redshift quality code, 4=best (2)
real*8 zalt (nr__1) ! ?=- Alternate redshift from literature
integer*4 r_zalt (nr__1) ! ?=- Source of alternate redshift (G1)
*Note (1): from Wolf et al. (2004, Cat. II/253).
*Note (2): Redshift quality code as follows:
* -2 = unknown
* -1 = star (redshift close to zero)
* 1 = unknown
* 3 = ~90 per cent confidence
* 4 = ~95 per cent confidence
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'table3.dat' ! ACES environment catalogue
integer*4 nr__2
parameter (nr__2=4131) ! Number of records
character*62 ar__2 ! Full-size record
integer*4 Seq_1 (nr__2) ! Object identification number (SEQ) in the
* R-band catalogue of Wolf et al. (2004, II/253)
real*4 zhel_1 (nr__2) ! Redshift (in the heliocentric frame)
integer*4 r_zhel (nr__2) ! Source of redshift (G1)
real*4 Dedge (nr__2) ! (Mpc) Distance from the nearest survey edge
* (h-1 comoving Mpc)
real*4 lg_1_d3 (nr__2) ! ([-]) Overdensity as given by the third-nearest-
* neighbour surface density, ACES only tracer
real*4 lg_1_d4 (nr__2) ! ([-]) Overdensity as given by the fourth-nearest-
* neighbour surface density, ACES only tracer
real*4 lg_1_d5 (nr__2) ! ([-]) Overdensity as given by the fifth-nearest-
* neighbour surface density, ACES only tracer
real*4 lg_1_d3_2 (nr__2) ! ([-]) Overdensity as given by the third-nearest-
* neighbour surface density, ACES + zpublic tracer
real*4 lg_1_d4_2 (nr__2) ! ([-]) Overdensity as given by the fourth-nearest-
* neighbour surface density, ACES + zpublic tracer
real*4 lg_1_d5_2 (nr__2) ! ([-]) Overdensity as given by the fifth-nearest-
* neighbour surface density, ACES + zpublic tracer
C=============================================================================
C Loading file 'table1.dat' ! Slitmask observation information
C Format for file interpretation
1 format(
+ A7,1X,A10,1X,I2,1X,I2,1X,F6.3,1X,A1,I2,1X,I2,1X,F5.2,1X,I3,1X,
+ I3,1X,I3,1X,I4)
C Effective file loading
open(unit=1,status='old',file=
+'table1.dat')
write(6,*) '....Loading file: table1.dat'
do i__=1,40
read(1,'(A61)')ar__
read(ar__,1)
+ Mask(i__),Date(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
+ DEd(i__),DEm(i__),DEs(i__),PA(i__),N0(i__),Nz(i__),
+ ExpTime(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)
+ Mask(i__),Date(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
+ DEd(i__),DEm(i__),DEs(i__),PA(i__),N0(i__),Nz(i__),
+ ExpTime(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 'table2.dat' ! ACES redshift catalogue
C Format for file interpretation
2 format(
+ I5,1X,F9.6,1X,F10.6,1X,F5.2,1X,A7,1X,I3,1X,F7.1,1X,I1,1X,F7.5,
+ 1X,F7.5,1X,I2,1X,F7.5,1X,I1)
C Effective file loading
open(unit=1,status='old',file=
+'table2.dat')
write(6,*) '....Loading file: table2.dat'
do i__=1,12983
read(1,'(A83)')ar__1
read(ar__1,2)
+ Seq(i__),RAdeg_1(i__),DEdeg_1(i__),Rmag(i__),Mask_1(i__),
+ Slit(i__),MJD(i__),Flag(i__),z(i__),zhel(i__),Q(i__),
+ zalt(i__),r_zalt(i__)
if (idig(ar__1(56:62)).EQ.0) z(i__) = rNULL__
if (idig(ar__1(64:70)).EQ.0) zhel(i__) = rNULL__
if (idig(ar__1(75:81)).EQ.0) zalt(i__) = rNULL__
if (r_zalt(i__) .EQ. 45) r_zalt(i__) = iNULL__
c ..............Just test output...........
write(6,2)
+ Seq(i__),RAdeg_1(i__),DEdeg_1(i__),Rmag(i__),Mask_1(i__),
+ Slit(i__),MJD(i__),Flag(i__),z(i__),zhel(i__),Q(i__),
+ zalt(i__),r_zalt(i__)
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
C Loading file 'table3.dat' ! ACES environment catalogue
C Format for file interpretation
3 format(
+ I5,1X,F6.4,1X,I1,1X,F5.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,
+ F6.3,1X,F6.3)
C Effective file loading
open(unit=1,status='old',file=
+'table3.dat')
write(6,*) '....Loading file: table3.dat'
do i__=1,4131
read(1,'(A62)')ar__2
read(ar__2,3)
+ Seq_1(i__),zhel_1(i__),r_zhel(i__),Dedge(i__),lg_1_d3(i__),
+ lg_1_d4(i__),lg_1_d5(i__),lg_1_d3_2(i__),lg_1_d4_2(i__),
+ lg_1_d5_2(i__)
c ..............Just test output...........
write(6,3)
+ Seq_1(i__),zhel_1(i__),r_zhel(i__),Dedge(i__),lg_1_d3(i__),
+ lg_1_d4(i__),lg_1_d5(i__),lg_1_d3_2(i__),lg_1_d4_2(i__),
+ lg_1_d5_2(i__)
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