% GM_nuts_2003_2015_plot_profs.m
% 
% Nutrient data from 2003-2015 Gulf of Maine and Georges Bank Cruises
% Plot data profiles.
%
% Corrected July 6, 2016:
% NaNs in Date/Time vectors (EN435 several points, TI229) are considered in
% creating Date/Time string.

clear;
%@@@@@@@@@@@@@@@@@@ Save png files @@@@@@@@@@@
%saveOption='yes';
saveOption='no';
%@@@@@@@@@@@@@@  Draw coast line  @@@@@@@@@@@@
drawCoast='yes';
%drawCoast='no';
%@@@@@@@@@@@@@@  Coordinates  @@@@@@@@@@@@@@@@
% Map limits.
latmin = 40.0;
latmax = 45.5;
lonmax = 71.4;
lonmin = 65.5;
% Calculate relation relyx = axisy/axisx (for PlotBoxAspectRatio)
weg = 111*cos(pi*(latmin+(latmax-latmin)/2)/180);% Weight of one degree longitude
xc = (lonmax-lonmin)*weg;                        % Longitude, km
yc = (latmax-latmin)*111;                        % Latitude, km
relyx = yc/xc;
%@@@@@@@@@@@@@@ Fonts, Colors  @@@@@@@@@@@@@@@
fnt_ax=7;
fnt_lbl=9;
fnt_title=10;
marker_size=2;
fnt_name='times';
fig_pos=[21.00        248.00        492.00        654.00];
fig_color=[1 1 1];
bnd_color=[0.8 0.8 0.66];
%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%@@@@@@@@@@@@@@@     MENU YEAR   @@@@@@@@@@@@@@@
%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
year=f_menu_of_numbers_title('YEAR',[2003:2010 2013:2015]);
if isempty(year), return; end
if year==2003
    cruises_name='OC391';
elseif year==2004
    cruises_name='OC402';
elseif year==2005
    cruises_name=strvcat('OC412','TI096','TI098','TI100','TI103','TI105','TI109','TI112');
elseif year==2006
    cruises_name=strvcat('OC425','TI171','TI177','TI180','TI181','TI184','TI185','TI191');
elseif year==2007
    cruises_name=strvcat('EN435','EN437','TI229','TI239','TI245','TI261');
elseif year==2008
    cruises_name=strvcat('OC445','OC447','EN448','EN451');
    %cruises_name=strvcat('OC445','OC447','EN448','EN451','TI303','TI313','TI314','TI326');
elseif year==2009
    cruises_name=strvcat('TI383','TI386');
elseif year==2010
    cruises_name=strvcat('OC460','EN476','OC465','OC467');
elseif year==2013
    cruises_name=strvcat('TI661','TI667','TI670','TI672','TI677');
    %cruises_name='TI670';
elseif year==2014
    cruises_name=strvcat('TI747','TI751','TI758','TI762');
elseif year==2015
    cruises_name=strvcat('CT001','TI813','TI817','CT004');
else
    return;
end
%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%@@@@@@@@@@@@@@@    MENU CRUISE  @@@@@@@@@@@@@@@
%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
crName=f_menu_of_strings('CRUISE',cruises_name);
if isempty(crName), return; end
cr_id=lower(crName);
cr_num=str2num(crName(3:5));
%************************************************************
%********  C O N S T A N T S   depending on  CRUISE  ********
%************************************************************
fname_nuts_add='';
path_name_part_1='/data/alex_surveys/GM_nuts_2003_2016/';
path_name_part_2=''; % with_nomDepth
colDep_nuts=[];
colYear_nuts=[];
colMonth_nuts=[];
colDay_nuts=[];
colDate_nuts=[];
colTime_nuts=[];
colLat_nuts=[];
colLon_nuts=[];
colLatDeg_nuts=[];
colLatMin_nuts=[];
colLonDeg_nuts=[];
colLonMin_nuts=[];
colPres_nuts=[];
colTemp_nuts=[];
colSal_nuts=[];
colChl_nuts=[];
colPhaeo_nuts=[];
%##############################################################
%#################     2010 Cruises    ########################
%##############################################################
if strcmp(cr_id,'oc467')
    ship_name='Oceanus';
    date_str='July 29 - August 6, 2010';
    % ------ Nuts/Chl/ (Maura's)   ------
    fname_nuts='OC467_Bottlefile_DMc_w';
    fname_nuts_ext='txt';
    % ------ Nuts/Chl/ (Maura's) - columns.
    colSt_nuts=1;
    colYear_nuts=2;
    colMonth_nuts=3;
    colDay_nuts=4;
    colTime_nuts=5;
    colLat_nuts=6;
    colLon_nuts=7;
    colDep_nuts=9;
    colChl_nuts=11;
    colPhaeo_nuts=12;
    colSal_nuts=13;
    colPres_nuts=15;
    colTemp_nuts=16;
    colNO3_nuts=22;
    colSi_nuts=23;
    colNH4_nuts=24;
    colPO4_nuts=25;
elseif strcmp(cr_id,'oc465')
    ship_name='Oceanus';
    date_str='June 30 - July 8, 2010';
    % ------ Nuts/Chl/ (Maura's)   ------
    fname_nuts='OC465_Bottlefile_DMc_w';
    fname_nuts_ext='txt';
    % ------ Nuts/Chl/ (Maura's) - columns.
    colSt_nuts=1;
    colYear_nuts=2;
    colMonth_nuts=3;
    colDay_nuts=4;
    colTime_nuts=5;
    colLat_nuts=6;
    colLon_nuts=7;
    colDep_nuts=9;
    colChl_nuts=11;
    colPhaeo_nuts=12;
    colSal_nuts=13;
    colPres_nuts=15;
    colTemp_nuts=16;
    colNO3_nuts=22;
    colSi_nuts=23;
    colNH4_nuts=24;
    colPO4_nuts=25;
elseif strcmp(cr_id,'en476')
    ship_name='Endeavor';
    date_str='May 26 - June 4, 2010';
    % ------ Nuts/Chl/ (Maura's)   ------
    fname_nuts='EN476_DMC_w';
    fname_nuts_ext='txt';
    % ------ Nuts/Chl/ (Maura's) - columns.
    colSt_nuts=1;
    colYear_nuts=2;
    colMonth_nuts=3;
    colDay_nuts=4;
    colTime_nuts=5;
    colLat_nuts=10;
    colLon_nuts=11;
    colDep_nuts=13;
    colChl_nuts=17;
    colPhaeo_nuts=18;
    colSal_nuts=19;
    colPres_nuts=21;
    colTemp_nuts=22;
    colNO3_nuts=29;
    colSi_nuts=30;
    colNH4_nuts=31;
    colPO4_nuts=32;
elseif strcmp(cr_id,'oc460')
    ship_name='Oceanus';
    date_str='May 1-10, 2010';
    % ------ Nuts/Chl/ (Maura's)   ------
    fname_nuts='OC460_DMc_w';
    fname_nuts_ext='txt';
    % ------ Nuts/Chl/ (Maura's) - columns.
    colSt_nuts=1;
    colYear_nuts=2;
    colMonth_nuts=3;
    colDay_nuts=4;
    colTime_nuts=5;
    colLat_nuts=10;
    colLon_nuts=11;
    colDep_nuts=13;
    colChl_nuts=17;
    colPhaeo_nuts=18;
    colSal_nuts=19;
    colPres_nuts=21;
    colTemp_nuts=22;
    colNO3_nuts=29;
    colSi_nuts=30;
    colNH4_nuts=31;
    colPO4_nuts=32;
    %##############################################################
    %#################     2008 Cruises    ########################
    %##############################################################
elseif strcmp(cr_id,'oc445')
    ship_name='Oceanus';
    % ------Date   ------
    date_str='April 28  - May 5, 2008';
    % ------ Nuts/Chl/ (Maura's)   ------
    fname_nuts='DCM_OC445_bottlefile_w';
    fname_nuts_ext='txt';
    % ------ Nuts/Chl/ (Maura's) - columns.
    colSt_nuts=1;
    colYear_nuts=2;
    colMonth_nuts=3;
    colDay_nuts=4;
    colTime_nuts=5;
    colLat_nuts=6;
    colLon_nuts=7;
    colDep_nuts=9;
    colAlex_nuts=10;
    colChl_nuts=11;
    colPhaeo_nuts=12;
    colSal_nuts=13;
    colPres_nuts=15;
    colTemp_nuts=16;
    colNO3_nuts=22;
    colSi_nuts=23;
    colNH4_nuts=24;
    colPO4_nuts=25;
elseif strcmp(cr_id,'oc447')
    ship_name='Oceanus';
    % ------Date   ------
    date_str='May 27 - June 4, 2008';
    % ------ Nuts/Chl/ (Maura's)   ------
    fname_nuts='OC447_bottlefile_DMc_w';
    fname_nuts_ext='txt';
    % ------ oc447 Nuts/Chl/ (Maura's) - columns.
    colSt_nuts=1;
    colYear_nuts=2;
    colMonth_nuts=3;
    colDay_nuts=4;
    colTime_nuts=5;
    colLat_nuts=6;
    colLon_nuts=7;
    colDep_nuts=9;
    colAlex_nuts=10;
    colChl_nuts=11;
    colPhaeo_nuts=12;
    colSal_nuts=13;
    colPres_nuts=15;
    colTemp_nuts=16;
    colNO3_nuts=22;
    colSi_nuts=23;
    colNH4_nuts=24;
    colPO4_nuts=25;
elseif strcmp(cr_id,'en448')
    ship_name='Endeavor';
    % ------Date   ------
    date_str='June 27 - July 3, 2008';
    % ------ Nuts/Chl/ (Maura's)   ------
    fname_nuts='EN448_bottlefile_DMc_w';
    fname_nuts_ext='txt';
    % ------ en448 Nuts/Chl/ (Maura's) - columns ---
    colSt_nuts=1;
    colYear_nuts=2;
    colMonth_nuts=3;
    colDay_nuts=4;
    colTime_nuts=5;
    colLat_nuts=6;
    colLon_nuts=7;
    colDep_nuts=9;
    colAlex_nuts=10;
    colChl_nuts=11;
    colPhaeo_nuts=12;
    colSal_nuts=13;
    colPres_nuts=15;
    colTemp_nuts=16;
    colNO3_nuts=22;
    colSi_nuts=23;
    colNH4_nuts=24;
    colPO4_nuts=25;
elseif strcmp(cr_id,'en451')
    ship_name='Endeavor';
    % ------Date   ------
    date_str='August (7-13), 2008';
    % ------ Nuts/Chl/ (Maura's)   ------
    fname_nuts='EN451_bottlefile_DMcG_w';
    fname_nuts_ext='txt';
    % ------ en451 Nuts/Chl/ (Maura's) - columns -----
    colSt_nuts=1;
    colYear_nuts=2;
    colMonth_nuts=3;
    colDay_nuts=4;
    colTime_nuts=5;
    colLat_nuts=6;
    colLon_nuts=7;
    colDep_nuts=9;
    colAlex_nuts=10;
    colChl_nuts=11;
    colPhaeo_nuts=12;
    colSal_nuts=13;
    colPres_nuts=15;
    colTemp_nuts=16;
    colNO3_nuts=22;
    colSi_nuts=23;
    colNH4_nuts=24;
    colPO4_nuts=25;
    %##############################################################
    %#################     2007 Cruises    ########################
    %##############################################################
elseif strcmp(cr_id,'en435')
    ship_name='Endeavor';
    % ------Date   ------
    date_str='May 17-31, 2007';
    % ------ Nuts/Chl/ (Maura's) ------
    fname_nuts='EN435Bottlefile';
    fname_nuts_ext='txt';
    % ------ en435 Nuts/Chl/ (Maura's) - columns -----
    colSt_nuts=1;
    colYear_nuts=2;
    colMonth_nuts=3;
    colDay_nuts=4;
    colTime_nuts=5;
    colLat_nuts=6;
    colLon_nuts=7;
    colDep_nuts=9;
    colChl_nuts=10;
    colPhaeo_nuts=11;
    colAlex_nuts=12;
    colSal_nuts=13;
    colPres_nuts=15;
    colTemp_nuts=16;
    colNO3_nuts=23;
    colSi_nuts=24;
    colNH4_nuts=25;
    colPO4_nuts=26;
elseif strcmp(cr_id,'en437')
    ship_name='Endeavor';
    % ------ Date ------
    date_str='June 21 - July 5, 2007';
    % ------ Nuts/Chl/ (Maura's)   ------
    fname_nuts='EN437';
    fname_nuts_ext='txt';
    % ---- Nuts columns ----
    colSt_nuts=1;
    colYear_nuts=2;
    colMonth_nuts=3;
    colDay_nuts=4;
    colTime_nuts=5;
    colLat_nuts=6;
    colLon_nuts=7;
    colDep_nuts=9;
    colChl_nuts=12;
    colPhaeo_nuts=13;
    colAlex_nuts=14;
    colSal_nuts=15;
    colPres_nuts=17;
    colTemp_nuts=18;
    colNO3_nuts=25;
    colSi_nuts=26;
    colNH4_nuts=27;
    colPO4_nuts=28;
    %##############################################################
    %#################  2006 Cruise OC425  ########################
    %##############################################################
elseif strcmp(cr_id,'oc425')
    ship_name='Oceanus';
    % ------ Date ------
    date_str='June 6-17, 2006';
    % ------ Nuts merged datafile ------
    fname_nuts='oc425_nuts_TS';
    fname_nuts_ext='mat';
    fname_nuts_add='_final';
    %##############################################################
    %#################  2005 Cruise OC412  ########################
    %##############################################################
elseif strcmp(cr_id,'oc412')
    ship_name='Oceanus';
    % ------ Date ------
    date_str='May 9-18, 2005';
    % ------ Nuts datafile  ------
    fname_nuts='oc412_nuts_TS';
    fname_nuts_ext='mat';
    %##############################################################
    %#################  2004 Cruise OC402  ########################
    %##############################################################
elseif strcmp(cr_id,'oc402')
    ship_name='Oceanus';
    % ------ Date ------
    date_str='May 18-28, 2004';
    % ------ Nuts datafile  ------
    fname_nuts='oc402_nuts_TS';
    fname_nuts_ext='mat';
    %##############################################################
    %#################  2003 Cruise OC391  ########################
    %##############################################################
elseif strcmp(cr_id,'oc391')
    ship_name='Oceanus';
    % ------ Date ------
    date_str='May 28 - June 7, 2003';
    note_info='!!! Lost Nuts data: stations 69, 85:90, 113, 235:257';
    % ------ Nuts datafile  ------
    fname_nuts='oc391_nuts_TS';
    fname_nuts_ext='mat';
    %##############################################################
    %#################  TIOGA 2005 Cruises  #######################
    %##############################################################
elseif strcmp(cr_id,'ti096')
    ship_name='Tioga';
    % ------ Date ------
    date_str='May 28-29, 2005';
    % ------ Nuts datafile  ------
    fname_nuts=[cr_id '_nuts_TS'];
    fname_nuts_ext='mat';
elseif strcmp(cr_id,'ti098')
    ship_name='Tioga';
    % ------ Date ------
    date_str='June 3, 2005';
    % ------ Nuts datafile  ------
    fname_nuts=[cr_id '_nuts_TS'];
    fname_nuts_ext='mat';
elseif strcmp(cr_id,'ti100')
    ship_name='Tioga';
    % ------ Date ------
    date_str='June 9-10, 2005';
    % ------ Nuts datafile  ------
    fname_nuts=[cr_id '_nuts_TS'];
    fname_nuts_ext='mat';
elseif strcmp(cr_id,'ti103')
    ship_name='Tioga';
    % ------ Date ------
    date_str='June 16-17, 2005';
    % ------ Nuts datafile  ------
    fname_nuts=[cr_id '_nuts_TS'];
    fname_nuts_ext='mat';
elseif strcmp(cr_id,'ti105')
    ship_name='Tioga';
    % ------ Date ------
    date_str='June 22, 2005';
    % ------ Nuts datafile  ------
    fname_nuts=[cr_id '_nuts_TS'];
    fname_nuts_ext='mat';
elseif strcmp(cr_id,'ti109')
    ship_name='Tioga';
    % ------ Date ------
    date_str='June 28-29, 2005';
    % ------ Nuts datafile  ------
    fname_nuts=[cr_id '_nuts_TS'];
    fname_nuts_ext='mat';
elseif strcmp(cr_id,'ti112')
    ship_name='Tioga';
    % ------ Date ------
    date_str='July 6, 2005';
    % ------ Nuts datafile  ------
    fname_nuts=[cr_id '_nuts_TS'];
    fname_nuts_ext='mat';
    %##############################################################
    %#################  TIOGA 2006 Cruises  #######################
    %##############################################################
elseif strcmp(cr_id,'ti171')
    ship_name='Tioga';
    % ------ Date ------
    date_str='April 11-12, 2006';
    % ------ Nuts datafile  ------
    fname_nuts=[cr_id '_nuts_TS'];
    fname_nuts_ext='mat';
    % ------ Nuts/BTL FILE columns -----
elseif strcmp(cr_id,'ti177')
    ship_name='Tioga';
    % ------ Date ------
    date_str='April 25-26, 2006';
    % ------ Nuts datafile  ------
    fname_nuts=[cr_id '_nuts_TS'];
    fname_nuts_ext='mat';
elseif strcmp(cr_id,'ti180')
    ship_name='Tioga';
    % ------ Date ------
    date_str='May 11, 2006';
    fname_nuts=[cr_id '_nuts_TS'];
    fname_nuts_ext='mat';
elseif strcmp(cr_id,'ti181')
    ship_name='Tioga';
    % ------ Date ------
    date_str='May 17-18, 2006';
    % ------ Nuts datafile  ------
    fname_nuts=[cr_id '_nuts_TS'];
    fname_nuts_ext='mat';
elseif strcmp(cr_id,'ti184')
    ship_name='Tioga';
    % ------ Date ------
    date_str='May 24-25, 2006';
    % ------ Nuts datafile  ------
    fname_nuts=[cr_id '_nuts_TS'];
    fname_nuts_ext='mat';
elseif strcmp(cr_id,'ti185')
    ship_name='Tioga';
    % ------ Date ------
    date_str='May 31 - June 1, 2006';
    % ------ Nuts datafile  ------
    fname_nuts=[cr_id '_nuts_TS'];
    fname_nuts_add='_final';
    fname_nuts_ext='mat';
elseif strcmp(cr_id,'ti191')
    ship_name='Tioga';
    % ------ Date ------
    date_str='June 29-30, 2006';
    % ------ Nuts datafile  ------
    fname_nuts=[cr_id '_nuts_TS'];
    fname_nuts_add='_final';
    fname_nuts_ext='mat';
    %##############################################################
    %#################  TIOGA 2007 Cruises  #######################
    %#################   No locations and time  ###################
    %##############  Nuts from Bruce, CTD not available  ##########
    %##############################################################
elseif strcmp(cr_id,'ti229')
    ship_name='Tioga';
    % ------ Date ------
    date_str='May 2-3, 2007';
    % ------ Nuts datafile  ------
    fname_nuts='Keafer_2007_client_w';
    fname_nuts_ext='txt';
    % Columns.
    colCr_nuts=1;
    colSt_nuts=2;
    colDep_nuts=3;
    colNH4_nuts=4;
    colSi_nuts=5;
    colPO4_nuts=6;
    colNO3_nuts=7;
elseif strcmp(cr_id,'ti239')
    ship_name='Tioga';
    % ------ Date ------
    date_str='June 10, 2007';
    % ------ Nuts datafile  ------
    fname_nuts='Keafer_2007_client_w';
    fname_nuts_ext='txt';
    % Columns.
    colCr_nuts=1;
    colSt_nuts=2;
    colDep_nuts=3;
    colNH4_nuts=4;
    colSi_nuts=5;
    colPO4_nuts=6;
    colNO3_nuts=7;
elseif strcmp(cr_id,'ti245')
    ship_name='Tioga';
    % ------ Date ------
    date_str='July 12, 2007';
    % ------ Nuts datafile  ------
    fname_nuts='Keafer_2007_client_w';
    fname_nuts_ext='txt';
    % Columns.
    colCr_nuts=1;
    colSt_nuts=2;
    colDep_nuts=3;
    colNH4_nuts=4;
    colSi_nuts=5;
    colPO4_nuts=6;
    colNO3_nuts=7;
elseif strcmp(cr_id,'ti261')
    ship_name='Tioga';
    % ------ Date ------
    date_str='September 18, 2007';
    % ------ Nuts datafile  ------
    fname_nuts='Keafer_2007_client_w';
    fname_nuts_ext='txt';
    % Columns.
    colCr_nuts=1;
    colSt_nuts=2;
    colDep_nuts=3;
    colNH4_nuts=4;
    colSi_nuts=5;
    colPO4_nuts=6;
    colNO3_nuts=7;
    %##############################################################
    %#################  TIOGA 2008 Cruises  #######################
    %#####################    No Nuts   ###########################
    %##############################################################
elseif strcmp(cr_id,'ti303')
    disp([cr_id ' !!!!!! No Nuts']);
    return;
    ship_name='Tioga';
    % ------ Date ------
    date_str='May 15-16, 2008';
    % ------ Nuts datafile  ------
    fname_nuts='';
    fname_nuts_ext='mat';
elseif strcmp(cr_id,'ti313')
    disp([cr_id ' !!!!!! No Nuts']);
    return;
    ship_name='Tioga';
    % ------ Date ------
    date_str='June 16-17, 2008';
    % ------ Nuts datafile  ------
    fname_nuts='';
    fname_nuts_ext='mat';
elseif strcmp(cr_id,'ti314')
    disp([cr_id ' !!!!!! No Nuts']);
    return;
    ship_name='Tioga';
    % ------ Date ------
    date_str='June 18 and 20, 2008';
    % ------ Nuts datafile  ------
    fname_nuts='';
    fname_nuts_ext='mat';
elseif strcmp(cr_id,'ti326')
    disp([cr_id ' !!!!!! No Nuts']);
    return;
    ship_name='Tioga';
    % ------ Date ------
    date_str='July 29-30, 2008';
    % ------ Nuts datafile  ------
    fname_nuts='';
    fname_nuts_ext='mat';
    %##############################################################
    %#################  TIOGA 2009 Cruises  #######################
    %##############################################################
elseif strcmp(cr_id,'ti383')
    ship_name='Tioga';
    % ------ Date ------
    date_str='July 12, 2009';
    % ------ Nuts datafile  ------
    fname_nuts='ti383_nuts_TS';
    fname_nuts_ext='txt';
elseif strcmp(cr_id,'ti386')
    ship_name='Tioga';
    % ------ Date ------
    date_str='July 19-23, 2009';
    % ------ Nuts datafile  ------
    fname_nuts='ti386_nuts_TS';
    fname_nuts_ext='txt';
    %##############################################################
    %#################  TIOGA 2013 Cruises  #######################
    %##############################################################
elseif strcmp(cr_id,'ti661')
    ship_name='Tioga';
    % ------ Date ------
    date_str='April 28, 2013';
    % ------ Nuts datafile  ------
    fname_nuts='MERHAB_bottlefile_2013_DMc_w_ti661';
    fname_nuts_ext='txt';
elseif strcmp(cr_id,'ti667')
    ship_name='Tioga';
    % ------ Date ------
    date_str='May 14-16, 2013';
    % ------ Nuts datafile  ------
    fname_nuts='MERHAB_bottlefile_2013_DMc_w_ti667';
    fname_nuts_ext='txt';
elseif strcmp(cr_id,'ti670')
    ship_name='Tioga';
    % ------ Date ------
    date_str='May 30-31, 2013';
    % ------ Nuts datafile  ------
    fname_nuts='MERHAB_bottlefile_2013_DMc_w_ti670';
    fname_nuts_ext='txt';
elseif strcmp(cr_id,'ti672')
    ship_name='Tioga';
    % ------ Date ------
    date_str='Jine 12-13, 2013';
    % ------ Nuts datafile  ------
    fname_nuts='MERHAB_bottlefile_2013_DMc_w_ti672';
    fname_nuts_ext='txt';
elseif strcmp(cr_id,'ti677')
    ship_name='Tioga';
    % ------ Date ------
    date_str='July 8-9, 2013';
    % ------ Nuts datafile  ------
    fname_nuts='MERHAB_bottlefile_2013_DMc_w_ti677';
    fname_nuts_ext='txt';
    %##############################################################
    %#################  TIOGA 2014 Cruises  #######################
    %##############################################################
elseif strcmp(cr_id,'ti747')
    ship_name='Tioga';
    % ------ Date ------
    date_str='May 2-3, 2014';
    % ------ Nuts datafile  ------
    fname_nuts='MERHAB_bottlefile_2014_ti747_w';
    fname_nuts_ext='txt';
elseif strcmp(cr_id,'ti751')
    ship_name='Tioga';
    % ------ Date ------
    date_str='May 20-22, 2014';
    % ------ Nuts datafile  ------
    fname_nuts='MERHAB_bottlefile_2014_ti751_w';
    fname_nuts_ext='txt';
elseif strcmp(cr_id,'ti758')
    ship_name='Tioga';
    % ------ Date ------
    date_str='June 15-17, 2014';
    % ------ Nuts datafile  ------
    fname_nuts='MERHAB_bottlefile_2014_ti758_w';
    fname_nuts_ext='txt';
elseif strcmp(cr_id,'ti762')
    ship_name='Tioga';
    % ------ Date ------
    date_str='July 10-12, 2014';
    % ------ Nuts datafile  ------
    fname_nuts='MERHAB_bottlefile_2014_ti762_w';
    fname_nuts_ext='txt';
    %##############################################################
    %#################  TIOGA 2015 Cruises  #######################
    %##############################################################
elseif strcmp(cr_id,'ct001')
    ship_name='Connecticut';
    % ------ Date ------
    date_str='May 7, 2015';
    % ------ Nuts datafile  ------
    fname_nuts='MERHAB_bottlefile_2015_DMc_RVCT1_w';
    fname_nuts_ext='txt';
    % ------ Nuts/Chl/ (Maura's) - columns.
    colSt_nuts=1;
    colDep_nuts=3;
    colYear_nuts=4;
    colMonth_nuts=5;
    colDay_nuts=6;
    colTime_nuts=7;
    colLat_nuts=8;
    colLon_nuts=9;
    colNO3_nuts=10;
    colSi_nuts=11;
    colNH4_nuts=12;
    colPO4_nuts=13;
elseif strcmp(cr_id,'ti813')
    ship_name='Tioga';
    % ------ Date ------
    date_str='June 17-18, 2015';
    % ------ Nuts datafile  ------
    fname_nuts='MERHAB_bottlefile_2015_DMc_ti813_w';
    fname_nuts_ext='txt';
    % ------ Nuts/Chl/ (Maura's) - columns.
    colSt_nuts=3;
    colYear_nuts=4;
    colMonth_nuts=5;
    colDay_nuts=6;
    colTime_nuts=7;
    colLat_nuts=8;
    colLon_nuts=9;
    colDep_nuts=12;
    colAlex_nuts=13;
    colSal_nuts=19;
    colPres_nuts=22;
    colTemp_nuts=23;
    colNO3_nuts=15;
    colSi_nuts=16;
    colNH4_nuts=17;
    colPO4_nuts=18;
elseif strcmp(cr_id,'ti817')
    ship_name='Tioga';
    % ------ Date ------
    date_str='July 7-8, 2015';
    % ------ Nuts datafile  ------
    fname_nuts='MERHAB_bottlefile_2015_DMc_ti817_corr_w';
    fname_nuts_ext='txt';
    % ------ Nuts/Chl/ (Maura's) - columns.
    colSt_nuts=3;
    colYear_nuts=4;
    colMonth_nuts=5;
    colDay_nuts=6;
    colTime_nuts=7;
    colLat_nuts=8;
    colLon_nuts=9;
    colDep_nuts=12;
    colAlex_nuts=13;
    colSal_nuts=19;
    colPres_nuts=22;
    colTemp_nuts=23;
    colNO3_nuts=15;
    colSi_nuts=16;
    colNH4_nuts=17;
    colPO4_nuts=18;
elseif strcmp(cr_id,'ct004')
    ship_name='Connecticut';
    % ------ Date ------
    date_str='August 6-7, 2015';
    % ------ Nuts datafile  ------
    fname_nuts='MERHAB_bottlefile_2015_DMc_RVCT4_w';
    %fname_nuts='Tioga_383_w'; % oiginal Maura's Nuts file
    fname_nuts_ext='txt';
    % ------ Nuts/Chl/ (Maura's) - columns.
    colSt_nuts=2;
    colYear_nuts=3;
    colMonth_nuts=4;
    colDay_nuts=5;
    colTime_nuts=6;
    colLat_nuts=7;
    colLon_nuts=8;
    colDep_nuts=11;
    colAlex_nuts=12;
    colNO3_nuts=14;
    colSi_nuts=15;
    colNH4_nuts=16;
    colPO4_nuts=17;
    colSal_nuts=18;
    colPres_nuts=21;
    colTemp_nuts=22;
else
    return;
end
% Cruise title.
cruise_title=['R/V ' ship_name ' ' crName];
%*****************************************************************
%*********************    Paths, names      **********************
%*****************************************************************
if (year>=2003 & year<=2006) | year==2009
    path_name_part_2='with_nomDepth';
    path_name_nuts=[path_name_part_1 num2str(year) '/nuts_TS_' path_name_part_2 '/'];
    time_type='(UTC Time)';
else
    path_name_part_2='';
    path_name_nuts=[path_name_part_1 num2str(year) '/'];
    time_type='(Local Time)';
end
%*********************************
% OCEANUS and TIOGA NUTS data file format _ Nuts/TS/Nominal depth merged files.
%*********************************
if strcmp(path_name_part_2,'with_nomDepth')
    fname_nuts=[fname_nuts '_' path_name_part_2 fname_nuts_add];
    % Columns.
    colSt_nuts=1;
    colDate_nuts=2;
    colTime_nuts=3;
    colLat_nuts=4;
    colLon_nuts=5;
    colPres_nuts=6;
    colTemp_nuts=7;
    colSal_nuts=8;
    colNH4_nuts=9;
    colSi_nuts=10;
    colPO4_nuts=11;
    colNO3_nuts=12;
    if strcmp(cr_id,'ti386')
        colDep_nuts=15;
        colChl_nuts=13;
        colPhaeo_nuts=14;
    else
        colDep_nuts=13;
    end
elseif year==2014 & strcmp(cr_id(1:2),'ti')
    % ------ Nuts/Chl/ (Maura's) - columns.
    if strcmp(cr_id,'ti747')
        colSt_nuts=1;
        colYear_nuts=2;
        colMonth_nuts=3;
        colDay_nuts=4;
        colLatDeg_nuts=6;
        colLatMin_nuts=7;
        colLonDeg_nuts=8;
        colLonMin_nuts=9;
        colDep_nuts=10;
        colNO3_nuts=12;
        colSi_nuts=13;
        colNH4_nuts=14;
        colPO4_nuts=15;
    else
        colSt_nuts=1;
        colYear_nuts=3;
        colMonth_nuts=4;
        colDay_nuts=5;
        colTime_nuts=6;
        colLat_nuts=11;
        colLon_nuts=12;
        colDep_nuts=14;
        colAlex_nuts=15;
        colChl_nuts=[];
        colPhaeo_nuts=[];
        colSal_nuts=22;
        colPres_nuts=24;
        colTemp_nuts=25;
        colNO3_nuts=18;
        colSi_nuts=19;
        colNH4_nuts=20;
        colPO4_nuts=21;
    end
elseif year==2013
    % ------ Nuts/Chl/ (Maura's) - columns.
    colSt_nuts=1;
    colYear_nuts=3;
    colMonth_nuts=4;
    colDay_nuts=5;
    colTime_nuts=6;
    colLat_nuts=11;
    colLon_nuts=12;
    colDep_nuts=14;
    colAlex_nuts=21;
    colSal_nuts=23;
    colPres_nuts=25;
    colTemp_nuts=26;
    colNO3_nuts=17;
    colSi_nuts=18;
    colNH4_nuts=19;
    colPO4_nuts=20;
    colChl_nuts=[];
    colPhaeo_nuts=[];
end
%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%@@@@@@@@@@@@@@@@@ LOAD  NUTS DATA - ONE CRUISE @@@@@@@@@@@@@@@@@@
%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
if ~isempty(fname_nuts)
    p=['load ' path_name_nuts fname_nuts '.' fname_nuts_ext];
    eval(p);
    p=['data_nuts=' fname_nuts ';'];
    eval(p);
    % 2007 Tioga data file includes all cruises, select one cruise data.
    if year==2007 & strcmp(cr_id(1:2),'ti')
        r_cr=find(data_nuts(:,colCr_nuts)==cr_num);
        data_nuts=data_nuts(r_cr,:);
    end
    %--------------------------------------------
    %--------  C O R R E C T I O N   ------------
    %--------------------------------------------
    %nuts_correction='yes';
    nuts_correction='no';
    if strcmp(nuts_correction,'yes')
        % --- Bad NH4 -----
        % oc391, oc402, oc412, oc425 NH4 does not look reasonable.
        if strcmp(cr_id,'oc425') | strcmp(cr_id,'oc412') | strcmp(cr_id,'oc402') | ...
                strcmp(cr_id,'oc391')
            data_nuts(:,colNH4_nuts)=nan(size(data_nuts,1),1);
        end
    end % For if strcmp(nuts_correction,'yes')
    %--------------------------------------------
    % Equate negative Phaeo to zero ----
    if ~isempty(colPhaeo_nuts)
        r_minus=find(data_nuts(:,colPhaeo_nuts)<0);
        data_nuts(r_minus,colPhaeo_nuts)=0;
    end
    st_list=unique(data_nuts(:,colSt_nuts));
else
    disp([cr_id ' Nuts are not available']);
    return;
end % For if ~isempty(fname_nuts)
% Rename variables (for my convenience).
data_m=data_nuts;
colSt_m=colSt_nuts;
colDate_m=colDate_nuts;
colYear_m=colYear_nuts;
colMonth_m=colMonth_nuts;
colDay_m=colDay_nuts;
colTime_m=colTime_nuts;
colDep_m=colDep_nuts;
colLat_m=colLat_nuts;
colLon_m=colLon_nuts;
colLatDeg_m=colLatDeg_nuts;
colLatMin_m=colLatMin_nuts;
colLonDeg_m=colLonDeg_nuts;
colLonMin_m=colLonMin_nuts;
colTemp_m=colTemp_nuts;
colSal_m=colSal_nuts;
%********************************************************
%******************  LOOP: PARAMETERS  ******************
%********************************************************
parNum_list=1:10;
plot_count=0;
for parNum=parNum_list
    plot_count=plot_count+1;
    if plot_count==1
        %################################################################
        %######################  MENU: SELECT STATION ###################
        %################################################################
        stNum_select=f_menu_of_numbers_title('Station',st_list');
        if isempty(stNum_select), return; end
        %################################################################
        figure;
        set(gcf,'color',[1 1 1],'position',fig_pos,...
            'paperPositionMode','auto');
        plot_rows=3;
        plot_cols=4;
        % Variables to control Axes size and location:
        kx=1.2;
        ky=1.12;
        dx_ax=-0.4;
        dy_ay=-0.27;
        ddx=0.2;
        ddy=0.03;
        %*************************
        % Make a matrix with subplot positions.
        %*************************
        POS=[];
        for ijj=1:(plot_rows*plot_cols) % LOOP 2
            subplot(plot_rows,plot_cols,ijj);
            POS=[POS;get(gca,'Position')];
        end
        clf;
    end
    %*************************
    % Set axes position
    %*************************
    axPos=POS(plot_count,:);
    rNum=floor((plot_count-1)/plot_cols)+1;
    cNum=plot_count-(rNum-1)*plot_cols;
    d_x = ddx * (cNum-1);
    d_y = ddy * (rNum-1);
    h(plot_count)=axes('position',[axPos(1)+axPos(3)*(dx_ax+d_x) axPos(2)+axPos(4)*(dy_ay+d_y) axPos(3)*kx axPos(4)*ky]);
    hold on;
    %***********************************************************
    %******* CONSTANTS depending on Parameter name *************
    %***********************************************************
    switch parNum
        case 1
            colNum_nuts=colTemp_nuts;
            jN='temp';
            parName_lbl='Temperature ( \circC )';
            jnn='Temperature';
        case 2
            colNum_nuts=colSal_nuts;
            jN='sal';
            parName_lbl='Salinity (psu)';
            jnn='Salinity';
        case 3
            colNum_nuts=colChl_nuts;
            jN='chl';
            parName_lbl='Chlorophyll a (ug/L)';
            jnn='Chlorophyll a';
        case 4
            colNum_nuts=colPhaeo_nuts;
            jN='phaeo';
            parName_lbl='Phaeopigments (ug/L)';
            jnn='Phaeopigments';
        case 5
            colNum_nuts=colNO3_nuts;
            jN='NO3';
            parName_lbl='Nitrate+Nitrite (uM)';
            jnn='Nitrate+Nitrite';
        case 6
            colNum_nuts= colSi_nuts;
            jN='Si';
            parName_lbl='Silicate (uM)';
            jnn='Silicate';
        case 7
            colNum_nuts=colNH4_nuts;
            jN='NH4';
            parName_lbl='Ammonium (uM)';
            jnn='Ammonium';
        case 8
            colNum_nuts=colPO4_nuts;
            jN='PO4';
            parName_lbl='Phosphate (uM)';
            jnn='Phosphate';
        case 9
            colNum_nuts=[];
            jnn='TS Diagram';
        case 10
            colNum_nuts=[];
            jnn='Stations Locations';
    end
    jnn_note=jnn;
    colNum_m=colNum_nuts;
    %################################################################
    % Selected station data.
    %################################################################
    r_st_m=find(data_m(:,colSt_m)==stNum_select);
    if stNum_select-floor(stNum_select)>0.1-0.000001 & ...
            stNum_select-floor(stNum_select)<0.1+0.000001
        % UW stations.
        st_selected_uw='yes';
        stNum_select_str=[num2str(floor(stNum_select)) 'UW'];
    elseif strcmp(cr_id,'oc425') & ...
            stNum_select-floor(stNum_select)>0.2-0.000001 & ...
            stNum_select-floor(stNum_select)<0.2+0.000001
        % High Resolution stations.
        st_selected_uw='no';
        stNum_select_str=[num2str(floor(stNum_select)) '(High Resolution)'];
    else
        st_selected_uw='no';
        stNum_select_str=num2str(stNum_select);
    end
    %**************************
    % Selected station Date/Time.
    %**************************
    % Date vector.
    if ~isempty(colDate_m)
        st_yyyymmdd=data_m(r_st_m(1),colDate_m);
        date_vector = f_yyyymmdd2datevec(st_yyyymmdd);
    elseif ~isempty(colYear_m)
        date_vector = data_m(r_st_m(1),[colYear_m colMonth_m colDay_m]);
    else
        date_vector=[];
    end
    % Time vector.
    if ~isempty(colTime_m)
        st_hhmm=data_m(r_st_m(1),colTime_m);
        time_vector = f_hhmm2timevec(st_hhmm);
    else
        time_vector=[0 0];
    end
    % Date/Time string.
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%% CORRECTION 7/6/2016 %%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %if ~isempty(date_vector) % - OLD
    if ~isempty(date_vector)  % NEW
        if sum(isnan(date_vector(:)))==0 & sum(isnan(time_vector(:)))==0
            st_date_str=datestr([date_vector time_vector 0]);
            time_type_print=time_type;
        else
            st_date_str='Date/Time not available';
            time_type_print='';
        end
     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   else
        st_date_str='Date/Time not available';
        time_type_print='';
    end
    %################################################################
    % UW STATIONS.
    %################################################################
    r_uw =find(data_m(:,colSt_m)-floor(data_m(:,colSt_m))>=0.1-0.000001 & ...
        data_m(:,colSt_m)-floor(data_m(:,colSt_m))<=0.1+0.000001);
    %################################################################
    %*****************************************
    %************ PLOT LOCATIONS  ************
    %*****************************************
    if parNum==10 & (~isempty(colLat_m) | ~isempty(colLatDeg_m))
        if ~isempty(colLatDeg_nuts)
            lat=data_m(:,colLatDeg_m) + data_m(:,colLatMin_m)/60;
            lon=data_m(:,colLonDeg_m) + data_m(:,colLonMin_m)/60;
            data_m(:,colLatDeg_m)=lat;
            data_m(:,colLonDeg_m)=lon;
            colLat_m=colLatDeg_m;
            colLon_m=colLonDeg_m;
        end
        if nansum(data_m(:,colLon_m))<0, data_m(:,colLon_m)=-data_m(:,colLon_m); end
        % Stations location limits.
        Min_Max_location=[min(data_m(:,colLat_m)) max(data_m(:,colLat_m))
            min(data_m(:,colLon_m)) max(data_m(:,colLon_m))];
        %******************************
        % Plot coast line.
        %******************************
        if strcmp(drawCoast,'yes')
            p=['load ' path_name_part_1 'coast_ecohab.dat;'];
            eval(p);
            ind=find(~isnan(coast_ecohab(:,1)));
            plot(-coast_ecohab(ind,1),coast_ecohab(ind,2),'.','color',bnd_color,'markersize',1);
        end
        %******************************
        % All stations location.
        %******************************
        if ~isempty(r_uw)
            plot(data_m(r_uw,colLon_m),data_m(r_uw,colLat_m),'x','markersize',6,...
                'markerEdgeColor',[0.6 0.6 1],'markerFaceColor',[0.6 0.6 1],'linewidth',1);
            data_c=data_m;
            data_c(r_uw,:)=[];
            plot(data_c(:,colLon_m),data_c(:,colLat_m),'o','markersize',3,...
                'markerEdgeColor',[0.6 0.6 1],'markerFaceColor',[0.6 0.6 1]);
        else
            plot(data_m(:,colLon_m),data_m(:,colLat_m),'o','markersize',3,...
                'markerEdgeColor',[0.6 0.6 1],'markerFaceColor',[0.6 0.6 1]);
        end
        axis([lonmin lonmax latmin latmax]);    % Range
        set(gca,'FontSize',fnt_ax,'box','on',...
            'xdir','reverse',...
            'ticklength',get(gca,'ticklength')*0.9,'tickdir','out','fontName','times');
        ah=get(gca,'position');
        set(gca,'position',[ah(1)+ah(3)*0.5 ah(2)-ah(4)*0.255 ah(3)*1.45 ah(4)*1.45]);
        set(gca,'PlotBoxAspectRatio',[1 relyx*1 1]);
        %******************************
        % SELECTED station location.
        %******************************
        latSt_m=data_m(r_st_m,colLat_m);
        lonSt_m=data_m(r_st_m,colLon_m);
        if strcmp(st_selected_uw,'yes')
            plot(lonSt_m,latSt_m,'rx','markersize',6,'linewidth',1);
        else
            plot(lonSt_m,latSt_m,'r+','markersize',6,'linewidth',1);
        end
        xlabel('Longitude (\circW)','FontSize',fnt_lbl,'fontName','times');
        ylabel('Latitude (\circN)','FontSize',fnt_lbl,'fontName','times',...
            'verticalAlignment','bottom');
    elseif parNum==9 & ~isempty(colSal_m) & strcmp(st_selected_uw,'no')
        %*****************************************
        % SELECTED station TS DIAGRAM data.
        %*****************************************
        S_select=data_m(r_st_m,colSal_m);
        T_select=data_m(r_st_m,colTemp_m);
        %**********************
        % PLOT ALL data TS DIAGRAM.
        %**********************
        plot(data_m(:,colSal_m),data_m(:,colTemp_m),'o','markersize',2,...
             'markerEdgeColor',[0.7 0.7 0.7],'markerFaceColor',[0.7 0.7 0.7]);
        %**********************
        % PLOT SELECTED station TS DIAGRAM.
        %**********************
         plot( S_select,T_select,'r+-','linewidth',1);
        ah=get(gca,'position');
        set(gca,'FontSize',fnt_ax,'box','on',...
            'ticklength',get(gca,'ticklength')*0.9,'tickdir','out','fontName','times');
        axis square;
        xlabel('Salinity','FontSize',fnt_lbl,'fontName','times');
        ylabel('Temperature (\circC)','FontSize',fnt_lbl,'fontName','times');
    else
        %*****************************************
        % SELECTED station DATA.
        %*****************************************
        parSt_m=data_m(r_st_m,colNum_m);
        depSt_m=data_m(r_st_m,colDep_m);
        r_nan=find(isnan(parSt_m));
        if ~isempty(r_nan)
            parSt_m(r_nan)=[];
            depSt_m(r_nan)=[];
        end
        if ~isempty(parSt_m)
        %**********************
        % PLOT ALL DATA.
        %**********************
              plot(data_m(:,colNum_m),data_m(:,colDep_m),'o','markersize',2,...
                'markerEdgeColor',[0.7 0.7 0.7],'markerFaceColor',[0.7 0.7 0.7]);
        %**********************
        % PLOT SELECTED station DATA.
        %**********************
            plot(parSt_m,depSt_m,'r+-','markersize',6);
            % Set axes properties.
            set(gca,'FontSize',fnt_ax,'box','on',...
                'ydir','reverse',...
                'ticklength',get(gca,'ticklength')*0.9,'tickdir','out','fontName','times');
        else
            % If parameter is not available, plot empty box with text "not available".
            axis([0 1 0 1]);
            str_t(1)={jnn};
            str_t(2)={['Not available']};
            text(0.5,0.5,str_t,'FontSize',fnt_lbl,'horizontalAlignment','center');
            set(gca,'ydir','reverse','visible','off');
        end
        if cNum==1
            ylabel('Depth (m)','FontSize',fnt_lbl,...
                'verticalAlignment','bottom','fontName','times');
        end
    end % For if parNum==10
    hold off;
    title(jnn,'FontSize',fnt_title,'color',[0 0 1]);
    %************************
    % Text - Page title.
    %************************
    if plot_count==2
        x_lim=get(gca,'xlim');
        y_lim=get(gca,'ylim');
        fname_nuts_str=strrep(fname_nuts,'_','\_');
        str_tp(1)={['{ \fontsize{12} \color{blue}' cruise_title ' ' date_str '\rm}']};
        str_tp(2)={['{ \fontsize{12} \color{red} Station #' stNum_select_str '  ' st_date_str ' ' time_type_print  '\rm}']};
        str_tp(3)={['{ \fontsize{9} \color{black} File name: ' fname_nuts_str '.' fname_nuts_ext '\rm}']};
        text(min(x_lim)-1.25*range(x_lim),min(y_lim)-range(y_lim)*0.29,...
            str_tp,...
            'FontSize',fnt_title,'verticalAlignment','middle',...
            'horizontalAlignment','left','fontName','times','color',[0 0 0]);
    end
end % For for parNum=parNum_list
% Min_Max_location
size(data_nuts)