diff --git a/compass/landice/mesh.py b/compass/landice/mesh.py index 07bc4833b..f599b7dbc 100644 --- a/compass/landice/mesh.py +++ b/compass/landice/mesh.py @@ -13,6 +13,7 @@ from mpas_tools.logging import check_call from mpas_tools.mesh.conversion import convert, cull from mpas_tools.mesh.creation import build_planar_mesh +from mpas_tools.mesh.creation.sort_mesh import sort_mesh from netCDF4 import Dataset from scipy.interpolate import NearestNDInterpolator, interpn @@ -682,6 +683,8 @@ def build_mali_mesh(self, cell_width, x1, y1, geom_points, dsMesh = xarray.open_dataset('base_mesh.nc') logger.info('culling mesh') dsMesh = cull(dsMesh, logger=logger) + logger.info('soring mesh') + dsMesh = sort_mesh(dsMesh) logger.info('converting to MPAS mesh') dsMesh = convert(dsMesh, logger=logger) logger.info('writing grid_converted.nc')