%

% initialisation
clear;
close all;

cd('GEOPOT_TROP');

hgt500=zeros(122,29,64,128);

ncload('zg_d.TrNQIVIV.197106-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,1,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.197206-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,2,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.197306-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,3,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.197406-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,4,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.197506-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,5,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.197606-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,6,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.197706-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,7,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.197806-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,8,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.197906-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,9,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.198006-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,10,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.198106-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,11,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.198206-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,12,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.198306-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,13,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.198406-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,14,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.198506-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,15,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.198606-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,16,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.198706-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,17,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.198806-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,18,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.198906-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,19,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.199106-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,20,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.199206-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,21,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.199306-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,22,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.199406-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,23,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.199506-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,24,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.199606-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,25,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.199706-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,26,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.199806-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,27,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.199906-09.nc','zg');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,28,:,:)=vm; clear vm;

ncload('zg_d.TrNQIVIV.200006-09.nc','zg','lat','lon');
vm(:,:,:)=zg(:,6,:,:); clear zg;
hgt500(:,29,:,:)=vm; clear vm;

cd('..');
save hgt500_trop.mat hgt500;
