[Dart-dev] DART/branches Revision: 13142

dart at ucar.edu dart at ucar.edu
Tue Apr 30 16:01:40 MDT 2019


thoar at ucar.edu
2019-04-30 16:01:40 -0600 (Tue, 30 Apr 2019)
127
Removed optional 'varcheck' ... use two_experiments_profile.m  instead.
Improved run-time description of files being created.




Modified: DART/branches/reanalysis/diagnostics/matlab/two_experiments_overview.m
===================================================================
--- DART/branches/reanalysis/diagnostics/matlab/two_experiments_overview.m	2019-04-30 19:58:14 UTC (rev 13141)
+++ DART/branches/reanalysis/diagnostics/matlab/two_experiments_overview.m	2019-04-30 22:01:40 UTC (rev 13142)
@@ -1,6 +1,34 @@
 function two_experiments_overview(file1,label1,file2,label2,varargin)
 %% two_experiments_overview create a trellis-plot-like view of the comparison of two experiments.
 %
+% USAGE: two_experiments_overview(file1, label1, file2, label2 [,varargin]);
+%
+% file1  : filename of the output of obs_diag for an experiment.
+% label1 : Label for the experiment.
+% file2  : filename of the output of obs_diag for a second experiment.
+% label2 : Label for the second experiment.
+%
+% varargin: optional parameter-value pairs. Supported parameters are described below.
+%
+% obsname  : The strings of each observation type to plot.
+%            Each observation type will be plotted in a separate graphic.
+%            Default is to plot all available observation types.
+%            If there are more than 12 observation types, multiple pages
+%            will be created.
+%
+% FlagLevel : It is possible to flag levels that don't have many observations
+%             relative to the level with the most observations.
+%             This value is a fraction of the level with the most observations.
+%
+% MarkerSize : integer controlling the size of the flaggin symbols.
+%
+% verbose  : true/false to control amount of run-time output
+%
+% pause    : true/false to conrol pausing after each figure is created.
+%            true will require hitting any key to continue to next plot
+%
+% papertype: valid values are 'uslegal' and 'usletter'
+%
 % EXAMPLE :
 %
 % file1 = 'Diags_2010.08.15-31_0-500m/obs_diag_output.nc';
@@ -34,13 +62,11 @@
 % Decode,Parse,Check the input
 %---------------------------------------------------------------------
 
-defaultFlagLevel   = 0.00;   % ten percent would be 0.10
-defaultVarCheck    = -1;
+default_obsnames   = {'all'};
+default_flaglevel  = 0.00;   % ten percent would be 0.10
+default_markersize = 12;
 default_verbosity  = true;
-default_markersize = 12;
 default_pause      = false;
-default_range      = [NaN NaN];
-default_obsnames   = {'all'};
 default_papertype  = 'uslegal';
 
 p = inputParser;
@@ -51,21 +77,17 @@
 addRequired(p,'label2', @ischar);
 
 if (exist('inputParser/addParameter','file') == 2)
-    addParameter(p, 'FlagLevel',  defaultFlagLevel,   @isnumeric);
-    addParameter(p, 'VarCheck',   defaultVarCheck,    @isnumeric);
+    addParameter(p, 'FlagLevel',  default_flaglevel,  @isnumeric);
     addParameter(p, 'verbose',    default_verbosity,  @islogical);
     addParameter(p, 'MarkerSize', default_markersize, @isnumeric);
     addParameter(p, 'pause',      default_pause,      @islogical);
-    addParameter(p, 'range',      default_range,      @isnumeric);
     addParameter(p, 'obsnames',   default_obsnames,   @iscell);
     addParameter(p, 'papertype',  default_papertype,  @ischar);
 else
-    addParamValue(p, 'FlagLevel', defaultFlagLevel,   @isnumeric); %#ok<NVREPL>
-    addParamValue(p, 'VarCheck',  defaultVarCheck,    @isnumeric); %#ok<NVREPL>
+    addParamValue(p, 'FlagLevel', default_flaglevel,  @isnumeric); %#ok<NVREPL>
     addParamValue(p, 'verbose',   default_verbosity,  @islogical); %#ok<NVREPL>
     addParamValue(p, 'MarkerSize',default_markersize, @isnumeric); %#ok<NVREPL>
     addParamValue(p, 'pause',     default_pause,      @islogical); %#ok<NVREPL>
-    addParamValue(p, 'range',     default_range,      @isnumeric); %#ok<NVREPL>
     addParamValue(p, 'obsnames',  default_obsnames,   @iscell);    %#ok<NVREPL>
     addParamValue(p, 'papertype', default_papertype,  @ischar);    %#ok<NVREPL>
 end
@@ -74,7 +96,6 @@
 
 global figuredata
 figuredata.MarkerSize = p.Results.MarkerSize;
-figuredata.range      = p.Results.range;
 figuredata.verbose    = p.Results.verbose;
 
 %% collect the results of parsing (makes code easier to read)
@@ -83,7 +104,6 @@
 FileB     = p.Results.file2;
 LabelA    = p.Results.label1;
 LabelB    = p.Results.label2;
-VarCheck  = p.Results.VarCheck;
 FlagLevel = p.Results.FlagLevel;
 
 if (exist(FileA,'file') ~= 2), error('File %s does not exist.',FileA); end
@@ -91,6 +111,8 @@
 
 %% prepare the figures
 % These positions fit 12 variables on a single page.
+% If more then 12 variables are listed, multiple pages will be created


More information about the Dart-dev mailing list