[Dart-dev] DART/branches Revision: 11097

dart at ucar.edu dart at ucar.edu
Fri Feb 10 17:38:15 MST 2017


thoar at ucar.edu
2017-02-10 17:38:10 -0700 (Fri, 10 Feb 2017)
162
Wrapping it up for the day.
Running lorenz_63/matlab/RunAllTests.m   and am up to PlotJeffCorrel.
Slowly removing all references the third-party netCDF toolbox.




Modified: DART/branches/rma_single_file/matlab/CheckModel.m
===================================================================
--- DART/branches/rma_single_file/matlab/CheckModel.m	2017-02-10 22:14:36 UTC (rev 11096)
+++ DART/branches/rma_single_file/matlab/CheckModel.m	2017-02-11 00:38:10 UTC (rev 11097)
@@ -22,7 +22,11 @@
 times      = ncread(fname,'time');
 timeunits  = ncreadatt(fname,'time','units');
 timebase   = sscanf(timeunits,'%*s%*s%d%*c%d%*c%d'); % YYYY MM DD
-timeorigin = datenum(timebase(1),timebase(2),timebase(3));
+if (timebase(1) > 0000) 
+   timeorigin = datenum(timebase(1),timebase(2),timebase(3));
+else
+   timeorigin = 0;
+end
 dates      = times + timeorigin;
 num_times  = length(dates);
 

Modified: DART/branches/rma_single_file/matlab/CheckModelCompatibility.m
===================================================================
--- DART/branches/rma_single_file/matlab/CheckModelCompatibility.m	2017-02-10 22:14:36 UTC (rev 11096)
+++ DART/branches/rma_single_file/matlab/CheckModelCompatibility.m	2017-02-11 00:38:10 UTC (rev 11097)
@@ -42,7 +42,11 @@
 times       = ncread( file1,'time');
 timeunits   = ncreadatt( file1,'time','units');
 timebase    = sscanf(timeunits,'%*s%*s%d%*c%d%*c%d'); % YYYY MM DD
-timeorigin  = datenum(timebase(1),timebase(2),timebase(3));
+if (timebase(1) > 0000) 
+   timeorigin = datenum(timebase(1),timebase(2),timebase(3));
+else
+   timeorigin = 0;
+end
 ttimes      = times + timeorigin;
 
 [tnum_vars,~] = ModelDimension(file1,tmodel);
@@ -58,7 +62,11 @@
 times       = ncread( file2,'time');
 timeunits   = ncreadatt( file2,'time','units');
 timebase    = sscanf(timeunits,'%*s%*s%d%*c%d%*c%d'); % YYYY MM DD
-timeorigin  = datenum(timebase(1),timebase(2),timebase(3));
+if (timebase(1) > 0000) 
+   timeorigin = datenum(timebase(1),timebase(2),timebase(3));
+else
+   timeorigin = 0;
+end
 dtimes      = times + timeorigin;
 
 [dnum_vars,~] = ModelDimension(file2,dmodel);

Modified: DART/branches/rma_single_file/matlab/PlotBins.m
===================================================================
--- DART/branches/rma_single_file/matlab/PlotBins.m	2017-02-10 22:14:36 UTC (rev 11096)
+++ DART/branches/rma_single_file/matlab/PlotBins.m	2017-02-11 00:38:10 UTC (rev 11097)
@@ -42,7 +42,7 @@
 end
 
 % Get the state for the truth
-truth_index = get_copy_index(pinfo.truth_file,'true state');
+% truth_index = get_copy_index(pinfo.truth_file,'true state');
 
 switch lower(pinfo.model)
 
@@ -54,13 +54,11 @@
          for j = 1:3
             ivar = (i - 1)*3 + j;
 
-            truth = get_hyperslab('fname',pinfo.truth_file, 'varname',pinfo.var, ...
-                        'copyindex',truth_index, 'stateindex',ivar, ...
+            truth = get_hyperslab('fname',pinfo.truth_file, ...
+                        'varname', pinfo.var, 'stateindex',ivar, 'squeeze', 'true', ...
                         'tindex1',pinfo.truth_time(1), 'tcount',pinfo.truth_time(2));
-            ens   = get_hyperslab('fname',pinfo.diagn_file, 'varname',pinfo.var, ...
-                        'stateindex',ivar, ...
-                        'copy1',pinfo.ensemble_indices(1), ...
-                        'copycount',pinfo.num_ens_members, ...
+            ens   = get_hyperslab('fname',pinfo.diagn_file, ...
+                        'varname', pinfo.var, 'stateindex',ivar, 'squeeze', 'true', ...
                         'tindex1',pinfo.diagn_time(1), 'tcount',pinfo.diagn_time(2));
 
             bins  = rank_hist(ens, truth);
@@ -85,14 +83,12 @@
       for ivar = pinfo.var_inds,
          iplot = iplot + 1;
 
-         truth = get_hyperslab('fname',pinfo.truth_file, 'varname',pinfo.var, ...
-                     'copyindex',truth_index, 'stateindex',ivar, ...
+         truth = get_hyperslab('fname',pinfo.truth_file, ...
+                     'varname',pinfo.var, 'stateindex',ivar, 'squeeze', 'true', ...
                      'tindex1',pinfo.truth_time(1), 'tcount',pinfo.truth_time(2));
-         ens   = get_hyperslab('fname',pinfo.diagn_file, 'varname',pinfo.var, ...
-                        'stateindex',ivar, ...
-                        'copy1',pinfo.ensemble_indices(1), ...
-                        'copycount',pinfo.num_ens_members, ...
-                        'tindex1',pinfo.diagn_time(1), 'tcount',pinfo.diagn_time(2));
+         ens   = get_hyperslab('fname',pinfo.diagn_file, ...
+                     'varname',pinfo.var, 'stateindex',ivar, 'squeeze', 'true', ...
+                     'tindex1',pinfo.diagn_time(1), 'tcount',pinfo.diagn_time(2));
 
          bins  = rank_hist(ens, truth);
          subplot(length(pinfo.var_inds), 1, iplot);
@@ -115,20 +111,18 @@


More information about the Dart-dev mailing list