nx=360, ny=160, nt=12; nl=13;
%
fid=fopen('ecco_oasim_esp_below.bin','r','b');
esp=fread(fid,'float32');
esp=reshape(esp,nx,ny,nl,nt);
%
fid=fopen('ecco_oasim_edp_below.bin','r','b');
edp=fread(fid,'float32');
edp=reshape(edp,nx,ny,nl,nt);
%
for il=1:nl,
  clear tmp, tmp=squeeze(edp(:,:,il,:));
  if (il<10), 
     fid=fopen(['ecco_oasim_edp0',num2str(il),'_below.bin'],'w','b'); 
  else
     fid=fopen(['ecco_oasim_edp',num2str(il),'_below.bin'],'w','b'); 
  end
  for it=1:nt,
   clear tmp1, tmp1=squeeze(tmp(:,:,it));
   fwrite(fid,tmp1,'float32');
  end % for
  fclose(fid);
%%
  clear tmp, tmp=squeeze(esp(:,:,il,:));
  if (il<10), fid=fopen(['ecco_oasim_esp0',num2str(il),'_below.bin'],'w','b'); else
  fid=fopen(['ecco_oasim_esp',num2str(il),'_below.bin'],'w','b'); end
  for it=1:nt,
   clear tmp1, tmp1=squeeze(tmp(:,:,it));
   fwrite(fid,tmp1,'float32');
  end % for
  fclose(fid);
end % for

