[Dart-dev] [4032] DART/trunk/DART_LAB/matlab: Bug fixes to plots for DART_LAB components

nancy at ucar.edu nancy at ucar.edu
Wed Sep 2 17:07:28 MDT 2009


An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20090902/67e707f4/attachment.html 
-------------- next part --------------
Modified: DART/trunk/DART_LAB/matlab/oned_model.fig
===================================================================
(Binary files differ)

Modified: DART/trunk/DART_LAB/matlab/oned_model.m
===================================================================
--- DART/trunk/DART_LAB/matlab/oned_model.m	2009-09-02 22:48:15 UTC (rev 4031)
+++ DART/trunk/DART_LAB/matlab/oned_model.m	2009-09-02 23:07:28 UTC (rev 4032)
@@ -96,7 +96,7 @@
 
 % An array to keep track of rank histograms
 handles.prior_rank(1 : handles.ens_size + 1) = 0;
-handles.post_rank(1 : handles.ens_size + 1) = 0;
+handles.posterior_rank(1 : handles.ens_size + 1) = 0;
 
 % Handles to subregions of plots
 handles.r1 = 0;
@@ -440,7 +440,7 @@
 
 % Need to reset the rank histograms when ensemble size changes
 handles.prior_rank(1 : ens_size + 1) = 0;
-handles.post_rank(1 : ens_size + 1) = 0;
+handles.posterior_rank(1 : ens_size + 1) = 0;
 
 % Clear the histograms
 figure(1);
@@ -509,9 +509,11 @@
 
 subplot(handles.r2);
 hold off
-plot(1, 1, 'visible', 'off');
+% Reset the plot and set up the colors for the legend
+plot(1, 1, 'b', 'visible', 'off');
+hold on
+plot(1, 1, 'r', 'visible', 'off');
 axis([1 10 0 4]);
-hold on;
 ylabel('Error, Spread', 'FontSize', 14);
 
 %  Compute the initial error and spread; 0 is always the truth
@@ -614,6 +616,7 @@
    prior_error = abs(mean(ens_new));
    plot([handles.time_step - 1 + 0.1, handles.time_step - 0.1], ...
       [handles.error, prior_error]);
+   hold on;
 
    handles.error = prior_error; 
 
@@ -647,7 +650,9 @@
 
    % Update the rank data
    subplot(handles.r4);
-   ens_rank = get_ens_rank(handles.ens, 0);
+   ens_rank = get_ens_rank(ens_new, 0);
+sort(ens_new)
+ens_rank
 
    % Plot the latest rank entry as a different color
    temp_rank(:, 1) = handles.prior_rank(1:handles.ens_size + 1);
@@ -796,7 +801,7 @@
    ens_rank = get_ens_rank(handles.ens, 0);
 
    % Plot the latest rank entry as a different color
-   temp_rank(:, 1) = handles.post_rank(1:handles.ens_size + 1);
+   temp_rank(:, 1) = handles.posterior_rank(1:handles.ens_size + 1);
    temp_rank(:, 2) = 0;
    temp_rank(ens_rank, 2) = 1;
 
@@ -808,7 +813,7 @@
    axis tight;
 
    % Update the permanent storage of the rank values
-   handles.post_rank(ens_rank) = handles.post_rank(ens_rank) + 1;
+   handles.posterior_rank(ens_rank) = handles.posterior_rank(ens_rank) + 1;
 
    % Plot the segment for the updated error
    post_error = abs(mean(new_ens));

Modified: DART/trunk/DART_LAB/matlab/run_lorenz_96.m
===================================================================
--- DART/trunk/DART_LAB/matlab/run_lorenz_96.m	2009-09-02 22:48:15 UTC (rev 4031)
+++ DART/trunk/DART_LAB/matlab/run_lorenz_96.m	2009-09-02 23:07:28 UTC (rev 4032)
@@ -423,7 +423,7 @@
       handles.post(time, :, :) = temp_ens;
 
       % Compute the posterior rms
-      posterior_rms = rms_error(handles.true_state(time, :), handles.post(time, :, :))
+      posterior_rms = rms_error(handles.true_state(time, :), handles.post(time, :, :));
       handles.posterior_rms(time) = posterior_rms;
 
       % Save the information about the histograms from before


More information about the Dart-dev mailing list