[Dart-dev] [4352] DART/trunk/diagnostics: The 'time_to_skip' is correctly described as being the amount of time FROM

nancy at ucar.edu nancy at ucar.edu
Wed Apr 21 13:58:45 MDT 2010


Revision: 4352
Author:   thoar
Date:     2010-04-21 13:58:45 -0600 (Wed, 21 Apr 2010)
Log Message:
-----------
The 'time_to_skip' is correctly described as being the amount of time FROM
THE LEADING EDGE OF THE FIRST BIN - not the bin 'center'. The logic of
the programs has not changed, just the documentation. The matlab
plotting scripts also act on the time appropriately.

Additionally, the annotation of the input file at the bottom of the 
plot is now more robust and will correctly print the full name of
the file no matter if the file is in the MATLABPATH, the local working
directory, or is an absolute path.

The obs_diag.f90 summary statistics (written to stdout & logfile) have
a bit more verbosity about what sorts of DART QC flags were encountered.

Modified Paths:
--------------
    DART/trunk/diagnostics/matlab/plot_evolution.m
    DART/trunk/diagnostics/matlab/plot_rmse_xxx_evolution.m
    DART/trunk/diagnostics/matlab/two_experiments_profile.m
    DART/trunk/diagnostics/threed_sphere/obs_diag.f90
    DART/trunk/diagnostics/threed_sphere/obs_diag.html

-------------- next part --------------
Modified: DART/trunk/diagnostics/matlab/plot_evolution.m
===================================================================
--- DART/trunk/diagnostics/matlab/plot_evolution.m	2010-04-20 20:18:11 UTC (rev 4351)
+++ DART/trunk/diagnostics/matlab/plot_evolution.m	2010-04-21 19:58:45 UTC (rev 4352)
@@ -397,13 +397,18 @@
 % annotates the directory containing the data being plotted
 subplot('position',[0.48 0.01 0.04 0.04])
 axis off
-str = which(main);
-if ( isempty(str) )   % must be a relative filename 
-   mydir = pwd;
-   string1 = sprintf('data file: %s/%s',mydir,main);
+fullname = which(main);   % Could be in MatlabPath
+if( isempty(fullname) )
+   if ( main(1) == '/' )  % must be a absolute pathname
+      string1 = sprintf('data file: %s',main);
+   else                   % must be a relative pathname
+      mydir = pwd;
+      string1 = sprintf('data file: %s/%s',mydir,main);
+   end
 else
-   string1 = sprintf('data file: %s',str);
+   string1 = sprintf('data file: %s',fullname);
 end
+
 h = text(0.0, 0.5, string1);
 set(h,'HorizontalAlignment','center', ...
       'VerticalAlignment','middle',...

Modified: DART/trunk/diagnostics/matlab/plot_rmse_xxx_evolution.m
===================================================================
--- DART/trunk/diagnostics/matlab/plot_rmse_xxx_evolution.m	2010-04-20 20:18:11 UTC (rev 4351)
+++ DART/trunk/diagnostics/matlab/plot_rmse_xxx_evolution.m	2010-04-21 19:58:45 UTC (rev 4352)
@@ -410,13 +410,18 @@
 % annotates the directory containing the data being plotted
 subplot('position',[0.48 0.01 0.04 0.04])
 axis off
-str = which(main);
-if ( isempty(str) )   % must be a relative filename 
-   mydir = pwd;
-   string1 = sprintf('data file: %s/%s',mydir,main);
+fullname = which(main);   % Could be in MatlabPath
+if( isempty(fullname) )
+   if ( main(1) == '/' )  % must be a absolute pathname
+      string1 = sprintf('data file: %s',main);
+   else                   % must be a relative pathname
+      mydir = pwd;
+      string1 = sprintf('data file: %s/%s',mydir,main);
+   end
 else
-   string1 = sprintf('data file: %s',str);
+   string1 = sprintf('data file: %s',fullname);
 end
+
 h = text(0.0, 0.5, string1);
 set(h,'HorizontalAlignment','center', ...
       'VerticalAlignment','middle',...

Modified: DART/trunk/diagnostics/matlab/two_experiments_profile.m
===================================================================
--- DART/trunk/diagnostics/matlab/two_experiments_profile.m	2010-04-20 20:18:11 UTC (rev 4351)
+++ DART/trunk/diagnostics/matlab/two_experiments_profile.m	2010-04-21 19:58:45 UTC (rev 4352)
@@ -3,9 +3,12 @@
 % Each variable gets its own figure.
 % Each region gets its own axis.
 %
-% I'm having some problems preserving the ticks on the left.
+% I'm having some problems preserving the ticks on the left,
+% so I used a transparent object. Because of THAT - OpenGL is the
+% default rendered, which is normally a pretty low resolution.
+% For good reproducibility, manually specify the 'painters' option when
+% printing.
 % 
-% 
 % files = {'/ptmp/nancy/CSL/Base5/032-061s0_def_reg/obs_diag_output.nc',
 %          '/ptmp/thoar/GPS+AIRS/Sep_032-061/obs_diag_output.nc'};
 % titles = {'Base5', 'GPS+AIRS'};
@@ -19,6 +22,7 @@
 % prpo     = 'both'; % prior & posterior
 %
 % two_experiments_profile(files, titles, varnames, qtty, prpo)
+% print -dpsc -painters myplot.ps
 %
 
 % <next few lines under version control, do not edit>
@@ -229,7 +233,7 @@
 plotdat.bincenters    = plotdat.bincenters + timeorigin;
 plotdat.binedges      = plotdat.binedges   + timeorigin;
 plotdat.Nbins         = length(plotdat.bincenters);
-plotdat.toff          = plotdat.bincenters(1) + iskip;
+plotdat.toff          = plotdat.binedges(1) + iskip;
 
 plotdat.timespan      = sprintf('%s through %s', datestr(plotdat.toff), ...
                         datestr(max(plotdat.binedges(:))));
@@ -536,12 +540,19 @@
 
 for ifile = 1:nfiles
    main = filenames{ifile};
-   if ( main(1) == '/' )   % must be a absolute pathname
-      string1 = sprintf('data file: %s',main);
+
+   fullname = which(main);   % Could be in MatlabPath
+   if( isempty(fullname) )
+      if ( main(1) == '/' )  % must be a absolute pathname
+         string1 = sprintf('data file: %s',main);
+      else                   % must be a relative pathname
+         mydir = pwd;
+         string1 = sprintf('data file: %s/%s',mydir,main);
+      end
    else
-      mydir = pwd;
-      string1 = sprintf('data file: %s/%s',mydir,main);
+      string1 = sprintf('data file: %s',fullname);
    end
+
    ty = 1.0 - (ifile-1)*dy;
    h = text(0.5, ty, string1);
    set(h, 'Interpreter', 'none', 'FontSize', 8);

Modified: DART/trunk/diagnostics/threed_sphere/obs_diag.f90
===================================================================
--- DART/trunk/diagnostics/threed_sphere/obs_diag.f90	2010-04-20 20:18:11 UTC (rev 4351)
+++ DART/trunk/diagnostics/threed_sphere/obs_diag.f90	2010-04-21 19:58:45 UTC (rev 4352)
@@ -1524,6 +1524,23 @@
 write(*,*) '# bad DART QC prior  : ',sum(guess%NbadDartQC)
 write(*,*) '# bad DART QC post   : ',sum(analy%NbadDartQC)
 write(*,*)
+write(*,*) '# prior DART QC 0 : ',sum(guess%NDartQC_0)
+write(*,*) '# prior DART QC 1 : ',sum(guess%NDartQC_1)
+write(*,*) '# prior DART QC 2 : ',sum(guess%NDartQC_2)
+write(*,*) '# prior DART QC 3 : ',sum(guess%NDartQC_3)
+write(*,*) '# prior DART QC 4 : ',sum(guess%NDartQC_4)
+write(*,*) '# prior DART QC 5 : ',sum(guess%NDartQC_5)
+write(*,*) '# prior DART QC 6 : ',sum(guess%NDartQC_6)
+write(*,*) '# prior DART QC 7 : ',sum(guess%NDartQC_7)
+write(*,*)
+write(*,*) '# poste DART QC 0 : ',sum(analy%NDartQC_0)
+write(*,*) '# poste DART QC 1 : ',sum(analy%NDartQC_1)
+write(*,*) '# poste DART QC 2 : ',sum(analy%NDartQC_2)
+write(*,*) '# poste DART QC 3 : ',sum(analy%NDartQC_3)
+write(*,*) '# poste DART QC 4 : ',sum(analy%NDartQC_4)
+write(*,*) '# poste DART QC 5 : ',sum(analy%NDartQC_5)
+write(*,*) '# poste DART QC 6 : ',sum(analy%NDartQC_6)
+write(*,*) '# poste DART QC 7 : ',sum(analy%NDartQC_7)
 
 write(logfileunit,*)
 write(logfileunit,*) '# observations used  : ',sum(obs_used_in_epoch)
@@ -1535,6 +1552,24 @@
 write(logfileunit,*) '# big (original) QC  : ',sum(guess%NbigQC)
 write(logfileunit,*) '# bad DART QC prior  : ',sum(guess%NbadDartQC)
 write(logfileunit,*) '# bad DART QC post   : ',sum(analy%NbadDartQC)
+write(logfileunit,*)
+write(logfileunit,*) '# prior DART QC 0 : ',sum(guess%NDartQC_0)
+write(logfileunit,*) '# prior DART QC 1 : ',sum(guess%NDartQC_1)
+write(logfileunit,*) '# prior DART QC 2 : ',sum(guess%NDartQC_2)
+write(logfileunit,*) '# prior DART QC 3 : ',sum(guess%NDartQC_3)
+write(logfileunit,*) '# prior DART QC 4 : ',sum(guess%NDartQC_4)
+write(logfileunit,*) '# prior DART QC 5 : ',sum(guess%NDartQC_5)
+write(logfileunit,*) '# prior DART QC 6 : ',sum(guess%NDartQC_6)
+write(logfileunit,*) '# prior DART QC 7 : ',sum(guess%NDartQC_7)
+write(logfileunit,*)
+write(logfileunit,*) '# poste DART QC 0 : ',sum(analy%NDartQC_0)
+write(logfileunit,*) '# poste DART QC 1 : ',sum(analy%NDartQC_1)
+write(logfileunit,*) '# poste DART QC 2 : ',sum(analy%NDartQC_2)
+write(logfileunit,*) '# poste DART QC 3 : ',sum(analy%NDartQC_3)
+write(logfileunit,*) '# poste DART QC 4 : ',sum(analy%NDartQC_4)
+write(logfileunit,*) '# poste DART QC 5 : ',sum(analy%NDartQC_5)
+write(logfileunit,*) '# poste DART QC 6 : ',sum(analy%NDartQC_6)
+write(logfileunit,*) '# poste DART QC 7 : ',sum(analy%NDartQC_7)
 
 if (Nidentity > 0) then
    write(*,*)'There were identity observations in this observation sequence file.'
@@ -1782,7 +1817,7 @@
 
    type(time_type), intent(out) :: beg_time     ! first_bin_center
    type(time_type), intent(out) :: end_time     ! last_bin_center
-   type(time_type), intent(out) :: skip_time    ! time AFTER first_bin_center
+   type(time_type), intent(out) :: skip_time    ! time AFTER first bin leading edge
    type(time_type), intent(out) :: binsep       ! time between bin centers
    type(time_type), intent(out) :: binwidth     ! period of interest around center
    type(time_type), intent(out) :: halfbinwidth ! half that period

Modified: DART/trunk/diagnostics/threed_sphere/obs_diag.html
===================================================================
--- DART/trunk/diagnostics/threed_sphere/obs_diag.html	2010-04-20 20:18:11 UTC (rev 4351)
+++ DART/trunk/diagnostics/threed_sphere/obs_diag.html	2010-04-21 19:58:45 UTC (rev 4352)
@@ -354,7 +354,8 @@
 	    vertical profiles of rms error and bias. The year and month 
 	    values <em>must</em> be zero. Useful because it takes some 
 	    time for the assimilation to settle down from the climatological 
-	    spread at the start.<BR>
+	    spread at the start. <em class=code>time_to_skip</em> is an
+            amount of time AFTER the first edge of the first bin.<BR>
             Default: 0, 0, 1, 0, 0, 0</TD></TR>  
 
 <TR><!--contents--><TD valign=top>   max_num_bins  </TD>


More information about the Dart-dev mailing list