def _test(self, v_offset, subgrid, bzy, bdy): grid = ArakawaC(None, None, [None, 4.0, 45.0, None, None, None], None) grid._v_offset = v_offset result_bzy, result_bdy = grid.regular_y(subgrid) self.assertEqual(result_bzy, bzy) self.assertEqual(result_bdy, bdy)
def _test(self, subgrid, bzx, bdx): grid = ArakawaC(None, None, [4.0, None, None, -5.0, None, None], None) result_bzx, result_bdx = grid.regular_x(subgrid) self.assertEqual(result_bzx, bzx) self.assertEqual(result_bdx, bdx)
def _test(self, column, horiz_grid_type, xp, xu): reals = np.arange(6) + 100 grid = ArakawaC(column, None, reals, horiz_grid_type) result_xp, result_xu = grid._x_vectors() self.assertArrayEqual(result_xp, xp) self.assertArrayEqual(result_xu, xu)