close all
clear all
clc

eval(['load ' fpath 'FMT.mat']);
eval(['load ' fpath 'grid.mat']);
[nxc nyc nzc] = size(hFacC);
xc  = XC(:,1);yc = YC(1,:);zc = RC;
nt = 5022;

time = rdslice([dpath 'TIME_CCS_2007_2020.bin'],[nt 1],1, fmt, Ieee);

for it = [1 nt]
    u =  rdslice([dpath 'U_SURFACE_MIT_CCS_2007_2020_fulldomain.bin'],[nxc nyc ],it, fmt, Ieee);
    v =  rdslice([dpath 'V_SURFACE_MIT_CCS_2007_2020_fulldomain.bin'],[nxc nyc ],it, fmt, Ieee);
    eta = rdslice([dpath 'Eta_MIT_CCS_2007_2020_fulldomain.bin'],[nxc nyc],it, fmt, Ieee);
    
    figure
    subplot(2,2,1);imagesc(xc,yc,u(:,:,1)');title(['U : ' datestr(time(it))]);colorbar;axis xy
    subplot(2,2,2);imagesc(xc,yc,v(:,:,1)');title(['V : ' datestr(time(it))]);colorbar;axis xy
    subplot(2,2,3);imagesc(xc,yc,eta');title(['Eta : ' datestr(time(it))]);colorbar;axis xy
    
end

