begin_processing_step.m
changeset 20 61b92f8fb463
parent 17 f5a63c03d9c8
equal deleted inserted replaced
19:b0fe24d04ba8 20:61b92f8fb463
     1 %======================================================================
     1 %======================================================================
     2 %                    B E G I N _ P R O C E S S I N G _ S T E P . M 
     2 %                    B E G I N _ P R O C E S S I N G _ S T E P . M 
     3 %                    doc: Fri Jun 25 16:13:41 2004
     3 %                    doc: Fri Jun 25 16:13:41 2004
     4 %                    dlm: Wed Apr 22 08:10:18 2015
     4 %                    dlm: Wed Jul 27 14:03:04 2016
     5 %                    (c) 2004 ladcp@
     5 %                    (c) 2004 ladcp@
     6 %                    uE-Info: 15 58 NIL 0 0 72 2 2 8 NIL ofnI
     6 %                    uE-Info: 17 85 NIL 0 2 72 0 2 8 NIL ofnI
     7 %======================================================================
     7 %======================================================================
     8 
     8 
     9 % start new processing step (in [process_cast.m])
     9 % start new processing step (in [process_cast.m])
    10 
    10 
    11 % HISTORY:
    11 % HISTORY:
    12 %   Jun 25, 2004: - created
    12 %   Jun 25, 2004: - created
    13 %   Jun 26, 2008: - BUG: typo related to eval_expr
    13 %   Jun 26, 2008: - BUG: typo related to eval_expr
    14 %   Apr 22, 2015: - added evaluation of eval_expr before re-loading set_cast_params.m
    14 %   Apr 22, 2015: - added evaluation of eval_expr before re-loading set_cast_params.m
    15 %		    to allow setting of processing_version
    15 %		    to allow setting of processing_version
       
    16 %   Feb 26, 2016: - added station number to begin-step message
       
    17 %   Jul 27, 2016: - added .mat to checkpoint filename to allow more complex filenames
    16 
    18 
    17 msg = sprintf('#################### step %d: %s ',pcs.cur_step,pcs.step_name);
    19 msg = sprintf('################ [%03d] step %d: %s ',stn,pcs.cur_step,pcs.step_name);
    18 while length(msg)<70, msg = [msg '#']; end
    20 while length(msg)<70, msg = [msg '#']; end
    19 disp(msg);
    21 disp(msg);
    20 if pcs.cur_step == pcs.begin_step
    22 if pcs.cur_step == pcs.begin_step
    21   save_pcs = pcs; % save state
    23   save_pcs = pcs; % save state
    22   disp(sprintf('LOADING CHECKPOINT %s_%d',f.checkpoints,pcs.cur_step-1));
    24   disp(sprintf('LOADING CHECKPOINT %s_%d',f.checkpoints,pcs.cur_step-1));
    23   load(sprintf('%s_%d',f.checkpoints,pcs.cur_step-1));
    25   load(sprintf('%s_%d.mat',f.checkpoints,pcs.cur_step-1));
    24   if ~isempty(save_pcs.eval_expr)
    26   if ~isempty(save_pcs.eval_expr)
    25     disp(sprintf('EVALUATING EXPRESSION <%s>...',save_pcs.eval_expr));
    27     disp(sprintf('EVALUATING EXPRESSION <%s>...',save_pcs.eval_expr));
    26     eval(save_pcs.eval_expr);
    28     eval(save_pcs.eval_expr);
    27   end
    29   end
    28   disp('RE-LOADING PER-CAST PARAMETERS');
    30   disp('RE-LOADING PER-CAST PARAMETERS');