clc;clear all;close all;clear classes;
ftpobj = ftp('arthurhou.pps.eosdis.nasa.gov','farzaneh_takbiri@yahoo.com','farzaneh_takbiri@yahoo.com');
year={'2015'};
month={'01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'};
day = eomday(2015, 1:12);
path_V1=['/gpmdata/',year{1}];
outputt1 = ['/mnt/lustre2/efoufoula/takbi001/GPROF/',year{1}];
name = ['2A.GPM.GMI.GPROF*','.V04A.HDF5'];
parfor j=2:size(month,2);
path_V2=[path_V1,'/',month{j}];
outputt2 =[outputt1,'/',month{j}];
for k=1:day(j)
path_V = [path_V2,'/',sprintf('%02.0f', k),'/','gprof','/'];
outputt = [outputt2,'/',sprintf('%02.0f', k),'/'];
mkdir(outputt);
cd(ftpobj2,path_V);
pasv(ftpobj2);
mget(ftpobj2,name,outputt);
end
end