module tvdec { # Linear operator for time-variable deconvolution
  use leakint2
  use nicaf1
  real, dimension( ny*na), allocatable :: aa
#% _init( yy, ny, na, rho)
    real, dimension( :), pointer :: yy
    integer, intent( in)         :: ny, na
    real,    intent( in)         :: rho 
    call nicaf1_init( yy, ny, na)
    call leakint2_init( ny, na, rho)
#% _lop( mod, dat)
    integer stat1, stat2
    if( adj) {
       stat2 = nicaf1_lop  ( adj, .false., aa, dat)
       stat1 = leakint2_lop( adj, .true.,  mod, aa)
    } else {
       stat1 = leakint2_lop( adj, .false., mod, aa)
       stat2 = nicaf1_lop  ( adj, .true.,  aa, dat)
    }
}
