[Dart-dev] DART/branches Revision: 13101

dart at ucar.edu dart at ucar.edu
Fri Apr 5 13:16:07 MDT 2019


thoar at ucar.edu
2019-04-05 13:16:07 -0600 (Fri, 05 Apr 2019)
51
implemented code review items. notably MarkerSize




Modified: DART/branches/qc8diags/diagnostics/matlab/plot_bias_xxx_profile.m
===================================================================
--- DART/branches/qc8diags/diagnostics/matlab/plot_bias_xxx_profile.m	2019-04-05 16:16:14 UTC (rev 13100)
+++ DART/branches/qc8diags/diagnostics/matlab/plot_bias_xxx_profile.m	2019-04-05 19:16:07 UTC (rev 13101)
@@ -34,6 +34,9 @@
 %            Default is to plot all available observation types.
 %
 %
+% range    : 'range' of the value being plotted. Default is to
+%                automatically determine range based on the data values.
+%
 % verbose  : true/false to control amount of run-time output
 %
 % MarkerSize  : integer controlling the size of the symbols
@@ -68,11 +71,11 @@
 % Decode,Parse,Check the input
 %---------------------------------------------------------------------
 
-default_obsname = 'none';
-default_verbosity = true;
+default_obsname    = 'none';
+default_verbosity  = true;
 default_markersize = 8;
-default_pause = false;
-default_range = [NaN NaN];
+default_pause      = false;
+default_range      = [NaN NaN];
 p = inputParser;
 
 addRequired(p,'fname', at ischar);
@@ -84,11 +87,11 @@
     addParameter(p,'pause',      default_pause,      @islogical);
     addParameter(p,'range',      default_range,      @isnumeric);
 else
-    addParamValue(p,'obsname',   default_obsname,    @ischar);   %#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,'obsname',   default_obsname,    @ischar);    %#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>
 end
 p.parse(fname, copy, varargin{:});
 
@@ -97,6 +100,10 @@
     disp(p.Unmatched)
 end
 
+if (numel(p.Results.range) ~= 2)
+    error('range must be an array of length two ... [bottom top]')
+end
+
 if strcmp(p.Results.obsname,'none')
     nvars = 0;
 else
@@ -108,10 +115,6 @@
     error('file/fname <%s> does not exist',fname)
 end
 
-if (numel(p.Results.range) ~= 2)
-    error('range must be an array of length two ... [bottom top]')
-end
-
 %%--------------------------------------------------------------------
 % Harvest plotting info/metadata from netcdf file.
 %---------------------------------------------------------------------
@@ -176,7 +179,7 @@
     plotdat.Yrange      = Yrange;
     
     % Matlab likes strictly ASCENDING order for the axes and ticks,
-    % then you can impose the direction. 
+    % then you can impose the direction.
     
     if (plotdat.levels(1) > plotdat.levels(plotdat.nlevels))
         plotdat.YDir = 'reverse';
@@ -267,10 +270,8 @@
         end
         
     end
-    
 end
 
-
 %=====================================================================
 % 'Helper' functions
 %=====================================================================
@@ -282,13 +283,14 @@
 
 ges_copy = plotdat.ges_copy(plotdat.region,:);
 anl_copy = plotdat.anl_copy(plotdat.region,:);
-
 ges_bias = plotdat.ges_bias(plotdat.region,:);
 anl_bias = plotdat.anl_bias(plotdat.region,:);
 
+ges_Neval = plotdat.ges_Neval(plotdat.region,:);
 ges_Nposs = plotdat.ges_Nposs(plotdat.region,:);
 ges_Nused = plotdat.ges_Nused(plotdat.region,:);
 anl_Nused = plotdat.anl_Nused(plotdat.region,:);


More information about the Dart-dev mailing list