[Dart-dev] DART/branches Revision: 12975

dart at ucar.edu dart at ucar.edu
Fri Feb 8 12:52:39 MST 2019


thoar at ucar.edu
2019-02-08 12:52:39 -0700 (Fri, 08 Feb 2019)
175
Fully supports obs_diag output files that do not have posteriors.
Also labels the observations as 'assimilated' or 'evaluated' based on
the number of obs with DART QC == 1,3




Modified: DART/branches/recam/diagnostics/matlab/plot_evolution.m
===================================================================
--- DART/branches/recam/diagnostics/matlab/plot_evolution.m	2019-02-07 18:35:48 UTC (rev 12974)
+++ DART/branches/recam/diagnostics/matlab/plot_evolution.m	2019-02-08 19:52:39 UTC (rev 12975)
@@ -177,13 +177,28 @@
 plotdat.copyindex   = get_copy_index(fname,copy);
 plotdat.Npossindex  = get_copy_index(fname,'Nposs');
 plotdat.Nusedindex  = get_copy_index(fname,'Nused');
+plotdat.NQC0index   = get_copy_index(fname,'N_DARTqc_0');
+plotdat.NQC1index   = get_copy_index(fname,'N_DARTqc_1');
+plotdat.NQC2index   = get_copy_index(fname,'N_DARTqc_2');
+plotdat.NQC3index   = get_copy_index(fname,'N_DARTqc_3');
 plotdat.NQC4index   = get_copy_index(fname,'N_DARTqc_4');
 plotdat.NQC5index   = get_copy_index(fname,'N_DARTqc_5');
 plotdat.NQC6index   = get_copy_index(fname,'N_DARTqc_6');
 plotdat.NQC7index   = get_copy_index(fname,'N_DARTqc_7');
 
+% 
+
 figuredata = setfigure();
 
+plotdat.ges_color = 'k';
+plotdat.anl_color = 'r';
+plotdat.ges_marker = '+';
+plotdat.anl_marker = 'x';
+plotdat.ges_linestyle = '-';
+plotdat.anl_linestyle = '-';
+plotdat.ges_linewidth = figuredata.linewidth;
+plotdat.anl_linewidth = figuredata.linewidth;
+
 %%---------------------------------------------------------------------
 % Loop around (time-copy-level-region) observation types
 %----------------------------------------------------------------------
@@ -249,12 +264,17 @@
     guess_raw = permute(guess_raw,length(size(guess_raw)):-1:1);
     guess = reshape(guess_raw, plotdat.Nbins,   plotdat.ncopies, ...
         plotdat.nlevels, plotdat.nregions);
+
+    analy_raw = local_ncread(fname, plotdat.analyvar);
+    if ( isempty(analy_raw) ) 
+       analy = guess;
+       analy(:) = NaN;
+    else
+       analy_raw = permute(analy_raw,length(size(analy_raw)):-1:1);
+       analy = reshape(analy_raw, plotdat.Nbins,   plotdat.ncopies, ...
+           plotdat.nlevels, plotdat.nregions);
+    end
     
-    analy_raw = ncread(fname, plotdat.analyvar);
-    analy_raw = permute(analy_raw,length(size(analy_raw)):-1:1);
-    analy = reshape(analy_raw, plotdat.Nbins,   plotdat.ncopies, ...
-        plotdat.nlevels, plotdat.nregions);
-    
     % check to see if there is anything to plot
     % The number possible is decreased by the number of observations
     % rejected by namelist control.
@@ -285,6 +305,26 @@
     for ilevel = wantedlevels
         
         fprintf(logfid,'\nlevel %d %f %s\n',ilevel,plotdat.level(ilevel),plotdat.level_units);
+        plotdat.ges_Nqc0  = guess(:,plotdat.NQC0index  ,ilevel,:);
+        plotdat.anl_Nqc0  = analy(:,plotdat.NQC0index  ,ilevel,:);
+        fprintf(logfid,'DART QC == 0, prior/post %d %d\n',sum(plotdat.ges_Nqc0(:)), ...
+            sum(plotdat.anl_Nqc0(:)));
+        
+        plotdat.ges_Nqc1  = guess(:,plotdat.NQC1index  ,ilevel,:);
+        plotdat.anl_Nqc1  = analy(:,plotdat.NQC1index  ,ilevel,:);
+        fprintf(logfid,'DART QC == 1, prior/post %d %d\n',sum(plotdat.ges_Nqc1(:)), ...
+            sum(plotdat.anl_Nqc1(:)));
+        
+        plotdat.ges_Nqc2  = guess(:,plotdat.NQC2index  ,ilevel,:);
+        plotdat.anl_Nqc2  = analy(:,plotdat.NQC2index  ,ilevel,:);
+        fprintf(logfid,'DART QC == 2, prior/post %d %d\n',sum(plotdat.ges_Nqc2(:)), ...
+            sum(plotdat.anl_Nqc2(:)));
+        
+        plotdat.ges_Nqc3  = guess(:,plotdat.NQC3index  ,ilevel,:);
+        plotdat.anl_Nqc3  = analy(:,plotdat.NQC3index  ,ilevel,:);
+        fprintf(logfid,'DART QC == 3, prior/post %d %d\n',sum(plotdat.ges_Nqc3(:)), ...
+            sum(plotdat.anl_Nqc3(:)));
+        
         plotdat.ges_Nqc4  = guess(:,plotdat.NQC4index  ,ilevel,:);
         plotdat.anl_Nqc4  = analy(:,plotdat.NQC4index  ,ilevel,:);
         fprintf(logfid,'DART QC == 4, prior/post %d %d\n',sum(plotdat.ges_Nqc4(:)), ...
@@ -364,46 +404,24 @@
 
 %% The prior and posterior are plotted as separate items.
 % By this point, the middle two dimensions are singletons.
-cg = plotdat.ges_copy(:,:,:,plotdat.region);
-ca = plotdat.anl_copy(:,:,:,plotdat.region);
 
-g = plotdat.ges_Nposs(:,:,:,plotdat.region);
-a = plotdat.anl_Nposs(:,:,:,plotdat.region);
-nobs_poss = reshape([g a]',2*plotdat.Nbins,1);
+ax1 = subplot('position',figdata.position);
+set(ax1,'YAxisLocation','left','FontSize',figdata.fontsize)
 
-g = plotdat.ges_Nused(:,:,:,plotdat.region);
-a = plotdat.anl_Nused(:,:,:,plotdat.region);
-nobs_used = reshape([g a]',2*plotdat.Nbins,1);
+[hprior, prior_legstr] = plot_quantity('prior', plotdat); 
 


More information about the Dart-dev mailing list