[Dart-dev] [5734] DART/branches/development/matlab: Whitespace changes only.
nancy at ucar.edu
nancy at ucar.edu
Wed May 9 16:06:41 MDT 2012
Revision: 5734
Author: thoar
Date: 2012-05-09 16:06:41 -0600 (Wed, 09 May 2012)
Log Message:
-----------
Whitespace changes only. No user-visible changes.
Modified Paths:
--------------
DART/branches/development/matlab/BgridTotalError.m
DART/branches/development/matlab/CAMTotalError.m
DART/branches/development/matlab/CheckModelCompatibility.m
DART/branches/development/matlab/ChecknetCDFuse.m
DART/branches/development/matlab/DART.m
DART/branches/development/matlab/DiffnetCDFstate.m
DART/branches/development/matlab/GetBgridInfo.m
DART/branches/development/matlab/GetCalendarDate.m
DART/branches/development/matlab/GetCamInfo.m
DART/branches/development/matlab/GetMITgcm_oceanInfo.m
DART/branches/development/matlab/GetMPAS_ATMInfo.m
DART/branches/development/matlab/GetPe2lyrInfo.m
DART/branches/development/matlab/GetTIEGCMInfo.m
DART/branches/development/matlab/GetWRFInfo.m
DART/branches/development/matlab/ParseAlphaNumerics.m
DART/branches/development/matlab/PlotBins.m
DART/branches/development/matlab/PlotCEnsErrSpread.m
DART/branches/development/matlab/PlotEnsErrSpread.m
DART/branches/development/matlab/PlotEnsMeanTimeSeries.m
DART/branches/development/matlab/PlotEnsTimeSeries.m
DART/branches/development/matlab/PlotJeffCorrel.m
DART/branches/development/matlab/PlotTotalErr.m
DART/branches/development/matlab/PlotVarVarCorrel.m
DART/branches/development/matlab/ReadASCIIObsSeq.m
DART/branches/development/matlab/ReadBinaryObsSeq.m
DART/branches/development/matlab/ReadObsSeq.m
DART/branches/development/matlab/SetCopyID.m
DART/branches/development/matlab/SetCopyID2.m
DART/branches/development/matlab/SetVariableID.m
DART/branches/development/matlab/SimpleMap.m
DART/branches/development/matlab/StatObsSeq.m
DART/branches/development/matlab/WRFTotalError.m
DART/branches/development/matlab/get_DARTvars.m
DART/branches/development/matlab/get_copy_index.m
DART/branches/development/matlab/get_ens_size.m
DART/branches/development/matlab/get_qc_index.m
DART/branches/development/matlab/get_var_series.m
DART/branches/development/matlab/locations_in_region.m
DART/branches/development/matlab/parse.m
DART/branches/development/matlab/plot_ens_err_spread.m
DART/branches/development/matlab/plot_ens_mean_time_series.m
DART/branches/development/matlab/plot_ens_time_series.m
DART/branches/development/matlab/plot_jeff_correl.m
DART/branches/development/matlab/plot_phase_space.m
DART/branches/development/matlab/plot_reg_factor.m
DART/branches/development/matlab/plot_smoother_err.m
DART/branches/development/matlab/plot_total_err.m
DART/branches/development/matlab/plot_var_var_correl.m
DART/branches/development/matlab/read_state.m
DART/branches/development/matlab/scalebar.m
DART/branches/development/matlab/startup.m
DART/branches/development/matlab/worldmap.m
-------------- next part --------------
Modified: DART/branches/development/matlab/BgridTotalError.m
===================================================================
--- DART/branches/development/matlab/BgridTotalError.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/BgridTotalError.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -26,7 +26,7 @@
for ivar=1:pinfo.num_state_vars,
fprintf('Processing %s ...\n', pinfo.vars{ivar} )
-
+
rmse = zeros(pinfo.time_series_length,1);
sprd = zeros(pinfo.time_series_length,1);
varunits = nc_attget(pinfo.truth_file, pinfo.vars{ivar}, 'units');
@@ -47,7 +47,7 @@
case {'tmpi', 'veli'}
longitudes = nc_varget(pinfo.diagn_file, dimname);
case {'lev'}
- nlevels = dimlength;
+ nlevels = dimlength;
end
end
@@ -55,7 +55,7 @@
weights = SphereWeights(latitudes, longitudes);
for itime=1:pinfo.time_series_length,
-
+
truth = get_hyperslab('fname',pinfo.truth_file, 'varname',pinfo.vars{ivar}, ...
'copyindex',truth_index, 'timeindex',pinfo.truth_time(1)+itime-1);
ens = get_hyperslab('fname',pinfo.diagn_file, 'varname',pinfo.vars{ivar}, ...
@@ -82,7 +82,7 @@
%% Take the square root of the mean squared error
rmse(itime) = sqrt(ms_err);
sprd(itime) = sqrt(ms_spread);
-
+
end % loop over time
%-------------------------------------------------------------------
@@ -101,7 +101,7 @@
s1 = sprintf('%s %s Ensemble Mean', pinfo.model,pinfo.vars{ivar});
title({s1,pinfo.diagn_file},'interpreter','none','fontweight','bold')
-end % loop around variables
+end % loop around variables
clear truth ens spread err XY_spread
Modified: DART/branches/development/matlab/CAMTotalError.m
===================================================================
--- DART/branches/development/matlab/CAMTotalError.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/CAMTotalError.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -42,17 +42,17 @@
sprd = zeros(pinfo.time_series_length,1);
for itime=1:pinfo.time_series_length,
-
+
fprintf('Processing %s timestep %d of %d ...\n', ...
varname, itime, pinfo.time_series_length)
-
+
truth = get_hyperslab('fname',pinfo.truth_file, 'varname',varname, ...
'copyindex',truth_index, 'timeindex',pinfo.truth_time(1)+itime-1);
ens = get_hyperslab('fname',pinfo.diagn_file, 'varname',varname, ...
'copyindex',ens_mean_index, 'timeindex',pinfo.diagn_time(1)+itime-1);
spread = get_hyperslab('fname',pinfo.diagn_file, 'varname',varname, ...
'copyindex',ens_spread_index, 'timeindex',pinfo.diagn_time(1)+itime-1);
-
+
if (length(size(truth)) == 2)
nlev = 1;
elseif (length(size(truth)) == 3)
@@ -65,7 +65,7 @@
msqe_Z = zeros(nlev,1);
sprd_Z = zeros(nlev,1);
-
+
for ilevel=1:nlev,
slabS2E = (truth(:,:,ilevel) - ens(:,:,ilevel)).^2; % OK even if 2D iff ilevel = 1
@@ -76,12 +76,12 @@
msqe_Z(ilevel) = XY_err;
sprd_Z(ilevel) = XY_spread;
- end % loop over levels
+ end % loop over levels
%% Take the square root of the mean of all levels
rmse(itime) = sqrt(mean(msqe_Z));
sprd(itime) = sqrt(mean(sprd_Z));
-
+
end % loop over time
%-------------------------------------------------------------------
@@ -102,7 +102,7 @@
s1 = sprintf('%s %s Ensemble Mean', pinfo.model,pinfo.vars{ivar});
title({s1,pinfo.diagn_file},'interpreter','none','fontweight','bold')
-end % loop around variables
+end % loop around variables
clear truth ens spread err XY_spread
Modified: DART/branches/development/matlab/CheckModelCompatibility.m
===================================================================
--- DART/branches/development/matlab/CheckModelCompatibility.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/CheckModelCompatibility.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -4,9 +4,9 @@
% pinfo struct (with 2 filenames and 2 2-vector arrays for start/stop times).
% This routine fills in the 2-vectors with the time overlap region in a
% pinfo struct.
-% If the time indices are common between the 2 files it returns the
+% If the time indices are common between the 2 files it returns the
% [start,count] indices for each array (indexing starts at 1,N).
-% It is an error situation if there is no overlap ([-1,-1] for both).
+% It is an error situation if there is no overlap ([-1,-1] for both).
%% DART software - Copyright 2004 - 2011 UCAR. This open source software is
% provided by UCAR, "as is", without charge, subject to all terms of use at
@@ -41,7 +41,7 @@
%% Get some information from the file1
tmodel = nc_attget(file1,nc_global,'model');
-if (isempty(tmodel))
+if (isempty(tmodel))
error('%s has no ''model'' global attribute.',file1)
end
@@ -61,7 +61,7 @@
%% Get some information from the file2
dmodel = nc_attget(file1,nc_global,'model');
-if (isempty(dmodel))
+if (isempty(dmodel))
error('%s has no ''model'' global attribute.',file2)
end
@@ -185,15 +185,15 @@
if (abs(maxA - minB) < epsilon) , minB = maxA; end
if (abs(maxA - maxB) < epsilon) , maxB = maxA; end
-%% case 1: disjoint regions; simply return here because
+%% case 1: disjoint regions; simply return here because
% return struct was initialized to the 'no intersection' case.
-if ((minA < minB) && (maxA < minB))
+if ((minA < minB) && (maxA < minB))
return
end
%% case 2: B fully contained in A; return corresponding index nums of overlap
% include equal start & end points in this case.
-if ((minA <= minB) && (maxB <= maxA))
+if ((minA <= minB) && (maxB <= maxA))
minI = find(abs(A - minB) < epsilon);
maxI = find(abs(A - maxB) < epsilon);
minJ = 1;
@@ -230,7 +230,7 @@
function x = dim_length(fname,dimname)
%% Check for the existence of the named dimension and return it
-% if it exists. If it does not, error out with a useful message.
+% if it exists. If it does not, error out with a useful message.
info = nc_info(fname);
n = length(dimname);
@@ -242,7 +242,7 @@
end
end
-if isempty(x)
+if isempty(x)
error('%s has no dimension named %s',fname,dimname)
end
Modified: DART/branches/development/matlab/ChecknetCDFuse.m
===================================================================
--- DART/branches/development/matlab/ChecknetCDFuse.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/ChecknetCDFuse.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -1,6 +1,6 @@
function x = ChecknetCDFuse(fname)
-%% ChecknetCDFuse checks to see if the netcdf pieces are available.
-%
+%% ChecknetCDFuse checks to see if the netcdf pieces are available.
+%
% x = ChecknetCDFuse(fname);
%
% fname ... a filename that contains diagnostic information.
Modified: DART/branches/development/matlab/DART.m
===================================================================
--- DART/branches/development/matlab/DART.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/DART.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -1,12 +1,12 @@
-%% DART - the list of routines useful for exploring the output of the DART
+%% DART - the list of routines useful for exploring the output of the DART
% ensemble assimilation software. This is not intended to be an exhaustive
% list, but it should get you started. -- Tim
-%
+%
% $Id$
-%
+%
% DART/matlab These functions explore the [Truth,] Prior,Posterior netCDF
% files. Useful for "state-space" diagnostics.
-% plot_bins.m rank histograms
+% plot_bins.m rank histograms
% plot_correl.m space-time series of correlation
% plot_ens_err_spread.m summary plots of the ensemble error and ensemble spread
% plot_ens_mean_time_series.m time series of ensemble mean and truth
@@ -16,36 +16,36 @@
% plot_smoother_err.m global error and spread using the smoother
% plot_total_err.m plots of global error and spread of ensemble mean
% plot_var_var_correl.m correlation of a vrbl at a time and another vrbl at all times
-%
-%
+%
+%
% DART/diagnostics/matlab This block requires that the observation sequences in
% question have been run through "obs_diag" and have
% resulted in "obs_diag_output.nc" files. Strictly
% "observation-space" diagnostics. Typical quantities of
% interest are : rmse, bias, spread, totalspread, ...
-% plot_observation_locations.m locations of observations, by QC value
+% plot_observation_locations.m locations of observations, by QC value
% plot_profile.m vertical profile of a single quantity
% plot_bias_xxx_profile.m vertical profile of the bias and any other quantity
% plot_rmse_xxx_profile.m vertical profile of the rmse and any other quantity
% plot_evolution.m temporal evolution of any quantity
% plot_rmse_xxx_evolution.m temporal evolution of the rmse and one other quantity
-% plot_wind_vectors.m This is a "one-off" ... since DART actually only knows
-% about univariate observations, matching them into pairs
+% plot_wind_vectors.m This is a "one-off" ... since DART actually only knows
+% about univariate observations, matching them into pairs
% is perilous ...
-%
-%
-% DART/diagnostics/matlab These functions require processing
-% observation sequences into netCDF files with
+%
+%
+% DART/diagnostics/matlab These functions require processing
+% observation sequences into netCDF files with
% "obs_seq_to_netcdf" - which currently does not preserve
% all of the observation sequence metadata for some of the
-% more complicated observation types.
+% more complicated observation types.
% read_obs_netcdf.m Reads a netCDF observation sequence and returns a structure.
-% plot_obs_netcdf.m creates a 2D or 3D plot of the observation locations
+% plot_obs_netcdf.m creates a 2D or 3D plot of the observation locations
% and values - and rejected observations.
% plot_obs_netcdf_diffs.m ditto, only for the difference of two observation copies
% - the observation and the ensemble mean, for example.
-%
-%
+%
+%
% DART/models/<modelname>/matlab Each model has an optional matlab directory where
% the model developers are free to supply whatever functions
% or scripts they deem useful.
Modified: DART/branches/development/matlab/DiffnetCDFstate.m
===================================================================
--- DART/branches/development/matlab/DiffnetCDFstate.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/DiffnetCDFstate.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -1,6 +1,6 @@
function DiffnetCDFstate(file1,file2,outfile)
-%% DiffnetCDFstate checks to see if the netcdf pieces are available.
-%
+%% DiffnetCDFstate checks to see if the netcdf pieces are available.
+%
% DiffnetCDFstate(nc1, nc2, outfile);
%
% fname ... a filename that contains diagnostic information.
@@ -57,7 +57,7 @@
a = min(c);
b = max(c);
-clear c
+clear c
% Write the min and max of the differences to a file
Modified: DART/branches/development/matlab/GetBgridInfo.m
===================================================================
--- DART/branches/development/matlab/GetBgridInfo.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/GetBgridInfo.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -205,11 +205,11 @@
for i = 2:length(prognostic_vars),
str = sprintf(' %s %s ',str,prognostic_vars{i});
end
-fprintf('Default variable is ''%s'', if this is OK, <cr>;\n',pgvar)
+fprintf('Default variable is ''%s'', if this is OK, <cr>;\n',pgvar)
fprintf('If not, please enter one of: %s\n',str)
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), pgvar = deblank(varstring); end
+if ~isempty(varstring), pgvar = deblank(varstring); end
@@ -222,10 +222,10 @@
min(times),max(times))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), time = str2num(varstring); end
+if ~isempty(varstring), time = str2num(varstring); end
d = abs(time - times); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
timeind = ind(1); % use the first one
time = times(timeind);
@@ -236,7 +236,7 @@
% shouldn't for the bgrid ... but for future expansion ...
if (nargin == 3), level = deflevel; else level = 1; end
-if strcmp(pgvar,'ps') ==1
+if strcmp(pgvar,'ps') ==1
disp('''ps'' only has one level, using it.')
level = 1;
lvlind = 1;
@@ -246,10 +246,10 @@
min(levels),max(levels))
varstring = input('we''ll use the closest (no syntax required)\n','s');
- if ~isempty(varstring), level = str2num(varstring); end
+ if ~isempty(varstring), level = str2num(varstring); end
d = abs(level - levels); % crude distance
- ind = find(min(d) == d); % multiple minima possible
+ ind = find(min(d) == d); % multiple minima possible
lvlind = ind(1); % use the first one
level = levels(lvlind);
end
@@ -267,15 +267,15 @@
lons = VelI;
end
-fprintf('Default longitude is %f, if this is OK, <cr>;\n',lon)
+fprintf('Default longitude is %f, if this is OK, <cr>;\n',lon)
fprintf('If not, enter a longitude between %.2f and %.2f, we use the closest.\n', ...
min(lons),max(lons))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), lon = str2num(varstring); end
+if ~isempty(varstring), lon = str2num(varstring); end
d = abs(lon - lons); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
lonind = ind(1); % use the first one
lon = lons(lonind);
@@ -297,10 +297,10 @@
min(lats),max(lats))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), lat = str2num(varstring); end
+if ~isempty(varstring), lat = str2num(varstring); end
d = abs(lat - lats); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
latind = ind(1); % use the first one
lat = lats(latind);
Modified: DART/branches/development/matlab/GetCalendarDate.m
===================================================================
--- DART/branches/development/matlab/GetCalendarDate.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/GetCalendarDate.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -1,7 +1,7 @@
function h = GetCalendarDate(seconds,days,calendartype)
%% h = GetCalendarDate(seconds,days [,calendartype] )
%
-% seconds, days are the DART times
+% seconds, days are the DART times
%
% EXAMPLE:
%
@@ -17,7 +17,7 @@
% $Revision$
% $Date$
-if (nargin < 2)
+if (nargin < 2)
error('Must supply at least two arguments, seconds and days')
elseif (nargin ==2)
calendartype = 'Gregorian';
Modified: DART/branches/development/matlab/GetCamInfo.m
===================================================================
--- DART/branches/development/matlab/GetCamInfo.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/GetCamInfo.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -135,8 +135,8 @@
if ( exist(pstruct.truth_file,'file') )
pinfo.truth_file = pstruct.truth_file;
end
-
+
case 'plotphasespace'
disp('Getting information for the ''X'' variable.')
@@ -202,11 +202,11 @@
for i = 2:length(prognostic_vars),
str = sprintf(' %s %s ',str,prognostic_vars{i});
end
-fprintf('Default variable is ''%s'', if this is OK, <cr>;\n',pgvar)
+fprintf('Default variable is ''%s'', if this is OK, <cr>;\n',pgvar)
fprintf('If not, please enter one of: %s\n',str)
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), pgvar = strtrim(varstring); end
+if ~isempty(varstring), pgvar = strtrim(varstring); end
inds = strfind(pgvar,',');
pgvar(inds) = '';
@@ -240,7 +240,7 @@
timeinds = 1:ntimes;
d = abs(tindex - timeinds); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
timeind = ind(1); % use the first one
time = times(timeind);
@@ -252,7 +252,7 @@
% shouldn't for cam ... but for future expansion ...
if (nargin == 3), lvlind = deflevel; else lvlind = 1; end
-if strcmpi(pgvar,'ps') ==1
+if strcmpi(pgvar,'ps') ==1
disp('''PS'' only has one level, using it.')
level = 1;
lvlind = 1;
@@ -262,10 +262,10 @@
1,length(levels))
varstring = input('we''ll use the closest (no syntax required)\n','s');
- if ~isempty(varstring), lvlind = str2double(varstring); end
+ if ~isempty(varstring), lvlind = str2double(varstring); end
% d = abs(level - levels); % crude distance
- % ind = find(min(d) == d); % multiple minima possible
+ % ind = find(min(d) == d); % multiple minima possible
% lvlind = ind(1); % use the first one
level = levels(lvlind);
end
@@ -276,15 +276,15 @@
%----------------------------------------------------------------------
if (nargin == 2), lon = deflon; else lon = 255.0; end
-fprintf('Default longitude is %f, if this is OK, <cr>;\n',lon)
+fprintf('Default longitude is %f, if this is OK, <cr>;\n',lon)
fprintf('If not, enter a longitude between %.2f and %.2f, we use the closest.\n', ...
min(lons),max(lons))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), lon = str2double(varstring); end
+if ~isempty(varstring), lon = str2double(varstring); end
d = abs(lon - lons); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
lonind = ind(1); % use the first one
lon = lons(lonind);
@@ -299,10 +299,10 @@
min(lats),max(lats))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), lat = str2double(varstring); end
+if ~isempty(varstring), lat = str2double(varstring); end
d = abs(lat - lats); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
latind = ind(1); % use the first one
lat = lats(latind);
Modified: DART/branches/development/matlab/GetMITgcm_oceanInfo.m
===================================================================
--- DART/branches/development/matlab/GetMITgcm_oceanInfo.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/GetMITgcm_oceanInfo.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -195,11 +195,11 @@
for i = 2:length(prognostic_vars),
str = sprintf(' %s %s ',str,prognostic_vars{i});
end
-fprintf('Default variable is ''%s'', if this is OK, <cr>;\n',pgvar)
+fprintf('Default variable is ''%s'', if this is OK, <cr>;\n',pgvar)
fprintf('If not, please enter one of: %s\n',str)
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), pgvar = strtrim(varstring); end
+if ~isempty(varstring), pgvar = strtrim(varstring); end
inds = strfind(pgvar,',');
pgvar(inds) = '';
a = strread(pgvar,'%s','delimiter',' ');
@@ -214,10 +214,10 @@
min(times),max(times))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), time = str2num(varstring); end
+if ~isempty(varstring), time = str2num(varstring); end
d = abs(time - times); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
timeind = ind(1); % use the first one
time = times(timeind);
@@ -232,7 +232,7 @@
lvlind = 1;
end
-if strcmp(lower(pgvar),'ssh') ==1
+if strcmp(lower(pgvar),'ssh') ==1
disp('''SSH'' only has one level, using it.')
level = 1;
lvlind = 1;
@@ -242,10 +242,10 @@
1,length(levels))
varstring = input('we''ll use the closest (no syntax required)\n','s');
- if ~isempty(varstring), lvlind = str2num(varstring); end
+ if ~isempty(varstring), lvlind = str2num(varstring); end
% d = abs(level - levels); % crude distance
- % ind = find(min(d) == d); % multiple minima possible
+ % ind = find(min(d) == d); % multiple minima possible
% lvlind = ind(1); % use the first one
level = levels(lvlind);
end
@@ -268,10 +268,10 @@
min(lons),max(lons))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), lon = str2num(varstring); end
+if ~isempty(varstring), lon = str2num(varstring); end
d = abs(lon - lons); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
lonind = ind(1); % use the first one
lon = lons(lonind);
@@ -293,10 +293,10 @@
min(lats),max(lats))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), lat = str2num(varstring); end
+if ~isempty(varstring), lat = str2num(varstring); end
d = abs(lat - lats); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
latind = ind(1); % use the first one
lat = lats(latind);
Modified: DART/branches/development/matlab/GetMPAS_ATMInfo.m
===================================================================
--- DART/branches/development/matlab/GetMPAS_ATMInfo.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/GetMPAS_ATMInfo.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -7,7 +7,7 @@
%
% pinfo_in Name of existing pinfo struct, e.g. output from CheckModelCompatibility
% fname Name of the DART netcdf file - usually [Prior,Posterior]_Diag.nc
-% routine name of subsequent plot routine.
+% routine name of subsequent plot routine.
%% DART software - Copyright 2004 - 2011 UCAR. This open source software is
% provided by UCAR, "as is", without charge, subject to all terms of use at
@@ -48,7 +48,7 @@
case {'plottotalerr'}
pinfo.fname = fname;
-
+
case {'plotbins','plotenserrspread','plotensmeantimeseries','plotenstimeseries'}
pgvar = GetVarString(pinfo_in.vars);
@@ -142,7 +142,7 @@
% So now I have to figure out if the posterior and prior copy metadata match.
for i = 1:copy,
- copyi = get_copy_index(pinfo_in.posterior_file,copymetadata{i});
+ copyi = get_copy_index(pinfo_in.posterior_file,copymetadata{i});
pstruct.postcopyindices = copyi;
end
@@ -203,7 +203,7 @@
pinfo.ltype = ltype;
otherwise
-
+
error('%s unsupported for %s',routine, pinfo.model)
end
@@ -219,11 +219,11 @@
for i = 2:length(prognostic_vars),
str = sprintf(' %s %s ',str,prognostic_vars{i});
end
-fprintf('Default variable is ''%s'', if this is OK, <cr>;\n',pgvar)
+fprintf('Default variable is ''%s'', if this is OK, <cr>;\n',pgvar)
fprintf('If not, please enter one of: %s\n',str)
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), pgvar = deblank(varstring); end
+if ~isempty(varstring), pgvar = deblank(varstring); end
@@ -238,7 +238,7 @@
time = deftime;
tindex = find(times == deftime);
else
- if (ntimes < 2)
+ if (ntimes < 2)
tindex = round(ntimes/2);
else
tindex = 1;
@@ -251,11 +251,11 @@
fprintf('Pertaining to %s and %s \n',datestr(times(1)),datestr(times(ntimes)))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), tindex = str2num(varstring); end
+if ~isempty(varstring), tindex = str2num(varstring); end
timeinds = 1:ntimes;
d = abs(tindex - timeinds); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
timeind = ind(1); % use the first one
time = times(timeind);
@@ -282,7 +282,7 @@
lvlind = 1;
else
-
+
nlevels = varinfo.Size(vertdim);
levels = 1:nlevels;
if (nargin == 3)
@@ -295,10 +295,10 @@
fprintf('If not, enter a level index between 1 and %d, inclusive ...\n',nlevels)
varstring = input('we''ll use the closest (no syntax required)\n','s');
- if ~isempty(varstring), level = str2num(varstring); end
+ if ~isempty(varstring), level = str2num(varstring); end
d = abs(level - levels); % crude distance
- ind = find(min(d) == d); % multiple minima possible
+ ind = find(min(d) == d); % multiple minima possible
lvlind = ind(1); % use the first one
level = levels(lvlind);
@@ -332,14 +332,14 @@
if ~isempty(varstring)
nums = str2num(varstring);
- if (length(nums) ~= 2)
+ if (length(nums) ~= 2)
error('Did not get two indices for the lat lon pair.')
end
lat = nums(1);
lon = nums(2);
end
-% For simplicity I will pick the grid cell whose center is closest
+% For simplicity I will pick the grid cell whose center is closest
% to the point of interest. This is not a perfect solution, should really
% check the neighboring cells to see if it is INSIDE the cell,
% but if you are interested in that level of accuracy, you're on your own.
Modified: DART/branches/development/matlab/GetPe2lyrInfo.m
===================================================================
--- DART/branches/development/matlab/GetPe2lyrInfo.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/GetPe2lyrInfo.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -201,7 +201,7 @@
fprintf('If not, please enter one of: %s\n',str)
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), pgvar = deblank(varstring); end
+if ~isempty(varstring), pgvar = deblank(varstring); end
function [time, timeind] = GetTime(times, deftime)
@@ -213,10 +213,10 @@
min(times),max(times))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), time = str2num(varstring); end
+if ~isempty(varstring), time = str2num(varstring); end
d = abs(time - times); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
timeind = ind(1); % use the first one
time = times(timeind);
@@ -232,10 +232,10 @@
min(levels),max(levels))
varstring = input('we''ll use the closest (no syntax required)\n','s');
-if ~isempty(varstring), level = str2num(varstring); end
+if ~isempty(varstring), level = str2num(varstring); end
d = abs(level - levels); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
lvlind = ind(1); % use the first one
level = levels(lvlind);
@@ -244,15 +244,15 @@
%----------------------------------------------------------------------
if (nargin == 2), lon = deflon; else lon = 255.0; end
-fprintf('Default longitude is %f, if this is OK, <cr>;\n',lon)
+fprintf('Default longitude is %f, if this is OK, <cr>;\n',lon)
fprintf('If not, enter a longitude between %.2f and %.2f, we use the closest.\n', ...
min(lons),max(lons))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), lon = str2num(varstring); end
+if ~isempty(varstring), lon = str2num(varstring); end
d = abs(lon - lons); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
lonind = ind(1); % use the first one
lon = lons(lonind);
@@ -266,10 +266,10 @@
min(lats),max(lats))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), lat = str2num(varstring); end
+if ~isempty(varstring), lat = str2num(varstring); end
d = abs(lat - lats); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
latind = ind(1); % use the first one
lat = lats(latind);
Modified: DART/branches/development/matlab/GetTIEGCMInfo.m
===================================================================
--- DART/branches/development/matlab/GetTIEGCMInfo.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/GetTIEGCMInfo.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -74,7 +74,7 @@
comp_var = GetVar(prognostic_vars, base_var);
[comp_lvl, comp_lvlind] = GetLevel( comp_var,levels, base_lvlind);
- pinfo.model = model;
+ pinfo.model = model;
pinfo.base_var = base_var;
pinfo.comp_var = comp_var;
pinfo.base_time = base_time;
@@ -148,8 +148,8 @@
if ( exist(pstruct.truth_file,'file') )
pinfo.truth_file = pstruct.truth_file;
end
-
+
case 'plotphasespace'
disp('Getting information for the ''X'' variable.')
@@ -216,11 +216,11 @@
for i = 2:length(prognostic_vars),
str = sprintf(' %s %s ',str,prognostic_vars{i});
end
-fprintf('Default variable is ''%s'', if this is OK, <cr>;\n',pgvar)
+fprintf('Default variable is ''%s'', if this is OK, <cr>;\n',pgvar)
fprintf('If not, please enter one of: %s\n',str)
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), pgvar = strtrim(varstring); end
+if ~isempty(varstring), pgvar = strtrim(varstring); end
inds = strfind(pgvar,',');
pgvar(inds) = '';
@@ -254,7 +254,7 @@
timeinds = 1:ntimes;
d = abs(tindex - timeinds); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
timeind = ind(1); % use the first one
time = times(timeind);
@@ -271,7 +271,7 @@
1,length(levels))
varstring = input('we''ll use the closest (no syntax required)\n','s');
-if ~isempty(varstring), lvlind = str2num(varstring); end
+if ~isempty(varstring), lvlind = str2num(varstring); end
level = levels(lvlind);
@@ -281,15 +281,15 @@
%----------------------------------------------------------------------
if (nargin == 3), lon = deflon; else lon = 255.0-360.0; end
-fprintf('Default longitude is %f, if this is OK, <cr>;\n',lon)
+fprintf('Default longitude is %f, if this is OK, <cr>;\n',lon)
fprintf('If not, enter a longitude between %.2f and %.2f, we use the closest.\n', ...
min(lons),max(lons))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), lon = str2num(varstring); end
+if ~isempty(varstring), lon = str2num(varstring); end
d = abs(lon - lons); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
lonind = ind(1); % use the first one
lon = lons(lonind);
@@ -304,10 +304,10 @@
min(lats),max(lats))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), lat = str2num(varstring); end
+if ~isempty(varstring), lat = str2num(varstring); end
d = abs(lat - lats); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
latind = ind(1); % use the first one
lat = lats(latind);
Modified: DART/branches/development/matlab/GetWRFInfo.m
===================================================================
--- DART/branches/development/matlab/GetWRFInfo.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/GetWRFInfo.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -48,14 +48,14 @@
polar = varget(fname, 'POLAR');
%% Get the global metadata from a WRF DART diagnostic netCDF file.
-% If there is only one domain, we know what to do.
+% If there is only one domain, we know what to do.
% otherwise, ask which domain is of interest.
dinfo = nc_getdiminfo(fname,'domain'); % no graceful error
num_domains = dinfo.Length;
dID = 1;
-if (num_domains > 1)
+if (num_domains > 1)
dID = GetDomain(num_domains);
end
@@ -175,7 +175,7 @@
% So now I have to figure out if the posterior and prior copy metadata match.
for i = 1:copy,
- copyi = get_copy_index(pinfo_in.posterior_file,copymetadata{i});
+ copyi = get_copy_index(pinfo_in.posterior_file,copymetadata{i});
pstruct.postcopyindices = copyi;
end
@@ -245,13 +245,13 @@
function domainid = GetDomainID(ndomains)
%----------------------------------------------------------------------
-fprintf('There are %d domains. Default is to use domain %d.\n.',ndomains,ndomains)
+fprintf('There are %d domains. Default is to use domain %d.\n.',ndomains,ndomains)
fprintf('If this is OK, <cr>; If not, enter domain of interest:\n')
domainid = input('(no syntax required)\n');
-if ~isempty(domainid), domainid = ndomains; end
+if ~isempty(domainid), domainid = ndomains; end
-if ( (domainid > 0) && (domainid <= ndomains))
+if ( (domainid > 0) && (domainid <= ndomains))
error('domain must be between 1 and %d, you entered %d',ndomains,domainid)
end
@@ -265,11 +265,11 @@
for i = 2:length(prognostic_vars),
str = sprintf(' %s %s ',str,prognostic_vars{i});
end
-fprintf('Default variable is ''%s'', if this is OK, <cr>;\n',pgvar)
+fprintf('Default variable is ''%s'', if this is OK, <cr>;\n',pgvar)
fprintf('If not, please enter one of: %s\n',str)
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), pgvar = deblank(varstring); end
+if ~isempty(varstring), pgvar = deblank(varstring); end
@@ -284,7 +284,7 @@
time = deftime;
tindex = find(times == deftime);
else
- if (ntimes < 2)
+ if (ntimes < 2)
tindex = round(ntimes/2);
else
tindex = 1;
@@ -297,11 +297,11 @@
fprintf('Pertaining to %s and %s \n',datestr(times(1)),datestr(times(ntimes)))
varstring = input('(no syntax required)\n','s');
-if ~isempty(varstring), tindex = str2num(varstring); end
+if ~isempty(varstring), tindex = str2num(varstring); end
timeinds = 1:ntimes;
d = abs(tindex - timeinds); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
timeind = ind(1); % use the first one
time = times(timeind);
@@ -324,7 +324,7 @@
else
levelvar = varinfo.Dimension{leveldim};
- dinfo = nc_getdiminfo(fname,levelvar);
+ dinfo = nc_getdiminfo(fname,levelvar);
levels = 1:dinfo.Length;
if (isempty(level)), level = levels(1); end
@@ -334,10 +334,10 @@
min(levels),max(levels))
varstring = input('we''ll use the closest (no syntax required)\n','s');
- if ~isempty(varstring), level = str2num(varstring); end
+ if ~isempty(varstring), level = str2num(varstring); end
d = abs(level - levels); % crude distance
- ind = find(min(d) == d); % multiple minima possible
+ ind = find(min(d) == d); % multiple minima possible
lvlind = ind(1); % use the first one
level = levels(lvlind);
@@ -409,7 +409,7 @@
if ~isempty(varstring)
nums = str2num(varstring);
- if (length(nums) ~= 2)
+ if (length(nums) ~= 2)
error('Did not get two indices for the lat lon pair.')
end
latind = nums(1);
@@ -431,11 +431,11 @@
loninds = 1:nlon;
d = abs(latind - latinds); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
latind = ind(1); % use the first one
d = abs(lonind - loninds); % crude distance
-ind = find(min(d) == d); % multiple minima possible
+ind = find(min(d) == d); % multiple minima possible
lonind = ind(1); % use the first one
lat = latmat(latind,lonind);
@@ -448,10 +448,10 @@
%
% function dist = arcdist(lat,lon,latvec,lonvec)
%
-% lat,lon MUST be scalars
+% lat,lon MUST be scalars
% lat1,lon1 lat1,lon1 can be any shape (but must match each other)
%
-% enter:
+% enter:
% lat1,lon1 = lat, lon (in degrees)
% lat2,lon2 = lat, lon (for loc 2)
% returns:
@@ -459,7 +459,7 @@
%
% Assumes a spherical earth and fractional lat/lon coords
%
-% Example (1 degree at the equator):
+% Example (1 degree at the equator):
% dist = arcdist(0.0,0.0,0.0,1.0) % 1 degree longitude
% dist = arcdist(0.0,0.0,1.0,0.0) % 1 degree latitude
% dist = arcdist(60.0,0.0,60.0,1.0) % 1 degree longitude at a high latitude
@@ -480,7 +480,7 @@
ang1 = cos(colat2).*cos(colat1);
ang2 = sin(colat2).*sin(colat1).*cos(alpha);
-if ( prod(Dlat1) == 1 )
+if ( prod(Dlat1) == 1 )
dist = acos(ang1 + ang2)*r;
else
dist = reshape(acos(ang1 + ang2)*r,Dlat2);
@@ -509,7 +509,7 @@
function x = varget(filename,varname)
-%% get a varible from the netcdf file, if it does not exist,
+%% get a varible from the netcdf file, if it does not exist,
% do not die such a theatrical death ... return an empty.
if ( nc_isvar(filename,varname) )
Modified: DART/branches/development/matlab/ParseAlphaNumerics.m
===================================================================
--- DART/branches/development/matlab/ParseAlphaNumerics.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/ParseAlphaNumerics.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -1,5 +1,5 @@
function [vrbl, vrbl_inds] = ParseAlphaNumerics(IDstring)
-%% ParseAlphaNumerics - extricates a variable name from subsequent IDs
+%% ParseAlphaNumerics - extricates a variable name from subsequent IDs
% str1 = ' X 1 3 4 89'
% [alpha, numerics] = ParseAlphaNumerics(str1)
% alpha = 'X'
Modified: DART/branches/development/matlab/PlotBins.m
===================================================================
--- DART/branches/development/matlab/PlotBins.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/PlotBins.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -116,7 +116,7 @@
clf; iplot = 0;
for ivar = pinfo.var_inds,
iplot = iplot + 1;
-
+
truth = get_hyperslab('fname',pinfo.truth_file, 'varname',pinfo.var, ...
'copyindex',truth_index, 'stateindex',ivar, ...
'tindex1',pinfo.truth_time(1), 'tcount',pinfo.truth_time(2));
Modified: DART/branches/development/matlab/PlotCEnsErrSpread.m
===================================================================
--- DART/branches/development/matlab/PlotCEnsErrSpread.m 2012-05-09 22:05:37 UTC (rev 5733)
+++ DART/branches/development/matlab/PlotCEnsErrSpread.m 2012-05-09 22:06:41 UTC (rev 5734)
@@ -14,7 +14,7 @@
% this sets start/stop time indices for both truth and diagn file now
pinfo = CheckModelCompatibility(pinfo.truth_file, pinfo.diagn_file)
-model = nc_attget(pinfo.truth_file, nc_global, 'model');
+model = nc_attget(pinfo.truth_file, nc_global, 'model');
timeunits = nc_attget(pinfo.truth_file,'time','units');
nvars = 4;
@@ -28,9 +28,9 @@
rms = zeros(num_times, nvars, num_levels);
sd_final = zeros(num_times, nvars, num_levels);
-% Get the indices for the true state, ensemble mean and spread
-% The metadata is queried to determine which "copy" is appropriate.
-truth_index = get_copy_index(pinfo.truth_file, 'true state' );
+% Get the indices for the true state, ensemble mean and spread
+% The metadata is queried to determine which "copy" is appropriate.
+truth_index = get_copy_index(pinfo.truth_file, 'true state' );
ens_mean_index = get_copy_index(pinfo.diagn_file, 'ensemble mean');
ens_spread_index = get_copy_index(pinfo.diagn_file, 'ensemble spread');
@@ -89,7 +89,7 @@
rms(:, ivar, ilevel) = mean(abs(ens_err),2);
sd_final(:, ivar, ilevel) = mean(sd,2);
-
+
@@ Diff output truncated at 40000 characters. @@
More information about the Dart-dev
mailing list