Changeset 2175
- Timestamp:
- 09/09/09 17:12:54 (15 years ago)
- Location:
- issm/trunk/src/m/utils/Nightly
- Files:
-
- 2 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/utils/Nightly/runme_core.m
r2173 r2175 1 function md=runme _core(varargin)2 %RUNME _CORE- test deck for ISSM nightly runs1 function md=runme(varargin) 2 %RUNME - test deck for ISSM nightly runs 3 3 % 4 4 % Usage: 5 % md=runme _core(varargin);5 % md=runme(varargin); 6 6 % 7 7 % Examples: 8 % md=runme_core('parallel',1,'update'); 8 % runme; 9 % runme('analysis_type',{'prognostic','diagnostic'}); 10 % runme('analysis_type',{'prognostic','diagnostic'},'parallel',0); 11 % runme('procedure','update','analysis_type',{'prognostic','diagnostic'},'parallel',1); 9 12 % 10 13 % See Also: UPDATEARCHIVE RUNME … … 24 27 %check arguments 25 28 if nargout~=1 26 help runme _core27 error('runme _coreerror message: bad usage');28 end 29 30 %warning if a runme _corealready exists:29 help runme 30 error('runme error message: bad usage'); 31 end 32 33 %warning if a runme already exists: 31 34 if exist('./runme.m') 32 disp('this is the nighlty run runme _core, located in src/m/utils/Nightly/runme_core.m')35 disp('this is the nighlty run runme, located in src/m/utils/Nightly/runme.m') 33 36 disp('Another local runme exist but is not executed') 34 37 end … … 36 39 %read configuration 37 40 if ~exist('./configuration.m') 38 error('runme _coreerror message: configuration file ''configuration.m'' not found');41 error('runme error message: configuration file ''configuration.m'' not found'); 39 42 else 40 43 configuration; … … 104 107 procedure=find_option(options,'procedure'); 105 108 if isempty(procedure), 106 disp('runme _corewarning: no procedure found, defaulting to test checking')109 disp('runme warning: no procedure found, defaulting to test checking') 107 110 procedure='check'; 108 111 end … … 151 154 md.fit(:)=2; 152 155 else 153 error(['runme _coreerror message: for control solution, ' control_fit ' fit is not supported!']);156 error(['runme error message: for control solution, ' control_fit ' fit is not supported!']); 154 157 end 155 158 end … … 184 187 end 185 188 186 %CHECK TEST? 187 if strcmpi(testtype,'check'), 189 %UPDATE ARCHIVE? 190 if strcmpi(procedure,'update'), 191 192 for k=1:length(fields), 193 field=fields{k}; 194 eval([ archive_name '_field' num2str(k) ' = md.results. ' field ';']); 195 end 196 eval(['save ' archive_name ' ' archive_name '_field*']); 197 disp(sprintf(['File ' archive_name ' saved\n'])); 198 199 %ELSE: CHECK TEST 200 else, 188 201 189 202 %load archive … … 207 220 end 208 221 end 209 210 %UPDATE ARCHIVE?211 elseif strcmpi(testtype,'update'),212 213 for k=1:length(fields),214 field=fields{k};215 eval([ archive_name '_field' num2str(k) ' = md.results. ' field ';']);216 end217 eval(['save ' archive_name ' ' archive_name '_field*']);218 disp(sprintf(['File ' archive_name ' saved\n']));219 220 else221 222 error('runme_core error message: unknown runtype. should be ''check'' or ''update''');223 224 222 end 225 223
Note:
See TracChangeset
for help on using the changeset viewer.