1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
| program pro
real x,y
parameter (ndatdim=3000)
parameter (ndim=161)
character*28 eqid,infile,outfile
real zlat(ndatdim), zlon(ndatdim), zmmi(ndatdim)
real xlat(ndatdim), xlon(ndatdim), xmmi(ndatdim)
real wts(ndatdim)
real xloneq, xlateq
integer sprd, dellat
c xlat(i), xlon(i) are the coords for intensity xmmi(i)
real xmii3(ndatdim),r3(26500), s3(26500)
real glat(26500),glon(26500)
c xmii1, xmii3, xmii4 are scratch arrays
integer iunit,ounit1,ounit2
parameter (iunit=21, ounit1=22, ounit2=23)
pio180=4.0*atan(1.0)/180.
Distmax=150.
c Open infile...
1 print '(a,$)', ' Infile: '
read '(a)', infile
open (iunit, file=infile, form='formatted', status='old',
&iostat=ios)
if (ios.ne.0) then
print *, ' Something wrong with infile = ', infile
print *, ' ** Try again**'
go to 1
endif
c Open output files...
2 print '(a,$)', ' Outfile for MI3: '
read '(a)', outfile
open (ounit1, file=outfile, form='formatted', status='new',
& iostat=ios)
if (ios.ne.0) then
print *, ' Something wrong with outfile = ', outfile
print *, ' ** Try again **'
goto 2
endif
3 print '(a,$)', ' Outfile for RI3: '
read '(a)', outfile
open (ounit2, file=outfile, form='formatted', status='new',
& iostat=ios)
if (ios.ne.0) then
print *, ' Something wrong with outfile = ', outfile
print *, ' ** Try again **'
goto 3
endif
c Read header information.
read(iunit,'(a)') eqid
c Print header info at terminal:
print '(2a)', ' id = ', eqid
c Write header to outfile.
write(ounit1,'(a)') eqid
eqid(21:28)='RMS MI-3'
write(ounit2,'(a)') eqid
read (iunit,'(2F6.2)',I4,I2) xloneq, xlateq,sprd,dellat
print '(2a)', 'marche'
write(ounit1,'(1x,4f10.2)') xloneq,xlateq,sprd,dellat
write(ounit2,'(1x,4f10.2)') xloneq,xlateq,sprd,dellat |
Partager