34 implicit double precision(a-h,o-z)
36 integer hrec1(200049),hrec2(200049)
37 real*4 zrec1(200049),zrec2(200049)
38 equivalence(hrec1(1),zrec1(1))
39 equivalence(hrec2(1),zrec2(1))
45 write(6,*)
'program convlv' 48 3
format(
'Enter "first" input file: ',$)
51 open(lin1,file=fname,status=
'old',form=
'unformatted')
54 4
format(
'Enter "second" input file: ',$)
56 open(lin2,file=fname,status=
'old',form=
'unformatted')
59 2
format(
'Enter "a*b" output file: ',$)
61 open(lout,file=fname,status=
'new',form=
'unformatted')
63 read(lin1) glamn1,glomn1,dgla1,dglo1,nla1,nlo1,ikind1
64 read(lin2) glamn2,glomn2,dgla2,dglo2,nla2,nlo2,ikind2
68 if(dabs(glomn1-glomn2).gt.1.d-7) stop 1
69 if(dabs(glamn1-glamn2).gt.1.d-7) stop 6
70 if(dabs(dgla1 -dgla2 ).gt.1.d-7) stop 2
71 if(dabs(dglo1 -dglo2 ).gt.1.d-7) stop 3
72 if(nlo1 .ne.nlo2 ) stop 4
73 if(nla1 .ne.nla2 ) stop 7
74 if(ikind1.ne.ikind2) stop 5
76 write(lout) glamn1,glomn1,dgla1,dglo1,nla1,nlo1,ikind1
79 read (lin1) (hrec1(i),i=1,nlo1)
80 read (lin2) (hrec2(i),i=1,nlo1)
82 11 hrec1(i)=hrec1(i)+hrec2(i)
83 10
write(lout) (hrec1(i),i=1,nlo1)
86 read (lin1) (zrec1(i),i=1,nlo1)
87 read (lin2) (zrec2(i),i=1,nlo1)
89 21 zrec1(i)=zrec1(i)*zrec2(i)
90 20
write(lout) (zrec1(i),i=1,nlo1)
program convlv
Part of the NADCON5 NADCON5 Core Library , Convolves two grids.