function [sed_prop]=socal_sed(location,freq)
%
%
% load the gridded bathymetry (navy database)
load socal_bathy
%
bathy=interp2(lat,long,bathy',location(1,1),location(1,2));
%read in the coastline
%
coast_line=[32 -117
   32.5 -117.15
   33 -117.25
   33.5 -117.75
   34 -118.5
   34.5 -120.5];
%
% read in the sediment depth map
%
sed_depth=[0 5
   2.5 5
   5 10
   7.5 30
   10 50
   20 50 
   100 60
   250 75
   350 100
   450 100];
% find the distance of the location from shoreline
%
shore_line=interp1(coast_line(:,1),coast_line(:,2),location(:,1));
lat1=[location(:,1) location(:,1)];
long1=[location(:,2) shore_line];
distance=sw_dist(lat1,long1,'km');
%
sed_depth1=read_depth(distance,sed_depth);
wt_d1=0.7;
%
% read in sediment types 
% sand (coarse)-1, sand (fine) -2, sand (very fine) -3
% silty sand -4, sandy silt-5 , silt -6
% sand-silt-clay -7, clayey silt-8, silty clay - 9
% sediment types are defined for sections of the shelf 10 miles from shore
sed_type=[117.33 5
   118 6
   118.33 4
   118.5 3
   118.83 5
   119.166 4
   119.5 6
   119.667 8
   120.333 6
   120.66 3];
if distance<17.5
   [type]=read_type(location,sed_type);
   wt1=0.9;
else
   type=9;
   wt1=0.7;
end
sed_vel1=hamilton(type);
%
[sed_vel2,sed_depth2,wt_2]=neighbor(location);
%
base_vel=1750;
density_sed=1.65;
density_base=1.8;
%

% calculate the weighted mean of the sediment depth and speed
%
sed_speed=((wt1*sed_vel1)+(wt_2*sed_vel2))/(wt1+wt_2);
layer_depth=((wt_d1*sed_depth1)+(wt_2*sed_depth2))/(wt_d1+wt_2);
[atten_comp,shear_speed,shear_base,shear_atten]=atten(freq,type,sed_speed);
%
sed_prop=[bathy
   sed_speed
layer_depth
base_vel
atten_comp
shear_speed
shear_base
shear_atten
density_sed
density_base];
%
sed_prop_str=num2str(sed_prop);
disp(' ')
disp(' ')
disp('Sediment Properties:')
disp(' ')
disp(' ')
%
location_str=['At location (lat,long)    ' num2str(location)];
disp(location_str)
disp(' ')
disp(' ')
%
par0='bathymetry at the location (m)     ';
par1='Sediment Compr. Speed (m/s)        ';
par2='Depth of sediment (m)              ';
par3='Compr. speed - basement (m/s)      ';
par4='Compr. wave attenuation (dB/m)     ';
par5='Shear speed - sediment (m/s)       ';
par6='Shear speed - basement (m/s)       ';
par7='Shear wave attenuation (dB/m)      ';
par8='Density - sediment (g/cc)          ';
par9='Density - basement (g/cc)          ';
sed_par=[par0
   par1 
   par2
   par3
   par4
   par5
   par6
   par7
   par8
par9];
disp([sed_par sed_prop_str])
%
% saves the sediment parameters in the file sediment_par.txt
save sediment_par sed_prop -ascii

   
