[Dart-dev] DART/branches Revision: 13099
dart at ucar.edu
dart at ucar.edu
Thu Apr 4 11:30:30 MDT 2019
thoar at ucar.edu
2019-04-04 11:30:29 -0600 (Thu, 04 Apr 2019)
128
last two observation-space diagnostics to support QC8,
no posteriors and behave the same across a variety of Matlab versions.
Modified: DART/branches/qc8diags/diagnostics/matlab/two_experiments_evolution.m
===================================================================
--- DART/branches/qc8diags/diagnostics/matlab/two_experiments_evolution.m 2019-04-04 15:24:41 UTC (rev 13098)
+++ DART/branches/qc8diags/diagnostics/matlab/two_experiments_evolution.m 2019-04-04 17:30:29 UTC (rev 13099)
@@ -18,7 +18,7 @@
% For TRUSTED observations, this is different than the number used to calculate
% bias, rmse, spread, etc.
%
-% USAGE: two_experiments_evolution(files, titles, obsnames, copy, prpo, 'level', 1)
+% USAGE: two_experiments_evolution(files, titles, obsnames, copy, prpo [,varargin])
%
% files : Cell array containing the locations of the obs_diag_output.nc
% files to compare. Each file is presumed to be the results from
@@ -38,8 +38,20 @@
% conscious decision not to support plotting both prior and posterior
% on the same plot.
%
+% varargin: optional parameter-value pairs. Supported parameters are described below.
+%
% level : The index of the level to plot. Defaults to level 1.
%
+% verbose : true/false to control amount of run-time output
+%
+% MarkerSize : integer controlling the size of the symbols
+%
+% pause : true/false to conrol pausing after each figure is created.
+% true will require hitting any key to continue to next plot
+%
+% range : 'range' of the value being plotted. Default is to
+% automatically determine range based on the data values.
+%
% OUTPUT: A .pdf of each graphic is created. Each .pdf has a name that
% reflects the variable, quantity, and region being plotted.
%
@@ -66,7 +78,11 @@
% Decode,Parse,Check the input
%---------------------------------------------------------------------
-default_level = 1;
+default_verbosity = true;
+default_markersize = 8;
+default_pause = false;
+default_range = [NaN NaN];
+default_level = 1;
p = inputParser;
addRequired(p,'files', at iscell);
@@ -76,24 +92,30 @@
addRequired(p,'prpo', at ischar);
if (exist('inputParser/addParameter','file') == 2)
- addParameter(p,'level',default_level, at 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,'level', default_level, @isnumeric);
else
- addParamValue(p,'level',default_level, at 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,'level', default_level, @isnumeric); %#ok<NVREPL>
end
p.parse(files, titles, obsnames, copy, prpo, varargin{:});
-% if you want to echo the input
-% disp(['files : ', p.Results.files])
-% disp(['titles : ', p.Results.titles])
-% disp(['obsnames: ', p.Results.obsnames])
-% fprintf('level : %d \n', p.Results.level)
-
if ~isempty(fieldnames(p.Unmatched))
disp('Extra inputs:')
disp(p.Unmatched)
end
+if (numel(p.Results.range) ~= 2)
+ error('range must be an array of length two ... [bottom top]')
+end
+
NumExp = length(files);
for i = 1:NumExp
@@ -157,7 +179,7 @@
end % of loop around regions
- if ( ivar ~= nvars )
+ if ( ivar ~= nvars && p.Results.pause )
disp('Pausing, hit any key to continue ...')
pause
end
@@ -200,7 +222,7 @@
for i = 1:nexp
- varexist(filenames{i}, {targets{:}, 'time', 'time_bounds'})
+ varexist(filenames{i}, {targets{:}, 'time', 'time_bounds'}) %#ok<CCAT>
More information about the Dart-dev
mailing list