[Dart-dev] [6207] DART/branches/development/matlab: Last little bit to support SQG model.
nancy at ucar.edu
nancy at ucar.edu
Thu May 30 17:32:13 MDT 2013
Revision: 6207
Author: thoar
Date: 2013-05-30 17:32:12 -0600 (Thu, 30 May 2013)
Log Message:
-----------
Last little bit to support SQG model.
Known not to work if trying to plot the True_State.nc phase space
because I built in a stupid dependence on knowing the min and
max ensemble member numbers and CheckModel() does not
recognize the true state as an ensemble member. Doh!
Modified Paths:
--------------
DART/branches/development/matlab/GetSqgInfo.m
DART/branches/development/matlab/PlotPhaseSpace.m
-------------- next part --------------
Modified: DART/branches/development/matlab/GetSqgInfo.m
===================================================================
--- DART/branches/development/matlab/GetSqgInfo.m 2013-05-30 22:31:16 UTC (rev 6206)
+++ DART/branches/development/matlab/GetSqgInfo.m 2013-05-30 23:32:12 UTC (rev 6207)
@@ -327,7 +327,7 @@
disp('To be a valid ensemble member, the CopyMetaData for the member')
disp('must start with the character string ''ensemble member''')
disp('None of them in do in your file.')
- fprintf('%s claims to have %d copies\n',fname, num_copies)
+ fprintf('%s claims to have %d copies\n',fname, numcopies)
error('netcdf file has no ensemble members.')
end
@@ -339,11 +339,14 @@
fprintf('ID %2d is %s\n',i,deblank(metadata(i,:)))
end
-IDstring = input( sprintf('Enter %d IDs to plot.\n(no intervening syntax, please)\n',numcopies) ,'s');
-copyid = str2num(IDstring);
+IDstring = input( sprintf('Enter %d ID(s) to plot.\n(no intervening syntax, please)\n',numcopies) ,'s');
+bob = str2num(IDstring);
-if (length(copyid) ~= numcopies)
- error('only entered %d, needed %d ... quitting',length(copyid),numcopies)
+% If entered more than desired, just use first N
+if (length(bob) >= numcopies)
+ copyid = bob(1:numcopies);
+else
+ error('only entered %d, needed %d ... quitting',length(bob),numcopies)
end
copystrings = cell(1,numcopies);
Modified: DART/branches/development/matlab/PlotPhaseSpace.m
===================================================================
--- DART/branches/development/matlab/PlotPhaseSpace.m 2013-05-30 22:31:16 UTC (rev 6206)
+++ DART/branches/development/matlab/PlotPhaseSpace.m 2013-05-30 23:32:12 UTC (rev 6207)
@@ -164,7 +164,7 @@
end
legend boxoff
- case {'fms_bgrid','pe2lyr','mitgcm_ocean','wrf','cam'}
+ case {'fms_bgrid','pe2lyr','mitgcm_ocean','wrf','cam','sqg'}
ens_mem_id = get_copy_index(pinfo.fname, pinfo.ens_mem); % errors out if no ens_mem
More information about the Dart-dev
mailing list