[Dart-dev] DART/branches Revision: 11846

dart at ucar.edu dart at ucar.edu
Thu Jul 27 13:48:42 MDT 2017


jla at ucar.edu
2017-07-27 13:48:41 -0600 (Thu, 27 Jul 2017)
273
Increased speed and eliminated a gradual reduction of speed by not holding rank histogram 
plots and by changing the other plots to just do 10 timestep wide fixed chunks rather than
shifting gradually. Also changed default adaptive inflation settings for oned_model_inf.m.



Modified: DART/branches/rma_trunk/documentation/DART_LAB/matlab/oned_model.m
===================================================================
--- DART/branches/rma_trunk/documentation/DART_LAB/matlab/oned_model.m	2017-07-27 18:06:26 UTC (rev 11845)
+++ DART/branches/rma_trunk/documentation/DART_LAB/matlab/oned_model.m	2017-07-27 19:48:41 UTC (rev 11846)
@@ -678,10 +678,14 @@
             h_evolution.prior = plot(handles.time_step - 0.1, ens_new, '*', ...
                 'MarkerSize', 6, 'Color', atts.green);
 
-            for i = 1:handles.ens_size
-                plot([handles.time_step - 1 + 0.1, handles.time_step - 0.1], ...
-                    [handles.ens(i), ens_new(i)], 'Color', atts.green);
-            end
+            % Load up to plot all segments at once, more time efficient than previous loop
+            bx(1:2, 1:handles.ens_size) = 0;
+            by(1:2, 1:handles.ens_size) = 0;
+            bx(1, :) = handles.time_step - 1 + 0.1;
+            bx(2, :) = handles.time_step - 0.1;
+            by(1, :) = handles.ens;
+            by(2, :) = ens_new;
+            plot(bx, by, 'Color', atts.green);
 
             %% Plot the segment for the prior error and spread
             % Want the lower y limit to stay 0 for error spread
@@ -731,6 +735,7 @@
             temp_rank(:, 2)        = 0;
             temp_rank(ens_rank, 2) = 1;
 
+            hold off
             bar(temp_rank,'stacked');
 
             %% Plot the figure window for this update
@@ -819,26 +824,31 @@
             set(handles.ui_button_advance_model, 'String', 'Advance Model');
 
             % Adjust the horizontal range of the plot windows as needed
-            if( mod(handles.time_step, 5) == 0)
+            % Have moved to fixed 10-step wide windows rather than earlier shifting for speed
+            % Using cla clears out plot buffers and avoids slowdown with time
+            if( mod(handles.time_step, 10) == 0)
                 axes(handles.h_state_evolution);
+                cla
                 axlims    = axis;
-                axlims(1) = handles.time_step - 4;
-                axlims(2) = handles.time_step + 6;
+                axlims(1) = handles.time_step;
+                axlims(2) = handles.time_step + 10;
                 axis(axlims)
 
                 % Want the lower y limit to stay 0 for error spread
                 axes(handles.h_err_spread_evolution);
+                cla
                 axlims    = axis;
-                axlims(1) = handles.time_step - 4;
-                axlims(2) = handles.time_step + 6;
+                axlims(1) = handles.time_step;
+                axlims(2) = handles.time_step + 10;
                 axlims(3) = 0.0;
                 axis(axlims)
 
                 % Want the lower y limit to stay 0 for kurtosis
                 axes(handles.h_kurtosis_evolution);
+                cla
                 axlims    = axis;
-                axlims(1) = handles.time_step - 4;
-                axlims(2) = handles.time_step + 6;
+                axlims(1) = handles.time_step;
+                axlims(2) = handles.time_step + 10;
                 axlims(3) = 0.0;
                 axis(axlims)
 
@@ -879,7 +889,7 @@
             temp_rank(:, 1)        = handles.post_rank(1:handles.ens_size + 1);
             temp_rank(:, 2)        = 0;
             temp_rank(ens_rank, 2) = 1;
-
+            hold off
             bar(temp_rank, 'stacked');
 
             % Update the permanent storage of the rank values

Modified: DART/branches/rma_trunk/documentation/DART_LAB/matlab/oned_model_inf.m
===================================================================
--- DART/branches/rma_trunk/documentation/DART_LAB/matlab/oned_model_inf.m	2017-07-27 18:06:26 UTC (rev 11845)
+++ DART/branches/rma_trunk/documentation/DART_LAB/matlab/oned_model_inf.m	2017-07-27 19:48:41 UTC (rev 11846)
@@ -278,7 +278,7 @@
     'Style'               , 'edit', ...
     'Units'               , 'Normalized', ...
     'Position'            , [0.425 0.30 0.20 0.15], ...
-    'String'              , '0.9', ...
+    'String'              , '1.0', ...
     'BackgroundColor'     , 'White', ...
     'FontName'            , atts.fontname, ...
     'FontUnits'           , 'Normalized', ...
@@ -303,7 +303,7 @@
     'Style'               , 'edit', ...
     'Units'               , 'Normalized', ...
     'Position'            , [0.795 0.30 0.20 0.15], ...
-    'String'              , '3.0', ...
+    'String'              , '100.0', ...
     'BackgroundColor'     , 'White', ...
     'FontName'            , atts.fontname, ...


More information about the Dart-dev mailing list