Changeset 183 for trunk/src/civ.m
- Timestamp:
- Jan 26, 2011, 5:03:40 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r182 r183 1724 1724 end 1725 1725 end 1726 %test_interp=get(handles.test_interp,'Value');1727 1728 1726 if isfield(sparam,'PatchBin') 1729 1727 if ~exist(sparam.PatchBin,'file') … … 1731 1729 end 1732 1730 end 1733 % if test_interp && isfield(sparam,'PatchNewBin')1734 % if ~exist(sparam.PatchNewBin,'file')1735 % sparam.PatchNewBin=fullfile(path_UVMAT,sparam.PatchNewBin);1736 % end1737 % end1738 1731 if isfield(sparam,'FixBin') 1739 1732 if ~exist(sparam.FixBin,'file') … … 1746 1739 batch_mode=sparam.BatchMode; 1747 1740 end 1748 else1749 % MaxCivProcesses=50;1750 % if isfield(sparam,'MaxCivProcesses')1751 % MaxCivProcesses=str2double(sparam.MaxCivProcesses);1752 % end1753 1741 end 1754 1742 … … 1756 1744 %% get civ1 parameters: 1757 1745 display('files OK, processing...') 1758 %get civ parameters1759 1746 if box_test(1)==1 1760 1747 par_civ1=read_param_civ1(handles,filecell.ima1.civ1{1,1}); … … 1863 1850 cmd=''; 1864 1851 if isunix % check: necessaire aussi en RUN? 1865 %fid=fopen([filename '.cmx'],'w')1866 1852 cmd='#!/bin/bash \n'; 1867 1853 cmd=[cmd '#$ -cwd \n']; … … 1874 1860 civAllxml=set(civAllxml,1,'name','CivDoc'); 1875 1861 end 1876 %filename_cur=filecell.nc.civ1{ifile,j};%output netcdf file1877 1862 [Rootbat,Filebat]=fileparts(filecell.nc.civ1{ifile,j});%output netcdf file (without extention) 1878 1863 flname=fullfile(Rootbat,Filebat); 1879 %filename_cmx(end-1:end+6)='civ1.cmx';%name of cmx file1880 1864 if batch 1881 % [Rootbat,Filebat,extbat]=fileparts(filename_cmx);1882 1865 filename_bat=fullfile(Rootbat,['job_' Filebat]); 1883 1866 else … … 1890 1873 par_civ1.filename_ima_a=filecell.ima1.civ1{ifile,j}; 1891 1874 par_civ1.filename_ima_b=filecell.ima2.civ1{ifile,j}; 1892 %namelog=[fullfile(Rootbat,Filebat) '.civ1.log'];1893 1875 par_civ1.Dt=num2str(time(num2_civ1(ifile),num_b_civ1(j))-time(num1_civ1(ifile),num_a_civ1(j))); 1894 1876 par_civ1.T0=num2str((time(num2_civ1(ifile),num_b_civ1(j))+time(num1_civ1(ifile),num_a_civ1(j)))/2); … … 1943 1925 i_cmd=i_cmd+1; 1944 1926 if isequal(civAll,0) 1945 cmd=[cmd CIV1_CMD(fullfile(Rootbat,Filebat),'',par_civ1,handles,sparam) '\n']; 1927 if(isunix) 1928 cmd=[cmd 'cp -f ' flname '.civ1.cmx ' flname '.cmx\n']; 1929 else 1930 flname=regexprep(flname,'\\','\\\\'); 1931 cmd=[cmd 'copy /Y "' flname '.civ1.cmx" "' flname '.cmx"\n']; 1932 end 1933 cmd=[cmd CIV1_CMD(fullfile(Rootbat,Filebat),'',par_civ1,handles,sparam) '\n'] 1946 1934 else 1947 1935 civAllCmd=[civAllCmd ' civ1 ']; … … 2054 2042 filename_cmx=filecell.nc.civ2{ifile,j};%output netcdf file 2055 2043 filename_cmx([end-1:end+1])=[ 'cmx'];%name of cmx file 2056 % filename_cmx=[filename_cmx 'x'];2057 2044 end 2058 2045 2059 2046 if box_test(4)==1 2060 2047 par_civ2.filename_ima_a=filecell.ima1.civ2{ifile,j}; 2061 %par_civ2.filename_ima_a([end-3:end])=[];%remove .png extension2062 2048 par_civ2.filename_ima_b=filecell.ima2.civ2{ifile,j}; 2063 %par_civ2.filename_ima_b([end-3:end])=[];%remove .png extension2064 2049 [Rootbat,Filebat]=fileparts(filecell.nc.civ2{ifile,j});%output netcdf file (without extention) 2065 %namelog=[fullfile(Rootbat,Filebat) '.civ2.log'];2066 2050 par_civ2.Dt=num2str(time(num2_civ2(ifile),num_b_civ2(j))-time(num1_civ2(ifile),num_a_civ2(j))); 2067 2051 par_civ2.T0=num2str((time(num2_civ1(ifile),num_b_civ2(j))+time(num1_civ2(ifile),num_a_civ2(j)))/2); … … 2115 2099 end 2116 2100 end 2117 %endTESTgrid2118 2101 i_cmd=i_cmd+1; 2119 2102 flname=fullfile(Rootbat,Filebat); … … 2234 2217 if isequal(civAll,1) 2235 2218 save(civAllxml,[filename_cmx([1:end-4]) '.xml']); 2236 %cmd=char({cmd;[CivBin ' -f ' [filename_cmx([1:end-4]) '.xml'] ' ' civAllCmd]});2237 2219 cmd=[cmd CivBin ' -f ' filename_cmx(1:end-4) '.xml ' civAllCmd '\n']; 2238 2220 end … … 2245 2227 fprintf(fid,cmd); 2246 2228 fclose(fid); 2247 %dlmwrite(filename_bat,cmd,'');%write commands in filename_bat2248 2229 if batch 2249 2230 switch batch_mode 2250 2231 case 'sge' 2251 2232 pvalue=num2str((1-ind_answer)*500); 2252 %namelog=[filename_bat '.patch.log'];2253 2233 display(['!qsub -p ' pvalue ' -q civ.q -e ' flname '.errors -o ' flname '.log' ' ' filename_bat]); 2254 2234 eval( ['!qsub -p ' pvalue ' -q civ.q -e ' flname '.errors -o ' flname '.log' ' ' filename_bat]); … … 2258 2238 if(isunix) 2259 2239 cmd_str=['. ' filename_bat]; 2260 % cmd_str=['!at -qb now -f ' filename_bat ' &']; %ou at -qb now -f bad idea...2261 2240 else %case of Windows 2262 2241 cmd_str=['@call "' regexprep(filename_bat,'\\','\\\\') '"'];
Note: See TracChangeset
for help on using the changeset viewer.