[MOAB-dev] r4715 - MOAB/trunk/src/io

xbxu at mcs.anl.gov xbxu at mcs.anl.gov
Tue Apr 5 23:17:51 CDT 2011


Author: xbxu
Date: 2011-04-05 23:17:50 -0500 (Tue, 05 Apr 2011)
New Revision: 4715

Modified:
   MOAB/trunk/src/io/ReadNC.cpp
Log:
resize varTags to have entries for all timesteps when no timestep input specified

Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp	2011-04-04 23:23:11 UTC (rev 4714)
+++ MOAB/trunk/src/io/ReadNC.cpp	2011-04-06 04:17:50 UTC (rev 4715)
@@ -386,11 +386,13 @@
     }
   }
   
-  if (tstep_nums.empty() && -1 != tMin)
-      // no timesteps input, get them all
+  if (tstep_nums.empty() && -1 != tMin) {
+    // no timesteps input, get them all
     for (int i = tMin; i <= tMax; i++) tstep_nums.push_back(i);
-    
-  
+    for (unsigned int i = 0; i < vdatas.size(); i++)
+      vdatas[i].varTags.resize(tstep_nums.size(), 0);      
+  }
+
   for (unsigned int i = 0; i < vdatas.size(); i++) {
     for (unsigned int t = 0; t < tstep_nums.size(); t++) {
       dbgOut.tprintf(2, "Reading variable %s, time step %d\n", vdatas[i].varName.c_str(), tstep_nums[t]);































More information about the moab-dev mailing list