/[escript]/trunk/downunder/test/python/run_datasources.py
ViewVC logotype

Diff of /trunk/downunder/test/python/run_datasources.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4393 by caltinay, Thu Apr 25 01:57:54 2013 UTC revision 4394 by caltinay, Tue May 7 04:56:59 2013 UTC
# Line 279  class TestNetCdfData(unittest.TestCase): Line 279  class TestNetCdfData(unittest.TestCase):
279          # recompute nz since ripley might have adjusted number of elements          # recompute nz since ripley might have adjusted number of elements
280    
281          nz=len(out)/(nx*ny)          nz=len(out)/(nx*ny)
         print nz,ny,nx  
282          g_out=out[:,0].reshape(nz,ny,nx)          g_out=out[:,0].reshape(nz,ny,nx)
283          s_out=out[:,1].reshape(nz,ny,nx)          s_out=out[:,1].reshape(nz,ny,nx)
284    
# Line 299  class TestNetCdfData(unittest.TestCase): Line 298  class TestNetCdfData(unittest.TestCase):
298      @unittest.skipIf(mpisize>1, "more than 1 MPI rank")      @unittest.skipIf(mpisize>1, "more than 1 MPI rank")
299      def test_cdf_with_padding_ellipsoid(self):      def test_cdf_with_padding_ellipsoid(self):
300          ref=WGS84ReferenceSystem()          ref=WGS84ReferenceSystem()
301            
302          source = NetCdfData(DataSource.GRAVITY, NC_DATA, ALT,          source = NetCdfData(DataSource.GRAVITY, NC_DATA, ALT,
303                              reference_system=ref, scale_factor=1e-6)                              reference_system=ref, scale_factor=1e-6)
304          domainbuilder=DomainBuilder(reference_system=ref)          domainbuilder=DomainBuilder(reference_system=ref)
# Line 319  class TestNetCdfData(unittest.TestCase): Line 318  class TestNetCdfData(unittest.TestCase):
318          self.assertEqual(NP, NC_SIZE, msg="Wrong number of data points")          self.assertEqual(NP, NC_SIZE, msg="Wrong number of data points")
319    
320          for i in range(len(NC_ORIGIN)):          for i in range(len(NC_ORIGIN)):
321                  self.assertAlmostEqual(X0[i], NC_ORIGIN_WGS84[i], msg="Data origin wrong")              self.assertAlmostEqual(X0[i], NC_ORIGIN_WGS84[i], msg="Data origin wrong")
322    
323          # check data          # check data
324          nx=NP[0]+2*PAD_X          nx=NP[0]+2*PAD_X
# Line 333  class TestNetCdfData(unittest.TestCase): Line 332  class TestNetCdfData(unittest.TestCase):
332    
333          out=np.genfromtxt(outfn, delimiter=',', skip_header=1, dtype=float)          out=np.genfromtxt(outfn, delimiter=',', skip_header=1, dtype=float)
334                    
         print NP  
335          # recompute nz since ripley might have adjusted number of elements          # recompute nz since ripley might have adjusted number of elements
336          nz=len(out)/(nx*ny)          nz=len(out)/(nx*ny)
         print nz,ny,nx  
337          g_out=out[:,0].reshape(nz,ny,nx)          g_out=out[:,0].reshape(nz,ny,nx)
338          s_out=out[:,1].reshape(nz,ny,nx)          s_out=out[:,1].reshape(nz,ny,nx)
339    

Legend:
Removed from v.4393  
changed lines
  Added in v.4394

  ViewVC Help
Powered by ViewVC 1.1.26