The problem formulation is,
(2) | ||
(3) |
Subroutine icai2() is yet another 2-D convolution program,
a straightforward generalization of the 1-D subroutine icaf1() ,
but with the adjoint being the input instead of the filter.
We need it to apply the spatial PEF to the topography
without overflowing the edges.
# Internal Convolution, Adjoint is the Input. 2-dimensional
#
subroutine icai2( adj,add, lag1,lag2, aa,na1,na2, xx,n1,n2, yy )
integer adj,add, lag1,lag2, na1,na2, n1,n2
real aa(na1,na2), xx(n1,n2), yy(n1,n2)
integer a1, a2, x1,x2, y1,y2
call adjnull( adj,add, xx,n1*n2, yy,n1*n2)
do a2=1,na2 { do y2= 1+na2-lag2, n2-lag2+1 { x2= y2 - a2 + lag2
do a1=1,na1 { do y1= 1+na1-lag1, n1-lag1+1 { x1= y1 - a1 + lag1
if( adj == 0 )
yy( y1,y2) = yy( y1,y2) + xx( x1,x2) * aa( a1,a2)
else
xx( x1,x2) = xx( x1,x2) + yy( y1,y2) * aa( a1,a2)
}} }}
return; end
Subroutine track() shows how tracks are defined from topography,
and it also does the adjoint reconstruction of topography from tracks.
The array dknow(,,) is 1 where data is recorded and 0 where it is not.
The subroutine also carries along the operator
with subroutine ident() .
# make satellite altimeter tracks (and filtered topography) from topography hh.
#
subroutine track( adj,add, eps, hh,n1,n2, dd , dkno )
integer i1,i2,i3, adj,add, n1,n2
real eps, hh(n1,n2), dd(n1,n2,3), dkno(n1,n2,2)
call adjnull( adj,add, hh,n1*n2, dd,n1*n2*3)
do i3=1, 2
do i2=1, n2
do i1=1, n1
if( adj == 0)
dd(i1,i2,i3) = dd(i1,i2,i3) + hh(i1,i2) * dkno(i1,i2,i3)
else
hh(i1,i2) = hh(i1,i2) + dd(i1,i2,i3) * dkno(i1,i2,i3)
call ident( adj, 1, eps, n1*n2, hh, dd( 1, 1, 3) )
return; end
subroutine ident( adj, add, epsilon, n, pp, qq )
integer i, adj, add, n
real epsilon, pp(n), qq(n) # equivalence (pp,qq) OK
if( adj == 0 ) {
if( add == 0 ) { do i=1,n { qq(i) = epsilon * pp(i) } }
else { do i=1,n { qq(i) = qq(i) + epsilon * pp(i) } }
}
else { if( add == 0 ) { do i=1,n { pp(i) = epsilon * qq(i) } }
else { do i=1,n { pp(i) = pp(i) + epsilon * qq(i) } }
}
return; end