Index: trunk/src/series.m
===================================================================
--- trunk/src/series.m	(revision 601)
+++ trunk/src/series.m	(revision 602)
@@ -1430,4 +1430,5 @@
     NbCore=min(NbCore,NbProcess);% at least one process per core
 end
+        
 
 %% read index ranges
@@ -1437,4 +1438,5 @@
 first_j=1;
 last_j=1;
+incr_j=1;
 if isfield(Series.IndexRange,'first_i')
     first_i=Series.IndexRange.first_i;
@@ -1445,4 +1447,5 @@
     first_j=Series.IndexRange.first_j;
     last_j=Series.IndexRange.last_j;
+    incr_j=Series.IndexRange.incr_j;
 end
 if last_i < first_i || last_j < first_j , msgbox_uvmat('ERROR','last field number must be larger than the first one'),...
@@ -1450,4 +1453,15 @@
 else
     BlockLength=ceil(numel(first_i:incr_i:last_i)/NbProcess);
+end
+nbfield_j=numel(first_j:incr_j:last_j);
+
+%% record nbre of output files for status
+StatusData=get(handles.status,'UserData');
+StatusData.NbCore=NbCore;
+StatusData.NbProcess=NbProcess;
+if isfield(StatusData,'OutputFileMode')
+switch StatusData.OutputFileMode
+    case 'NbInput'%TODO:finish
+end
 end
 
@@ -1611,6 +1625,6 @@
             end
         end
-        max_walltime=3600*12; % 12h max
-        walltime_onejob=600;%seconds
+        max_walltime=3600*12; % 12h max total calculation 
+        walltime_onejob=600;%seconds, max estimated time for asingle file index value
         filename_joblist=fullfile(DirOAR,'job_list.txt');%create name of the global executable file
         fid=fopen(filename_joblist,'w');
@@ -1623,5 +1637,5 @@
             '-t idempotent --checkpoint ' num2str(walltime_onejob+60) ' '...
             '-l /core=' num2str(NbCore) ','...
-            'walltime=' datestr(min(1.05*walltime_onejob/86400*max(length(batch_file_list),NbCore)/NbCore,max_walltime/86400),13) ' '...
+            'walltime=' datestr(min(1.05*walltime_onejob/86400*max(NbProcess*BlockLength*nbfield_j,NbCore)/NbCore,max_walltime/86400),13) ' '...
             '-E ' regexprep(filename_joblist,'\.txt\>','.stderr') ' '...
             '-O ' regexprep(filename_joblist,'\.txt\>','.stdout') ' '...
@@ -2023,4 +2037,10 @@
 set(handles.RunMode_title,'Visible',OutputDirVisible)
 set(handles.ActionExt_title,'Visible',OutputDirVisible)
+
+%% Expected nbre of output files
+if isfield(ParamOut,'OutputFileMode')
+StatusData.NbOutputFile=ParamOut.OutputFileMode;
+set(handles.status,'UserData',StatusData)
+end
 
 %% definition of an additional parameter set, determined by an ancillary GUI
@@ -2416,5 +2436,5 @@
     hfig=findobj(allchild(0),'name','series_status');
     if isempty(hfig)
-        hfig=figure('DeleteFcn',@stop_status);
+        hfig=figure('DeleteFcn',@stop_status,'Position',[600 600 560 600]);
         set(hfig,'MenuBar','none')% suppress the menu bar
         set(hfig,'NumberTitle','off')%suppress the fig number in the title
@@ -2492,11 +2512,41 @@
 htitlebox=findobj(hfig,'tag','titlebox');
 hlist=findobj(hfig,'tag','list');
+StatusData=get(hObject,'UserData');
 OutputDir=get(htitlebox,'String');
-ListFiles=dir(OutputDir);
+if ischar(OutputDir),OutputDir={OutputDir};end
+ListFiles=dir(OutputDir{1});
 ListDisplay=cell(numel(ListFiles),1);
+testrecent=0;
+datnum=zeros(numel(ListDisplay)-1,1);
 for ilist=2:numel(ListDisplay)
     ListDisplay{ilist-1}=ListFiles(ilist).name;
+      if ~ListFiles(ilist).isdir && isfield(ListFiles(ilist),'datenum')
+            datnum(ilist)=ListFiles(ilist).datenum;%only available in recent matlab versions
+            testrecent=1;
+       end
 end
 set(hlist,'String',ListDisplay)
+
+%% Look at date of creation
+datnum=datnum(datnum~=0);%keep the non zero values corresponding to existing files
+ListDisplay=ListDisplay(datnum~=0);
+if isempty(datnum)
+    if testrecent
+        message='no civ result created yet';
+    else
+        message='';
+    end
+else
+    [first,indfirst]=min(datnum);
+    [last,indlast]=max(datnum);
+    message={[num2str(numel(datnum)) ' file(s) done over ?'] ;['oldest modification:  ' ListDisplay{indfirst} ' : ' datestr(first)];...
+        ['latest modification:  ' ListDisplay{indlast} ' : ' datestr(last)]};
+end
+titlebox=findobj(hfig,'tag','titlebox');
+msg_old=get(titlebox,'String');
+set(titlebox,'String', [msg_old(1);message])
+hwaitbar=findobj(hfig,'tag','waitbar');
+%TODO: adjust waitbar
+
 % civ_files=get(hfig,'UserData');
 
