Changeset 446 for trunk/src/civ.m


Ignore:
Timestamp:
Jun 11, 2012, 9:33:54 AM (13 years ago)
Author:
sommeria
Message:

series rationalized. TO BE TESTED.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r444 r446  
    10211021
    10221022
    1023 %--------------orm----------------------------------------------------------
     1023%------------------------------------------------------------------------
    10241024% --- Main lauch command, called by RUN and BATCH
    10251025function errormsg=launch_jobs(hObject, eventdata, handles, batch)
    1026 %-----------------------------------------------------------------------
     1026%------------------------------------------------------------------------
    10271027errormsg='';%default
    10281028
     
    10761076if isfield(handles,'status')
    10771077    set(handles.status,'Value',0);%suppress status display
    1078     status_Callback(hObject, eventdata, handles)
     1078    status_Callback([], [], handles)
    10791079end
    10801080
     
    21002100                detect=exist(filename,'file')==2;
    21012101                if detect% if a netcdf file already exists
    2102                     r=regexp(subdir_civ1_new,'(?<root>.*\D)(?<num1>\d+)$','names');%detect whether name ends by a number
    2103                     if isempty(r)
    2104                         r(1).root=[subdir_civ1_new '_'];
    2105                         r(1).num1='0';
     2102                    answer=msgbox_uvmat('INPUT_Y-N',['delete files in ' subdir_civ1_new]);
     2103                    if ~strcmp(answer,'Yes')
     2104                        r=regexp(subdir_civ1_new,'(?<root>.*\D)(?<num1>\d+)$','names');%detect whether name ends by a number
     2105                        if isempty(r)
     2106                            r(1).root=[subdir_civ1_new '_'];
     2107                            r(1).num1='0';
     2108                        end
     2109                        subdir_civ1_new=[r(1).root num2str(str2num(r(1).num1)+1)];%increment the index by 1 or put 1
     2110                        subdir_civ2=subdir_civ1_new;
    21062111                    end
    2107                     subdir_civ1_new=[r(1).root num2str(str2num(r(1).num1)+1)];%increment the index by 1 or put 1
    2108 %                     indstr=regexp(subdir_civ1_new,'\D');
    2109 %                     if indstr(end)<length(subdir_civ1_new) %subdir_civ1 ends by a number
    2110 %                         vers=str2double(subdir_civ1_new(indstr(end)+1:end))+1;
    2111 %                         subdir_civ1_new=[subdir_civ1_new(1:indstr(end)) num2str(vers)];
    2112 %                     else
    2113 %                         vers=vers+1;
    2114 %                         subdir_civ1_new=[subdir_civ1_new(1:indstr(end)) '_' num2str(vers)];       
    2115 %                     end
    2116                     subdir_civ2=subdir_civ1_new;
    21172112                    break
    21182113                end
Note: See TracChangeset for help on using the changeset viewer.