Changeset 303 for IO_handling


Ignore:
Timestamp:
02/12/04 15:26:42 (15 years ago)
Author:
jkettleb
Message:

Re introduced check for possible missing records based on the number of levels
and times

File:
1 edited

Legend:

Unmodified
Added
Removed
  • IO_handling/trunk/ppio/cdat-4.0b3-ppio_v0.3.patch

    r302 r303  
    60236023diff -Naur cdat-4.0b3/libcdms/src/cdunif/cdunifpp/cdunifpp_process.c cdat-4.0b3-pp/libcdms/src/cdunif/cdunifpp/cdunifpp_process.c 
    60246024--- cdat-4.0b3/libcdms/src/cdunif/cdunifpp/cdunifpp_process.c   1970-01-01 01:00:00.000000000 +0100 
    6025 +++ cdat-4.0b3-pp/libcdms/src/cdunif/cdunifpp/cdunifpp_process.c        2004-11-30 16:58:26.000000000 +0000 
    6026 @@ -0,0 +1,936 @@ 
     6025+++ cdat-4.0b3-pp/libcdms/src/cdunif/cdunifpp/cdunifpp_process.c        2004-12-02 15:25:24.583056784 +0000 
     6026@@ -0,0 +1,959 @@ 
    60276027+/* 
    60286028+ * 
     
    60616061+  PPlist *gatts,*catts; 
    60626062+ 
     6063+  int nvrec, nz, nt ; /* needed for check on variables */ 
     6064+ 
    60636065+  int ndims, dimid; 
    60646066+  int idim; /* dim number of given type */ 
     
    63386340+    } 
    63396341+    /* ===================================================== */ 
    6340 + 
    63416342+    if (at_end_rec) { 
    63426343+ 
     
    63456346+      fvar->endrec=rec; 
    63466347+ 
     6348+      nvrec=fvar->endrec-fvar->startrec+1; 
     6349+      nz=pp_list_size(zaxis->values); 
     6350+      nt=pp_list_size(taxis->values); 
     6351+ 
     6352+      if (nvrec != nz*nt) { 
     6353+       pp_list_del(fieldvars, fvar, heaplist); /* axis ptrs in fvar NULL, so safe */ 
     6354+       pp_free(xaxis,heaplist); 
     6355+       pp_free(yaxis,heaplist); 
     6356+       pp_list_free(zaxis->values,1,heaplist); 
     6357+       pp_free(zaxis,heaplist); 
     6358+       pp_list_free(taxis->values,1,heaplist); 
     6359+       pp_free(taxis,heaplist); 
     6360+       CuError(CU_EOPEN,"variable (%d,%d,%d) dimension mismatch (%d*%d != %d)", 
     6361+                         pp_get_var_stash_model(hdrp), 
     6362+                                 pp_get_var_stash_section(hdrp), 
     6363+                         pp_get_var_stash_item(hdrp), 
     6364+                         nz,nt,nvrec); 
     6365+       continue; 
     6366+      } 
    63476367+      /* 
    63486368+       * For each axis, see if it matches an axis which already exists from a previous 
     
    64226442+ 
    64236443+  /* FIRST ALLOCATE THE ARRAYS, and initialise some values */ 
    6424 + 
     6444+  if (pp_list_size(fieldvars) <= 0) { 
     6445+    CuError(CU_EOPEN,"No valid fields in file\n"); 
     6446+    goto err; /* not the most elegant dealing with this error - ideally would free this file */ 
     6447+  } 
    64256448+  ndims = pp_list_size(xaxes) + pp_list_size(yaxes) + pp_list_size(zaxes) + pp_list_size(taxes); 
    64266449+ 
Note: See TracChangeset for help on using the changeset viewer.