#
#
#
#
#
program Pre2D_salt
  use sep
  use gendown3d_mod
  use Pre2D_salt_ssf_types
  use Pre2D_salt_ssf_mod
  type (Pre2D_salt_ssf_param_type) Pre2D_salt_ssf_par
  logical slbf_oper,prestack
  interface
     subroutine param_Pre2D_salt_ssf(Pre2D_salt_ssf_par)
       use Pre2D_salt_ssf_types
       type (Pre2D_salt_ssf_param_type) Pre2D_salt_ssf_par
			end subroutine
	end interface
  integer stat
  character(len=128) tag_data,tag_mod
 
	call initpar()
	call doc(SOURCE)



  tag_data='Image'
  tag_mod='Data'

  call from_param('slbf_oper',slbf_oper,.false.)
  call to_history('slbf_oper',slbf_oper)


    call param_Pre2D_salt_ssf(Pre2D_salt_ssf_par)
    call init_Pre2D_salt_ssf_par(Pre2D_salt_ssf_par)
    call gendown3d_init(verb=.false.,init_down_oper=Pre2D_salt_ssf_init)
   stat=gendown3d(.false.,.false.,tag_mod,tag_data, &
                  Pre2D_salt_ssf_down_oper,Pre2D_salt_ssf_scatter_oper)

end program
subroutine param_Pre2D_salt_ssf(Pre2D_salt_ssf_par)  
use sep  
use Pre2D_salt_ssf_types  
implicit none  
type (Pre2D_salt_ssf_param_type) Pre2D_salt_ssf_par  
integer, external :: auxpar,getch,fetch,auxin,sreed,sseek,auxout

  call from_param("reference_slowness",Pre2D_salt_ssf_par%ref_slow,'avg')
  call to_history("reference_slowness",Pre2D_salt_ssf_par%ref_slow)
  call from_param("n_slow_split",Pre2D_salt_ssf_par%n_slow_split,1)
  call to_history("n_slow_split",Pre2D_salt_ssf_par%n_slow_split)
  call from_param("lbf_order",Pre2D_salt_ssf_par%lbf_order,1)
  call to_history("lbf_order",Pre2D_salt_ssf_par%lbf_order)
  call from_param("n_disp_rel",Pre2D_salt_ssf_par%n_disp_rel,10001)
  call to_history("n_disp_rel",Pre2D_salt_ssf_par%n_disp_rel)
  call from_param("min_delta_slow",Pre2D_salt_ssf_par%min_delta_slow,.1)
  call to_history("min_delta_slow",Pre2D_salt_ssf_par%min_delta_slow)
  call from_param("vel_salt",Pre2D_salt_ssf_par%vel_salt,-1.)
  call to_history("vel_salt",Pre2D_salt_ssf_par%vel_salt)
  call from_param("slow_salt",Pre2D_salt_ssf_par%slow_salt,-1.)
  call to_history("slow_salt",Pre2D_salt_ssf_par%slow_salt)
  return
end subroutine param_Pre2D_salt_ssf

