Skip to content

Protect that NY is divisible by 6 in MAPL_GridCreate #3164

@bena-nasa

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.

Metadata

Assignees

Labels

0 DiffThe changes in this pull request have verified to be zero-diff with the target branch.🎁 New FeatureThis is a new feature

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions