[MOAB-dev] r5683 - in MOAB/trunk: src/io test/io

hayes6 at mcs.anl.gov hayes6 at mcs.anl.gov
Tue Aug 7 14:20:43 CDT 2012


Author: hayes6
Date: 2012-08-07 14:20:43 -0500 (Tue, 07 Aug 2012)
New Revision: 5683

Modified:
   MOAB/trunk/src/io/ReadNC.cpp
   MOAB/trunk/test/io/read_ucd_nc.cpp
Log:
test_read_novars now passes in read_ucd_nc

Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp	2012-08-06 21:50:58 UTC (rev 5682)
+++ MOAB/trunk/src/io/ReadNC.cpp	2012-08-07 19:20:43 UTC (rev 5683)
@@ -9,6 +9,7 @@
 #include <iostream>
 #include <sstream>
 #include <map>
+#include <dirent.h>
 
 #include "moab/Core.hpp"
 #include "moab/ReaderIface.hpp"
@@ -286,7 +287,7 @@
     ERRORR(rval, "Couldn't add new quads to partition set.");
 
 #ifndef NDEBUG
-    if (ucdMesh)
+    if (ucdMesh && !novars)
     {
       Range verts_owned;
       rval = myPcomm->resolve_shared_ents(0,-1,-1);
@@ -335,10 +336,39 @@
                             const FileOptions& opts,
                             const Tag* file_id_tag)
 {
+
 /*
   BIL_Init( MPI_COMM_WORLD );
 
+  void ** buffer;
 
+  DIR * dir;
+  struct dirent * ent;
+  dir = opendir(dir_name.c_str());
+  if (dir != NULL) {
+    while ((ent = readdir(dir)) != NULL) {
+      if (strlen(ent->d_name) > 3) { //filter out . and ..
+
+        dbgOut.tprintf(1,"reading block from %s\n",ent->d_name);
+
+        int num_dims = 3;
+        int time_d = 1;
+        int lev_d  = 26;
+        int ncol_d = 3458;
+        int block_start[3] = {0,0,0};
+        int block_size[3]  = {time_d, lev_d, ncol_d};
+        const char * file_name = ent->d_name;
+        const char * var_name = "T";
+
+        BIL_Add_block_nc(num_dims, block_start, block_size, 
+                         file_name, var_name, buffer);


More information about the moab-dev mailing list