clear;clc;close all

%this file calls the massBalancePlotF.m function  that creates a mass balance plot from the SIMB3 datasheet.
%for more information, visit: https://www.cryosphereinnovation.com/articles/simb3-matlab
%Last updated: 4/23/2021 by Cameron Planck

%import datasheet
data = csvread('/Users/f002bmr/Dropbox/SIMB3 Share/Cryosphere Innovation/Website/Webflow/Website Refresh 2021/Articles/SIMB3 + Matlab/SIMB3sampleDataSheet.csv',1);

%specify rows of datasheet you want to plot
range = (1:3378);
data = data(range,:);

%parse data by sensor
time_stamp = data(:,3);
dtc = data(:,18:end);
surface_distance =  smoothdata(data(:,10),'rlowess',4);
bottom_distance = data(:,8);

%define distance between rangefinders
distance_between_rangefinders = 4.051; %m

%add initial snow depth from deployment notes
initial_snow_depth = 0.2;

%call massBalancePlotF function
massBalancePlotF(dtc, surface_distance, bottom_distance, time_stamp, initial_snow_depth, distance_between_rangefinders)



