diff --git a/deploy/default.cfg b/deploy/default.cfg index 4ecf7cacd..2e368919b 100644 --- a/deploy/default.cfg +++ b/deploy/default.cfg @@ -24,7 +24,7 @@ geometric_features = 1.2.0 jigsaw = 0.9.14 jigsawpy = 0.3.3 mache = 1.16.0 -mpas_tools = 0.21.0 +mpas_tools = 0.23.0 otps = 2021.10 parallelio = 2.6.0 diff --git a/polaris/mesh/spherical.py b/polaris/mesh/spherical.py index 1bbd2c701..f90271d50 100644 --- a/polaris/mesh/spherical.py +++ b/polaris/mesh/spherical.py @@ -7,9 +7,7 @@ import xarray.plot from jigsawpy.savejig import savejig from mpas_tools.cime.constants import constants -from mpas_tools.io import write_netcdf from mpas_tools.logging import check_call -from mpas_tools.mesh.conversion import convert from mpas_tools.mesh.creation.jigsaw_to_netcdf import jigsaw_to_netcdf from mpas_tools.ocean.inject_meshDensity import inject_spherical_meshDensity from mpas_tools.viz.colormaps import register_sci_viz_colormaps @@ -103,9 +101,11 @@ def run(self): sphere_radius=earth_radius) logger.info('Convert from triangles to MPAS mesh') - write_netcdf(convert(xarray.open_dataset('mesh_triangles.nc'), - dir='.', logger=logger), - mpas_mesh_filename) + + args = ['MpasMeshConverter.x', + 'mesh_triangles.nc', + mpas_mesh_filename] + check_call(args=args, logger=logger) if section.getboolean('add_mesh_density'): logger.info('Add meshDensity into the mesh file') diff --git a/polaris/viz/__init__.py b/polaris/viz/__init__.py index 06b944e22..1d8113ede 100644 --- a/polaris/viz/__init__.py +++ b/polaris/viz/__init__.py @@ -209,7 +209,7 @@ def _compute_cell_patches(ds, mask): if dx * dy / 10 > area_cell[cell_index]: mask[cell_index] = False else: - polygon = Polygon(vertices, True) + polygon = Polygon(vertices, closed=True) patches.append(polygon) p = PatchCollection(patches, alpha=1.) @@ -240,7 +240,7 @@ def _compute_edge_patches(ds, mask): vertices[3, 0] = 1e-3 * x_cell[cell_indices[1]] vertices[3, 1] = 1e-3 * y_cell[cell_indices[1]] - polygon = Polygon(vertices, True) + polygon = Polygon(vertices, closed=True) patches.append(polygon) p = PatchCollection(patches, alpha=1.)