Example #1
0
 def test_mesh_width(self):
     lons = numpy.array([[0.1, 0.1, 0.1, 0.1],
                         [0.1, 0.1, 0.1, 0.1],
                         [0.1, 0.1, 0.1, 0.1]])
     lats = numpy.array([[0.1, 0.10899322, 0.11798643, 0.12697965],
                         [0.1, 0.10899322, 0.11798643, 0.12697965],
                         [0.1, 0.10899322, 0.11798643, 0.12697965]])
     depths = numpy.array([[2.0, 2.0, 2.0, 2.0],
                           [3.0, 3.0, 3.0, 3.0],
                           [4.0, 4.0, 4.0, 4.0]])
     mesh = RectangularMesh(lons, lats, depths)
     self.assertAlmostEqual(mesh.get_mean_width(), 2.0)