%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% FORWARD AND INVERSE SOLUTION VELOCITY PLOTS
%
% Set path to include cen .m files
%
path(path,'/globec/naimie/matlab_cen');
%
% Load .m3d, .dat, .s2c and grid data
%
ls *m3d
file_input_m3d=input('Enter the name of the .m3d file: ','s')
[OBS_M3D,gridname,year,ncol,gmt]=read_obs(file_input_m3d);
%
gridname='bank150';
gridstruct=loadgrid(gridname);
in=gridstruct.e;x=gridstruct.x;y=gridstruct.y;z=gridstruct.z;
bnd=gridstruct.bnd;
%
% Plot results
%
normalfigure
whitebg('w')
%
%
plotbnd(gridstruct)
hold on
V=OBS_M3D;
hv=vecplot2(V(:,2),V(:,3),V(:,4),V(:,5),1.0,'m/s',175000.,-25000.);
set(hv,'color','blue')
title(verbatim([file_input_m3d]))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
