function malujdens(dfile,nn,x0,x1,y0,y1);
% Matlab function for drawing zoom of the grid
  
  ncfile = netcdf(dfile,'nowrite');
  rho = ncfile{'rho'};
  ener = ncfile{'ener'};
  x = ncfile{'x'};
  y = ncfile{'y'};
  xc = ncfile{'xc'};
  yc = ncfile{'yc'};
  
  rmin = min(min(min(rho(:))));
  rmax = max(max(max(rho(:))));
  
  prho  = rho(nn,:,:)';
  pener = ener(nn,:,:)';
  nic = size(pener,1);
  njc = size(pener,2);
  nin = nic + 1;
  njn = njc + 1;
% move the problem to [zero,zero] position  
  px   = (x(nn,:,:)' - 1.5*ones(nin,njn));
  py   = (y(nn,:,:)' - 1.5*ones(nin,njn));
  pxc  = (xc(nn,:,:)' - 1.5*ones(nic,njc));
  pyc  = (yc(nn,:,:)' - 1.5*ones(nic,njc));

%  hf = figure(1);
  aa = axes;
  set(aa,'FontSize',16);
%  set(hf,'Position',[100,100,1000,1000]);
%  pp = get(hf,'PaperPosition');
%  pp(2) = pp(2) - 1.4;
%  pp(4) = pp(4) - 3.5;
%  set(hf,'Position',[10,10,1500,1500*(y1-y0)/(x1-x0)],'PaperPosition',pp);
  hold on;
  plot(px,py,'-k','LineWidth',1);
  plot(px',py','-k','LineWidth',1);
  plot(px,py,'-k');
  plot(px',py','-k');
%  plot(pxc,pyc,'*g','LineWidth',2);
  axis equal;
%  axis off;
  axis([x0 x1 y0 y1]); 

  if (1==1)
  pcolor(pxc,pyc,prho);
  shading interp;
% this doesnot work very well, draws in dual cells
% instead, do it as polygons; slower, but exctely what we want

  else
  for i=1:nic
    for j=1:njc
      n1x = px(i,j);
      n1y = py(i,j);
      n2x = px(i+1,j);
      n2y = py(i+1,j);
      n3x = px(i+1,j+1);
      n3y = py(i+1,j+1);
      n4x = px(i,j+1);
      n4y = py(i,j+1);
  
      fill([n1x n2x n3x n4x],[n1y n2y n3y n4y],prho(i,j));
%      [i j e1(i,j) e2(i,j) e3(i,j) e(i,j)]
    end
  end
  end
  
  colormap(jet);
  caxis([rmin rmax]);
  
%  cb = colorbar;
%  cb_values = [0 1/3 2/3 0.99];
%  cb_labels = {'0'; '1.e10'; '1.e11'; '8.e11'};
%  set(cb,'YTick',cb_values);
%  set(cb,'YTickLabel',cb_labels);
%  cbp = get(cb,'Position');
%  cbp(2) = cbp(2) + 0.01;
%  cbp(4) = cbp(4) - 0.02;
%  set(cb,'Position',cbp,'FontSize',16);
%  set(cb,'FontSize',16);
  
%  xlabel('X [\mum]','FontSize',16);
%  ylabel('Y [\mum]','FontSize',16);
  