[Dart-dev] DART/branches Revision: 11088

dart at ucar.edu dart at ucar.edu
Thu Feb 9 16:50:26 MST 2017


thoar at ucar.edu
2017-02-09 16:50:26 -0700 (Thu, 09 Feb 2017)
250
plot_total_err works with all the low-order models EXCEPT lorenz_96_2scale, forced_lorenz_96, and simple_advection.

plot_ens_time_series and plot_ens_mean_time series work for all the low-order models.

the bgrid model has not been supported yet.





Modified: DART/branches/rma_single_file/matlab/CheckModel.m
===================================================================
--- DART/branches/rma_single_file/matlab/CheckModel.m	2017-02-09 23:50:03 UTC (rev 11087)
+++ DART/branches/rma_single_file/matlab/CheckModel.m	2017-02-09 23:50:26 UTC (rev 11088)
@@ -57,8 +57,7 @@
 
    case {'lorenz_96', 'lorenz_04'}
 
-      num_vars      = dim_length(fname,'StateVariable'); % determine # of state varbls
-      StateVariable =  nc_varget(fname,'StateVariable');
+      num_vars = dim_length(fname,'location'); % determine # of state varbls
 
       % The only trick is to pick an equally-spaced subset of state
       % variables for the default.
@@ -73,8 +72,8 @@
               'ensemble_indices',ens_indices, ...
               'time',dates, ...
               'time_series_length',num_times, ...
-              'min_state_var',min(StateVariable), ...
-              'max_state_var',max(StateVariable), ...
+              'min_state_var',1, ...
+              'max_state_var',num_vars, ...
               'def_state_vars',def_state_vars);
 
       vars.fname = fname;

Modified: DART/branches/rma_single_file/matlab/PlotEnsMeanTimeSeries.m
===================================================================
--- DART/branches/rma_single_file/matlab/PlotEnsMeanTimeSeries.m	2017-02-09 23:50:03 UTC (rev 11087)
+++ DART/branches/rma_single_file/matlab/PlotEnsMeanTimeSeries.m	2017-02-09 23:50:26 UTC (rev 11088)
@@ -70,15 +70,15 @@
 
             % If the truth is known ...
             if ( have_truth )
-               truth = get_hyperslab('fname',pinfo.truth_file, 'varname',pinfo.var, ...
-                           'copyindex',truth_index, 'stateindex',ivar, ...
+               truth = get_hyperslab('fname',pinfo.truth_file, ...
+                           'varname','state', 'stateindex',ivar, 'squeeze','true', ...
                            'tindex1', pinfo.truth_time(1), 'tcount',pinfo.truth_time(2));
                plot(pinfo.time,truth,'b','LineWidth',1.0); hold on;
                legendstr = 'True State';
             end
 
-            ens_mean = get_hyperslab('fname',pinfo.diagn_file, 'varname',pinfo.var, ...
-                           'copyindex',ens_mean_index, 'stateindex',ivar, ...
+            ens_mean = get_hyperslab('fname',pinfo.diagn_file, ...
+                           'varname','state_mean', 'stateindex',ivar, ...
                            'tindex1',pinfo.diagn_time(1), 'tcount',pinfo.diagn_time(2));
             plot(pinfo.time,ens_mean,'r','LineWidth',1.0)
 
@@ -98,7 +98,7 @@
 
    case {'lorenz_63','lorenz_84'}
 
-      %% Use one figure with three(usually) subplots
+      % Use one figure with three subplots
       figure(1); clf; iplot = 0;
       for ivar = pinfo.var_inds,
 
@@ -154,8 +154,8 @@
       for ivar = pinfo.var_inds,
             iplot = iplot + 1;
             subplot(length(pinfo.var_inds), 1, iplot);
-            ens_mean = get_hyperslab('fname',pinfo.diagn_file, 'varname',pinfo.var, ...
-                           'copyindex',ens_mean_index, 'stateindex',ivar, ...
+            ens_mean = get_hyperslab('fname',pinfo.diagn_file, ...
+                           'varname', 'state_mean', 'stateindex',ivar, ...
                            'tindex1',pinfo.diagn_time(1), 'tcount',pinfo.diagn_time(2));
             plot(pinfo.time, ens_mean, 'r')
             legend('Ensemble Mean',0)
@@ -162,8 +162,8 @@
 
             % Get the truth for this variable
             if (have_truth)
-               truth = get_hyperslab('fname',pinfo.truth_file, 'varname',pinfo.var, ...
-                           'copyindex',truth_index, 'stateindex',ivar, ...
+               truth = get_hyperslab('fname',pinfo.truth_file, ...
+                           'varname','state', 'stateindex',ivar, 'squeeze', 'true', ...
                            'tindex1',pinfo.truth_time(1), 'tcount',pinfo.truth_time(2));
                hold on; plot(pinfo.time,truth,'b'); hold off;
                legend('Ensemble Mean','True State',0)

Modified: DART/branches/rma_single_file/matlab/PlotEnsTimeSeries.m
===================================================================
--- DART/branches/rma_single_file/matlab/PlotEnsTimeSeries.m	2017-02-09 23:50:03 UTC (rev 11087)
+++ DART/branches/rma_single_file/matlab/PlotEnsTimeSeries.m	2017-02-09 23:50:26 UTC (rev 11088)
@@ -67,13 +67,11 @@
             fprintf('plotting model %s Variable %d ...\n',pinfo.model,ivar)
             subplot(3, 1, j);
 
-            ens_mean    = get_hyperslab('fname',pinfo.diagn_file, 'varname','state_mean', ...
-                              'stateindex',ivar, ...
+            ens_mean    = get_hyperslab('fname', pinfo.diagn_file, ...
+                              'varname','state_mean', 'stateindex',ivar, ...
                               'tindex1',pinfo.diagn_time(1), 'tcount',pinfo.diagn_time(2)) ;
-            ens_members = get_hyperslab('fname',pinfo.diagn_file, 'varname','state', ...
-                              'stateindex',ivar, ...
-                              'copy1',pinfo.ensemble_indices(1), ...
-                              'copycount',pinfo.num_ens_members, ...
+            ens_members = get_hyperslab('fname', pinfo.diagn_file, ...
+                              'varname','state', 'stateindex',ivar, 'squeeze', 'true', ...


More information about the Dart-dev mailing list