[Dart-dev] DART/branches Revision: 12017
dart at ucar.edu
dart at ucar.edu
Wed Oct 25 15:49:28 MDT 2017
thoar at ucar.edu
2017-10-25 15:49:24 -0600 (Wed, 25 Oct 2017)
237
Using the FlatEarth function instead of duplicated 'myworldmap' code.
One thing to note: if observations occur AT the same level as the landmasses,
they are plotted UNDERNEATH the landmasses when viewed from directly above.
Bother ...
Modified: DART/branches/rma_trunk/diagnostics/matlab/plot_obs_netcdf_diffs.m
===================================================================
--- DART/branches/rma_trunk/diagnostics/matlab/plot_obs_netcdf_diffs.m 2017-10-25 19:07:13 UTC (rev 12016)
+++ DART/branches/rma_trunk/diagnostics/matlab/plot_obs_netcdf_diffs.m 2017-10-25 21:49:24 UTC (rev 12017)
@@ -1,5 +1,5 @@
function obsstruct = plot_obs_netcdf_diffs(fname, ObsTypeString, region, ...
- CopyString1, CopyString2, QCString, maxQC, verbose, twoup)
+ CopyString1, CopyString2, QCString, maxQC, verbose, twoup)
%% plot_obs_netcdf_diffs will plot the difference between any two 'copies' of an observation-style netcdf file.
%
% bob = plot_obs_netcdf_diffs(fname, ObsTypeString, region, CopyString1, CopyString2, ...
@@ -56,28 +56,28 @@
% DART $Id$
if (exist(fname,'file') ~= 2)
- error('%s does not exist.',fname)
+ error('%s does not exist.',fname)
end
if ( twoup > 0 )
- clf; orient tall
- positions = [0.1, 0.55, 0.8, 0.35 ; ...
- 0.1, 0.10, 0.8, 0.35 ; ...
- 0.1, 0.02, 0.8, 0.08];
+ clf; orient tall
+ positions = [0.1, 0.55, 0.8, 0.35 ; ...
+ 0.1, 0.10, 0.8, 0.35 ; ...
+ 0.1, 0.02, 0.8, 0.08];
else
- clf; orient landscape
- positions = [0.1, 0.20, 0.8, 0.65 ; ...
- 0.1, 0.20, 0.8, 0.65 ; ...
- 0.1, 0.05, 0.8, 0.10];
+ clf; orient landscape
+ positions = [0.1, 0.20, 0.8, 0.65 ; ...
+ 0.1, 0.20, 0.8, 0.65 ; ...
+ 0.1, 0.05, 0.8, 0.10];
end
%% Read the observation sequence
obsstruct = read_obs_netcdf(fname, ObsTypeString, region, ...
- CopyString1, QCString, verbose);
+ CopyString1, QCString, verbose);
obsstruct2 = read_obs_netcdf(fname, ObsTypeString, region, ...
- CopyString2, QCString, verbose);
+ CopyString2, QCString, verbose);
xdat = obsstruct2.obs - obsstruct.obs;
obsstruct.obs = xdat;
@@ -87,31 +87,32 @@
if ( (~ isempty(obsstruct.qc)) && (~ isempty(maxQC)) )
- inds = find(obsstruct.qc > maxQC);
+ inds = find(obsstruct.qc > maxQC);
+ obsstruct.numflagged = length(inds);
+ fprintf('%d obs have a %s value greater than %f (i.e. "bad")\n', ...
+ obsstruct.numflagged, QCString, maxQC)
- obsstruct.numflagged = length(inds);
+ if (~isempty(inds))
+ flaggedobs.lons = obsstruct.lons(inds);
+ flaggedobs.lats = obsstruct.lats(inds);
+ flaggedobs.Ztyp = obsstruct.Ztyp(inds);
+ flaggedobs.z = obsstruct.z( inds);
+ flaggedobs.obs = obsstruct.obs( inds);
+ flaggedobs.qc = obsstruct.qc( inds);
+ end
- if (~isempty(inds))
- flaggedobs.lons = obsstruct.lons(inds);
- flaggedobs.lats = obsstruct.lats(inds);
- flaggedobs.Ztyp = obsstruct.Ztyp(inds);
- flaggedobs.z = obsstruct.z( inds);
- flaggedobs.obs = obsstruct.obs( inds);
- flaggedobs.qc = obsstruct.qc( inds);
- end
+ inds = find(obsstruct.qc <= maxQC);
+ obsstruct.numgood = length(inds);
+ fprintf('%d obs have a %s value less than or equal to %f (i.e. "good")\n', ...
+ obsstruct.numgood, QCString, maxQC)
- fprintf('%d obs have a %s value greater than %f\n', ...
- length(inds), QCString, maxQC)
+ bob = obsstruct.lons(inds); obsstruct.lons = bob;
+ bob = obsstruct.lats(inds); obsstruct.lats = bob;
+ bob = obsstruct.Ztyp(inds); obsstruct.Ztyp = bob;
+ bob = obsstruct.z( inds); obsstruct.z = bob;
+ bob = obsstruct.obs( inds); obsstruct.obs = bob;
+ bob = obsstruct.qc( inds); obsstruct.qc = bob;
- inds = find(obsstruct.qc <= maxQC);
-
- bob = obsstruct.lons(inds); obsstruct.lons = bob;
- bob = obsstruct.lats(inds); obsstruct.lats = bob;
- bob = obsstruct.Ztyp(inds); obsstruct.Ztyp = bob;
- bob = obsstruct.z( inds); obsstruct.z = bob;
- bob = obsstruct.obs( inds); obsstruct.obs = bob;
- bob = obsstruct.qc( inds); obsstruct.qc = bob;
More information about the Dart-dev
mailing list