Changeset 220 for trunk/src/civ.m
- Timestamp:
- Mar 11, 2011, 12:03:39 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r219 r220 22 22 function varargout = civ(varargin) 23 23 24 % Last Modified by GUIDE v2.5 05-Jan-2011 16:19:3024 % Last Modified by GUIDE v2.5 11-Mar-2011 08:21:21 25 25 % Begin initialization code - DO NOT EDIT 26 26 gui_Singleton = 1; … … 225 225 set(handles.ref_j_civ2,'String',num2str(num_ref_j)); 226 226 set(handles.browse_root,'UserData',browse); 227 if exist('param','var') %varargin the interface is opened from uvmat227 if exist('param','var') && isfield(param,'RootName') && ~isempty(param.RootName)%varargin the interface is opened from uvmat 228 228 RootName_Callback(hObject, eventdata, handles); 229 229 end … … 1711 1711 if isfield(sparam,'CivBin') 1712 1712 if ~exist(sparam.CivBin,'file') 1713 CivBin=sparam.CivBin; 1713 1714 sparam.CivBin=fullfile(path_UVMAT,sparam.CivBin); 1715 if ~exist(sparam.CivBin,'file') 1716 msgbox_uvmat('ERROR',['CIVx binary ' CivBin ' defined in PARAM.xm does not exist']) 1717 return 1718 end 1714 1719 end 1715 1720 end 1716 1721 if isfield(sparam,'Civ1Bin') 1717 1722 if ~exist(sparam.Civ1Bin,'file') 1723 CivBin=sparam.Civ1Bin; 1718 1724 sparam.Civ1Bin=fullfile(path_UVMAT,sparam.Civ1Bin); 1725 if ~exist(sparam.CivBin,'file') 1726 msgbox_uvmat('ERROR',['civ1 binary ' CivBin ' defined in PARAM.xm does not exist']) 1727 return 1728 end 1719 1729 end 1720 1730 end 1721 1731 if isfield(sparam,'Civ2Bin') 1732 CivBin=sparam.Civ2Bin; 1722 1733 if ~exist(sparam.Civ2Bin,'file') 1723 1734 sparam.Civ2Bin=fullfile(path_UVMAT,sparam.Civ2Bin); 1735 if ~exist(sparam.Civ2Bin,'file') 1736 msgbox_uvmat('ERROR',['civ2 binary ' CivBin ' defined in PARAM.xm does not exist']) 1737 return 1738 end 1724 1739 end 1725 1740 end … … 1842 1857 %% MAIN LOOP 1843 1858 time=get(handles.RootName,'UserData'); %get the set of times 1844 civAll=get(handles. Experimental,'Value'); % Boolean for new civ excution method1859 civAll=get(handles.CivAll,'Value'); % Boolean for new civ excution method 1845 1860 super_cmd=[]; 1846 1861 … … 1853 1868 cmd=[cmd '#$ -cwd \n']; 1854 1869 cmd=[cmd 'hostname && date \n']; 1855 cmd=[cmd 'umask 002 \n'];%allow writting access for user group for created files1870 cmd=[cmd 'umask 002 \n'];%allow writting access to created files for user group 1856 1871 end 1857 1872 if civAll … … 2111 2126 else 2112 2127 civAllCmd=[civAllCmd ' civ2 ']; 2113 str=CIV2_CMD_Unified(f ilename_cmx([1:end-4]),namelog,par_civ2);2128 str=CIV2_CMD_Unified(flname,'',par_civ2); 2114 2129 fieldnames=fields(str); 2115 2130 [civAllxml,uid_civ2]=add(civAllxml,1,'element','civ2'); … … 2175 2190 else 2176 2191 patch2.inputFileName=filecell.nc.civ1{ifile,j} ; 2177 patch2.nopt=subdomain_patch 1;2178 patch2.maxdiff=thresh_patch 1;2179 patch2.ro=rho_patch 1;2192 patch2.nopt=subdomain_patch2; 2193 patch2.maxdiff=thresh_patch2; 2194 patch2.ro=rho_patch2; 2180 2195 test_grid=get(handles.get_gridpatch2,'Value'); 2181 2196 if test_grid … … 2216 2231 end 2217 2232 if isequal(civAll,1) 2218 save(civAllxml,[filename_cmx([1:end-4]) '.xml']); 2219 cmd=[cmd CivBin ' -f ' filename_cmx(1:end-4) '.xml ' civAllCmd '\n']; 2233 save(civAllxml,[flname '.xml']); 2234 'TEST' 2235 cmd=[cmd sparam.CivBin ' -f ' flname '.xml ' civAllCmd ' >' flname '.log' '\n'] 2236 'fincmd' 2220 2237 end 2221 2238 % create the .bat file: … … 4124 4141 civ1.mask=par.maskname; 4125 4142 end 4126 civ1.dt= par.Dt;4143 civ1.dt=1%par.Dt; 4127 4144 civ1.unit='pixel'; 4128 4145 civ1.absolut_time_T0=par.T0; … … 4733 4750 %------------------------------------------------------------------- 4734 4751 delete(gcbf) 4752 4753 4754 % --- Executes on button press in CivAll. 4755 function CivAll_Callback(hObject, eventdata, handles) 4756 % hObject handle to CivAll (see GCBO) 4757 % eventdata reserved - to be defined in a future version of MATLAB 4758 % handles structure with handles and user data (see GUIDATA) 4759 4760 % Hint: get(hObject,'Value') returns toggle state of CivAll 4761 4762
Note: See TracChangeset
for help on using the changeset viewer.