MPAS-Dev / MPAS-Tools

MPAS Tools Repository
Other
37 stars 63 forks source link

Convert masks to int type in `cull()` function #521

Closed xylar closed 1 year ago

xylar commented 1 year ago

The new version of the cell culler requires masks in int (rather than int64 or float) format.

This is needed because output in NETCDF4 format is producing int64, rather than int32, arrays but the cell culller is then reading a full int64 data array into memory allocated for an int32 array, thus overwriting a lot of memory allocated for other arrays with garbage.

xylar commented 1 year ago

Testing

I was able to cull the mesh in the QUwISC240 and RRSwISC6to18 mesh test cases with output in NETCDF4 format in compass with this branch, whereas it was crashing without these changes.