Changeset 136


Ignore:
Timestamp:
Nov 25, 2010, 5:41:04 PM (13 years ago)
Author:
gostiaux
Message:

.fsnet automatically replaced by fsnet in filenames (useful at Coriolis only);
filebase variable replaced by filecell.filebase for clarity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r135 r136  
    15961596end
    15971597
    1598 %% get the root names
    1599 filebase=get(handles.RootName,'String');
    1600 if isempty(filebase)||isequal(filebase,'')
    1601     msgbox_uvmat('ERROR','no input files')
    1602     return
    1603 end
     1598
    16041599
    16051600%check mask if selecetd
     
    16441639    return
    16451640end
     1641filecell
     1642
    16461643nbfield=numel(num1_civ1);
    16471644nbslice=numel(num_a_civ1);
     
    18891886                    par_civ1.maskflag='y';
    18901887                else
    1891                     maskbase=[filebase '_' maskdispl]; %
     1888                    maskbase=[filecell.filebase '_' maskdispl]; %
    18921889                    nbslice_mask=str2num(maskdispl(1:end-4)); %
    18931890                    num1_mask=mod(num1_civ1(ifile)-1,nbslice_mask)+1;
     
    19101907                    if ~isempty(nbslice_grid)
    19111908                        num1_grid=mod(num1_civ1(ifile)-1,nbslice_grid)+1;
    1912                         par_civ1.gridname=[filebase '_' name_generator(gridname,num1_grid,1,'.grid','_i')];
     1909                        par_civ1.gridname=[filecell.filebase '_' name_generator(gridname,num1_grid,1,'.grid','_i')];
    19131910                        if ~exist(par_civ1.gridname,'file')
    19141911                            msgbox_uvmat('ERROR','grid file absent for civ1')
     
    19521949                nbslice_mask=str2num(maskdispl(1:end-4)); %
    19531950                num1_mask=mod(num1_civ1(ifile)-1,nbslice_mask)+1;
    1954                 maskbase=[filebase '_' maskdispl];
     1951                maskbase=[filecell.filebase '_' maskdispl];
    19551952                maskname=name_generator(maskbase,num1_mask,1,'.png','_i');
    19561953            end
     
    20001997                        if ~isempty(nbslice_grid)
    20011998                            num1_grid=mod(num1_civ1(ifile)-1,nbslice_grid)+1;
    2002                             patch1.gridPatch=[filebase '_' name_generator(gridname,num1_grid,1,'.grid','_i')];
     1999                            patch1.gridPatch=[filecell.filebase '_' name_generator(gridname,num1_grid,1,'.grid','_i')];
    20032000                            if ~exist(patch1.gridPatch,'file')
    20042001                                msgbox_uvmat('ERROR','grid file absent for patch1')
     
    20582055                    par_civ2.maskflag='y';
    20592056                else
    2060                     maskbase=[filebase '_' maskdispl]; %
     2057                    maskbase=[filecell.filebase '_' maskdispl]; %
    20612058                    nbslice_mask=str2num(maskdispl(1:end-4)); %
    20622059                    num1_mask=mod(num1_civ2(ifile)-1,nbslice_mask)+1;
     
    20792076                    par_civ2.gridflag='y';
    20802077                    num1_grid=mod(num1_civ2(ifile)-1,nbslice_grid)+1;
    2081                     par_civ2.gridname=[filebase '_' name_generator(gridname,num1_grid,1,'.grid','_i')];
     2078                    par_civ2.gridname=[filecell.filebase '_' name_generator(gridname,num1_grid,1,'.grid','_i')];
    20822079                    if exist(par_civ2.gridname,'file')
    20832080                        par_civ2.gridflag='y';
     
    21252122            else
    21262123                maskdispl=get(handles.mask_fix2,'String');
    2127                 maskbase=[filebase '_' maskdispl]; %
     2124                maskbase=[filecell.filebase '_' maskdispl]; %
    21282125                nbslice_mask=str2num(maskdispl(1:end-4)); %
    21292126                num1_mask=mod(num1_civ2(ifile)-1,nbslice_mask)+1;
     
    21752172                        if ~isempty(nbslice_grid)
    21762173                            num1_grid=mod(num1_civ2(ifile)-1,nbslice_grid)+1;
    2177                             patch2.gridPatch=[filebase '_' name_generator(gridname,num1_grid,1,'.grid','_i')];
     2174                            patch2.gridPatch=[filecell.filebase '_' name_generator(gridname,num1_grid,1,'.grid','_i')];
    21782175                            if ~exist(patch2.gridPatch,'file')
    21792176                                msgbox_uvmat('ERROR','grid file absent for patch2')
     
    22132210            [Rootbat,Filebat,extbat]=fileparts(filename_cmx);
    22142211            filename_bat=fullfile(Rootbat,['job_' Filebat extbat]);
    2215         else
     2212         else
    22162213            filename_bat=filename_cmx;
    22172214        end
     
    22882285%------------------------------------------------------------------------
    22892286filecell=[];%default
    2290 %get the filename root, nomenclature and numbers
     2287
     2288%% get the root names nomenclature and numbers
    22912289filebase=get(handles.RootName,'String');
     2290
     2291if isempty(filebase)||isequal(filebase,'')
     2292    msgbox_uvmat('ERROR','no input files')
     2293    return
     2294end
     2295
     2296filebase=regexprep(filebase,'\.fsnet','fsnet');% temporary fix for cluster Coriolis
     2297filecell.filebase=filebase;
     2298
    22922299browse=get(handles.browse_root,'UserData');
    22932300compare_list=get(handles.compare,'String');
Note: See TracChangeset for help on using the changeset viewer.