clear all 
close all

Station='S5669'
Folder='YR160706_Pamunkey_mud'

% Import the data
% [~, ~, raw] = xlsread(['O:\CHSD-data\Sediment Dynamics DATA\York River\SERDP MRI field testing 2014-2015\SEDIMENT YR160624-YR160805\' Folder '\Water Content\YR160624_moisture.xlsx'],' DATA','S5:Z14');
[~, ~, raw] = xlsread('YR160706_moisture.xlsx',' DATA','S5:Z14');

data = reshape([raw{:}],size(raw));

moisture = data(:,1); % in grams
TSS = data(:,2); % in grams
TFS = data(:,3); % in grams
TVS = data(:,4); % in grams
total = data(:,5); % in grams
Pmoisture = data(:,6); % percent
Porg = data(:,7); % percent
Pmud = data(:,8); % percent

% Create depth variable same size as # of rows in spreadsheet
[m,n]=size(moisture);
depth_core= [(m.*(-1))+1:1:0];
depth_core=depth_core'-.5;
dpt=flipud(depth_core);

clearvars data raw m n;

% % Plot from old code
% figure(1)
% set(gca,'fontsize',16); 
% xlabels{1} = 'Percent Fixed Solids of Total Sample';
% xlabels{2} = 'Percent Volitile Solids of Total Sample';
% ylabels{1} = 'Depth in Core (cm)';
% ylabels{2} = 'Depth in Core (cm)';
% [ax,hlT,hlS] = plotxx_withmarker(Pmud,dpt,Porg,dpt,xlabels,ylabels);
% title(Station,'fontweight','normal')
% print (figure(1), '-dpdf', [Station '_PercentFixedVolatile.pdf']);



% Plot including percent moisture
figure(1)
set(gca,'fontsize',16); 
subplot(1,3,1)
plot(Pmud,dpt,'ro-');
ylabel('Depth (cm)');
xlabel('% Fixed Solids');
subplot(1,3,2)
plot(Porg,dpt,'mo-');
xlabel('% Volatiles');
title(Station,'fontweight','normal')
subplot(1,3,3)
plot(Pmoisture,dpt,'bo-');
xlabel('% Moisture');

print (figure(1), '-dpdf', [Station '_PercentFixedVolatileMoisture.pdf']);
