close all
clear all
clc
load FMT.mat
load MIT_PALAU_1_6DEG_LATLON.mat

nx = length(X);nxu = length(XU);nyu = length(YU);
ny = length(Y);nxv = length(XV); nyv = length(YV);
nz = length(Z);
nt = 3287;
time = rdslice(['TIME_PALAU_BIG_2009_2017.bin'],[nt 1],1, fmt, Ieee);

for it = [1 nt]
    t =  rdslice([ 'T_MIT_PALAU_BIG_1_6DEG_2009_2017.bin'],[nx ny nz],it, fmt, Ieee);
    s =  rdslice([ 'S_MIT_PALAU_BIG_1_6DEG_2009_2017.bin'],[nx ny nz],it, fmt, Ieee);
    u =  rdslice([ 'U_MIT_PALAU_BIG_1_6DEG_2009_2017.bin'],[nxu nyu nz],it, fmt, Ieee);
    v =  rdslice([ 'V_MIT_PALAU_BIG_1_6DEG_2009_2017.bin'],[nxv nyv nz],it, fmt, Ieee);
    eta = rdslice([ 'Eta_MIT_PALAU_BIG_1_6DEG_2009_2017.bin'],[nx ny],it, fmt, Ieee);
    
    figure
    subplot(2,3,1);imagesc(X,Y,t(:,:,1)');title(['T : ' datestr(time(it))]);colorbar
    subplot(2,3,2);imagesc(X,Y,s(:,:,1)');title(['S : ' datestr(time(it))]);colorbar
    subplot(2,3,3);imagesc(XU,YU,u(:,:,1)');title(['U : ' datestr(time(it))]);colorbar
    subplot(2,3,4);imagesc(XV,YV,v(:,:,1)');title(['V : ' datestr(time(it))]);colorbar
    subplot(2,3,5);imagesc(X,Y,eta');title(['Eta : ' datestr(time(it))]);colorbar
    
end
