clc;clear all;close all

filename='moc_transports.nc'
time=ncread(filename,'time')
%===== 2004/04/01 - 2023/9/8 =====%
pathi3='/data3/yiwen/cesm2/RAPID_OBS/'
load([pathi3,'moc_transports'])

MOC_mar_hc10(MOC_mar_hc10==-99999)=nan;
MOC_OBS_04=nanmean(MOC_mar_hc10(1:275*3));

num_iterations = 22-4;
MOC_OBS = cell(1, num_iterations);
start_idx = 275*3;
for i = 1:num_iterations
    end_idx = start_idx + 364*3;
    MOC_OBS_yr{i} = nanmean(MOC_mar_hc10(start_idx:end_idx));   
    start_idx = end_idx + 1;
end

MOC_OBS_23=nanmean(MOC_mar_hc10(end-364:end));
MOC_OBS_total={MOC_OBS_04 MOC_OBS_yr{:} MOC_OBS_23}

MOC_OBS_total = cell2mat( MOC_OBS_total )

%====================================%
% 12-hourly, 10-day low pass filtered
%====================================%

















