Changeset 230
- Timestamp:
- Apr 2, 2011, 10:48:32 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r229 r230 1798 1798 i_cmd=i_cmd+1; 1799 1799 if isequal(civAll,0) 1800 civ1_exe=CIV1_CMD(fullfile(Rootbat,Filebat),'',par_civ1,handles,sparam);%create the parameter file .civ1.cmx and set the execution string civ1_exe 1800 1801 % if(isunix) 1801 1802 % cmd=[cmd 'cp -f ' flname '.civ1.cmx ' flname '.cmx\n']; … … 1804 1805 % cmd=[cmd 'copy /Y "' flname '.civ1.cmx" "' flname '.cmx"\n']; 1805 1806 % end 1806 cmd=[cmd CIV1_CMD(fullfile(Rootbat,Filebat),'',par_civ1,handles,sparam)'\n'];1807 cmd=[cmd civ1_exe '\n']; 1807 1808 else 1808 1809 civAllCmd=[civAllCmd ' civ1 ']; … … 1974 1975 i_cmd=i_cmd+1; 1975 1976 flname=fullfile(Rootbat,Filebat); 1976 cmd_CIV2=CIV2_CMD(flname,[],par_civ2,sparam);%creates the cmx file [fullfile(Rootbat,Filebat) '.civ2.cmx]1977 1977 1978 if isequal(civAll,0) 1978 if(isunix) 1979 cmd=[cmd 'cp -f ' flname '.civ2.cmx ' flname '.cmx\n' cmd_CIV2 '\n']; 1980 else 1981 flname=regexprep(flname,'\\','\\\\'); 1982 cmd=[cmd 'copy /Y "' flname '.civ2.cmx" "' flname '.cmx"\n' cmd_CIV2 '\n']; 1983 end 1979 cmd_CIV2=CIV2_CMD(flname,[],par_civ2,sparam);%creates the cmx file [fullfile(Rootbat,Filebat) '.civ2.cmx] 1980 % if(isunix) 1981 cmd=[cmd cmd_CIV2 '\n']; 1982 % else 1983 % flname=regexprep(flname,'\\','\\\\'); 1984 % cmd=[cmd 'copy /Y "' flname '.civ2.cmx" "' flname '.cmx"\n' cmd_CIV2 '\n']; 1985 % end 1984 1986 else 1985 1987 civAllCmd=[civAllCmd ' civ2 ']; … … 4079 4081 par.filename_ima_a=regexprep(par.filename_ima_a,'.png',''); 4080 4082 par.filename_ima_b=regexprep(par.filename_ima_b,'.png',''); 4081 fid=fopen([filename '.c mx'],'w');4083 fid=fopen([filename '.civ1.cmx'],'w'); 4082 4084 fprintf(fid,['############## CMX file' '\n' ]); 4083 4085 fprintf(fid, ['FirstImage ' regexprep(par.filename_ima_a,'\\','\\\\') '\n' ]);% for windows compatibility … … 4116 4118 % namelog=regexprep(namelog,'\\','\\\\'); 4117 4119 if(isunix) 4118 % filename 4119 % namelog 4120 % 4121 % [Rootbat,Filebat,extbat]=fileparts(namelog); 4122 % ncName=fullfile(Rootbat,[ Filebat '.nc']); 4123 cmd_CIV1=[sparam.Civ1Bin ' -f ' filename '.cmx >' filename '.log' ]; % redirect standard output to the log file, the result file is named [filename '.nc'] by CIVx 4120 cmd_CIV1=['cp -f ' filename '.civ1.cmx ' filename '.cmx\n']; 4121 cmd_CIV1=[cmd_CIV1 sparam.Civ1Bin ' -f ' filename '.cmx >' filename '.log' ]; % redirect standard output to the log file, the result file is named [filename '.nc'] by CIVx 4124 4122 cmd_CIV1=[cmd_CIV1 '\n' 'mv ' filename '.log' ' ' filename '.civ1.log' '\n' 'chmod g+w ' filename '.civ1.log' '\n' 'chmod g+w ' filename '.nc'];%rename .log as .civ1.log and set the netcdf result file for group user writting 4125 cmd_CIV1=[cmd_CIV1 '\n' 'mv ' filename '.cmx' ' ' filename '.civ1.cmx' '\n'];%rename .cmx as .civ1.cmx4123 % cmd_CIV1=[cmd_CIV1 '\n' 'mv ' filename '.cmx' ' ' filename '.civ1.cmx' '\n'];%rename .cmx as .civ1.cmx 4126 4124 else %Windows system 4125 flname=regexprep(flname,'\\','\\\\'); 4126 % cmd=[cmd 'copy /Y "' flname '.civ1.cmx" "' flname '.cmx"\n']; 4127 4127 filename=regexprep(filename,'\\','\\\\'); 4128 cmd_CIV1=['copy /Y "' filename '.civ1.cmx" "' filename '.cmx"\n'];% copy the .civ1.cmx parameter file to .cmx 4128 4129 cmd_CIV1=['"' sparam.Civ1Bin '" -f "' filename '.cmx" >"' filename '.log"' ]; % redirect standard output to the log file 4129 4130 cmd_CIV1=regexprep(cmd_CIV1,'\\','\\\\'); 4130 4131 namelog=regexprep(namelog,'\\','\\\\'); 4131 cmd_CIV1=[cmd_CIV1 '\n' 'copy /Y "' filename '.log' '" "' filename '.civ1.log"']; 4132 cmd_CIV1=[cmd_CIV1 '\n' 'copy /Y "' filename '.cmx' '" "' filename '.civ1.cmx"'];4132 cmd_CIV1=[cmd_CIV1 '\n' 'copy /Y "' filename '.log' '" "' filename '.civ1.log"']; %preserve the log file as .civ1.log 4133 % cmd_CIV1=[cmd_CIV1 '\n' 'copy /Y "' filename '.cmx' '" "' filename '.civ1.cmx"']; 4133 4134 end 4134 4135 … … 4274 4275 4275 4276 if(isunix) 4276 % cmd_CIV1=[sparam.Civ1Bin ' -f ' filename '.cmx >' filename '.log' ]; % redirect standard output to the log file, the result file is named [filename '.nc'] by CIVx 4277 % cmd_CIV1=[cmd_CIV1 '\n' 'mv ' filename '.log' ' ' filename '.civ1.log' '\n' 'chmod g+w ' filename '.nc']; 4278 % cmd_CIV1=[cmd_CIV1 '\n' 'mv ' filename '.cmx' ' ' filename '.civ1.cmx' '\n'];%rename .cmx as .civ1.cmx, the result file is named [filename '.nc'] by CIVx 4279 4280 cmd_CIV2=[sparam.Civ2Bin ' -f ' filename '.cmx >' filename '.log' ]; % redirect standard output to the log file, the result file is named [filename '.nc'] by CIVx 4281 cmd_CIV2=[cmd_CIV2 '\n' 'mv ' filename '.log' ' ' filename '.civ2.log' '\n' 'chmod g+w ' filename '.nc']; 4282 cmd_CIV2=[cmd_CIV2 '\n' 'mv ' filename '.cmx' ' ' filename '.civ2.cmx' '\n'];%rename .cmx as .civ2.cmx, the result file is named [filename '.nc'] by CIVx 4283 % [Rootbat,Filebat,extbat]=fileparts(namelog); 4284 % ncName=fullfile(Rootbat,[ Filebat '.nc']); 4285 % cmd_CIV2=[cmd_CIV2 '\n' 'mv ' namelog ' ' regexprep(namelog,'\.log','') '.civ2.log' '\n' 'chmod g+w ' ncName]; 4277 cmd_CIV2=['cp -f ' filename '.civ2.cmx ' filename '.cmx\n']; 4278 cmd_CIV2=[cmd_CIV2 sparam.Civ2Bin ' -f ' filename '.cmx >' filename '.log' ]; % redirect standard output to the log file, the result file is named [filename '.nc'] by CIVx 4279 cmd_CIV2=[cmd_CIV2 '\n' 'mv ' filename '.log' ' ' filename '.civ2.log' '\n' 'chmod g+w ' filename '.nc'];%preserve the log file as .civ2.log 4280 % cmd_CIV2=[cmd_CIV2 '\n' 'mv ' filename '.cmx' ' ' filename '.civ2.cmx' '\n'];%rename .cmx as .civ2.cmx, the result file is named [filename '.nc'] by CIVx 4281 4286 4282 else 4287 4283 filename=regexprep(filename,'\\','\\\\'); 4288 cmd_CIV2=['"' sparam.Civ2Bin '" -f "' filename '.cmx" >"' filename '.log"' ]; % redirect standard output to the log file 4284 cmd_CIV2=['copy /Y "' filename '.civ2.cmx" "' filename '.cmx"\n']; 4285 cmd_CIV2=[cmd_CIV2 '"' sparam.Civ2Bin '" -f "' filename '.cmx" >"' filename '.log"' ]; % redirect standard output to the log file 4289 4286 cmd_CIV2=regexprep(cmd_CIV2,'\\','\\\\'); 4290 4287 cmd_CIV2=[cmd_CIV2 '\n' 'copy /Y "' filename '.log' '" "' filename '.civ2.log"']; 4291 cmd_CIV2=[cmd_CIV2 '\n' 'copy /Y "' filename '.cmx' '" "' filename '.civ2.cmx"'];4288 % cmd_CIV2=[cmd_CIV2 '\n' 'copy /Y "' filename '.cmx' '" "' filename '.civ2.cmx"']; 4292 4289 end 4293 4290
Note: See TracChangeset
for help on using the changeset viewer.