% set file location
pin='/nobackupp2/dmenemen/llc_4320/regions/GulfStream2/';
eval(['cd ' pin 'matlab']);

% set grid dimension 
nx=2016;
ny=1661;

% read coordinates
XC=readbin([pin 'grid/XC_2016x1661'],[nx ny]); % longitude of cell center
YC=readbin([pin 'grid/YC_2016x1661'],[nx ny]); % latitude of cell center
XG=readbin([pin 'grid/XG_2016x1661'],[nx ny]); % longitude of west edge
YG=readbin([pin 'grid/YG_2016x1661'],[nx ny]); % latitude of south edge

% read fields
ts=10368;
dte=ts2dte(ts,25,2011,9,10);
SST=readbin([pin 'Theta/' myint2str(ts,10) '_Theta_15169.9265.1_2016.1661.1'],[nx ny]);
SSU=readbin([pin 'U/' myint2str(ts,10) '_U_15169.9265.1_2016.1661.1'],[nx ny]);
SSV=readbin([pin 'V/' myint2str(ts,10) '_V_15169.9264.1_2016.1661.1'],[nx ny]);

% plot fields
clf
orient tall
wysiwyg
subplot(311)
quikpcolor(XC(:,1),YC(1,:),SST')
caxis([10 30])
colorbar
title(['SST on ' dte])
subplot(312)
quikpcolor(XG(:,1),YC(1,:),SSU')
caxis([-2 2])
colorbar
title(['SSU on ' dte])
subplot(313)
quikpcolor(XC(:,1),YG(1,:),SSU')
caxis([-2 2])
colorbar
title(['SSV on ' dte])
