
% -- 
% Jeff Sevadjian
% Monterey Bay Aquarium Research Institute
% 7700 Sandholdt Rd
% Moss Landing, CA 95039, USA
% ph: +1 831-775-1888

% Loads WG .nc file from //atlas/WaveGlider/deployment_data/
%  and makes some very basic plots.

%define vehicle, deployment, data directory
 veh = 'wgTiny';
 dep = '20150921';
%  mydir = ['//atlas.shore.mbari.org/WaveGlider/deployment_data/' ...
%     veh '/' dep '/realTime/'];
 mydir = ['//atlas.shore.mbari.org/WaveGlider/deployment_data/' ...
    veh '/' dep '/QC/'];

setup_nctoolbox;

% ds = ncgeodataset([mydir dep '.nc']);
ds = ncgeodataset([mydir dep '_QC.nc']);

ds.variables
ds.netcdf

figure;
plot(ds.data('TIME'),ds.data('LONGITUDE'),'.-');

figure;
plot(ds.data('TIME'),ds.data('water_temp'),'.-');

figure;
plot(ds.data('TIME'),ds.data('O2_conc'),'.-');

figure;
plot(ds.data('TIME'),ds.data('pH'),'.-');

figure;
plot(ds.data('TIME'),ds.data('avg_wind_spd'),'.-');

figure; hold on;
plot(ds.data('TIME'),ds.data('pCO2_water'),'b.-');
plot(ds.data('TIME'),ds.data('pCO2_air'),'.-');

figure;
plot(ds.data('TIME'),ds.data('waypoint'),'.-');

figure;
plot(ds.data('TIME'),ds.data('BogLine'),'.-');

figure; hold on;
lon = ds.data('LONGITUDE');
lat = ds.data('LATITUDE');
plot(lon,lat,'.');
f = find(ds.data('BogLine'));
plot(lon(f),lat(f),'g.');

