Changeset 159 for trunk/src/civ.m


Ignore:
Timestamp:
Dec 23, 2010, 8:09:20 AM (10 years ago)
Author:
sommeria
Message:

bug in civ corrected: civ2 was not lauched for Windows system
various bugs corrections and cleaning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r153 r159  
    15971597index_first=min(index);
    15981598index_last=max(index);
    1599 box_used=box_test([index_first : index_last]);
     1599box_used=box_test(index_first : index_last);
    16001600[box_missing,ind_missing]=min(box_used);
    16011601if isequal(box_missing,0)
     
    18701870        filename_cmx=filecell.nc.civ1{ifile,j};%output netcdf file
    18711871        filename_cmx(end-1:end+1)='cmx';%name of cmx file
     1872        if batch
     1873            [Rootbat,Filebat,extbat]=fileparts(filename_cmx);
     1874            filename_bat=fullfile(Rootbat,['job_' Filebat extbat]);
     1875         else
     1876            filename_bat=filename_cmx;
     1877        end
     1878        filename_bat(end-2:end)='bat';
    18721879       
    18731880        %CIV1
     
    22112218        end
    22122219        % create the .bat file:
    2213         if batch
    2214             [Rootbat,Filebat,extbat]=fileparts(filename_cmx);
    2215             filename_bat=fullfile(Rootbat,['job_' Filebat extbat]);
    2216          else
    2217             filename_bat=filename_cmx;
    2218         end
    2219         filename_bat(end-2:end)='bat';
    2220         fid=fopen(filename_bat,'w');
     2220        [fid,message]=fopen(filename_bat,'w');
     2221        if isequal(fid,-1)
     2222            msgbox_uvmat('ERROR', ['creation of .bat file: ' message])
     2223            return
     2224        end
    22212225        fprintf(fid,cmd);
    22222226        fclose(fid);
     
    22462250
    22472251if ~batch
    2248     [Rootbat,Filebat,extbat]=fileparts(filename_cmx);
     2252    [Rootbat,Filebat,extbat]=fileparts(filename_bat);
    22492253    filename_superbat=fullfile(Rootbat,['job_list.bat']);
    22502254    fid=fopen(filename_superbat,'w');
Note: See TracChangeset for help on using the changeset viewer.