diff --git a/met/src/libcode/vx_data2d_python/dataplane_from_numpy_array.cc b/met/src/libcode/vx_data2d_python/dataplane_from_numpy_array.cc index 5efd29d3c6..6dd44b3815 100644 --- a/met/src/libcode/vx_data2d_python/dataplane_from_numpy_array.cc +++ b/met/src/libcode/vx_data2d_python/dataplane_from_numpy_array.cc @@ -241,6 +241,21 @@ else { grid_from_python_dict(Python3_Dict(py_grid), grid_out); +} + + // + // make sure the grid and data dimensions match + // + +if ( grid_out.nx() != Nx || grid_out.ny() != Ny ) { + + mlog << Error << "\ndataplane_from_numpy_array() -> " + << "the grid dimensions (" << grid_out.nx() << ", " + << grid_out.ny() << ") and data dimensions (" << Nx + << ", " << Ny << ") do not match!\n\n"; + + exit ( 1 ); + } ////////////////////