Description
In MAPL2 we have this convention per-face layout of the cube is NX
and NY/6
, however it looks like in MAPL_GridCreate
we do not actually protect that NY is divisible by 6, but the division by 6 is what is passed to the cubed-sphere grid factory. This resulted in an error I helped @rtodling debug. He was passing a 9x40 layout and the model was crashing in fms. But 40 is not divisible by six, so I suspect ultimately fms was getting a 9x6 or 9x7 layout, (does it take the floor or ceiling), when 40 was divided by 6; either way the model communicator was on 360 cores so fms complained since the layout it was given was incompatible with the communicator. So we should probably protect in MAPL_GridCreate
rather than than let this get all the way to FMS or other places. I don't know if places outside of MAPL do this, like if FV3 grid comp is doing the same by 6 division but either easy to simply to add an assert here with an informative message.