Skip to content

Commit

Permalink
Fix netcdf format and engine definitions
Browse files Browse the repository at this point in the history
Fix netcdf format and engine definitions, which for some reason
need to be called as mpas_tools.io.default_engine rather than
using: from mpas_tools.io import default_engine. The latter approach
returned a None type variable, which threw an error when passed to
compute_mpas_region_masks.
  • Loading branch information
trhille committed Apr 11, 2023
1 parent dbf1b87 commit 14afb41
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions compass/landice/mesh.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import time

import jigsawpy
import mpas_tools.io
import numpy as np
import xarray
from geometric_features import FeatureCollection, GeometricFeatures
from mpas_tools.io import default_format, write_netcdf
from mpas_tools.io import write_netcdf
from mpas_tools.logging import check_call
from mpas_tools.mesh.conversion import convert, cull
from mpas_tools.mesh.creation import build_planar_mesh
Expand Down Expand Up @@ -653,5 +654,6 @@ def make_region_masks(self, mesh_filename, mask_filename, cores, tags):
'-o', mask_filename,
'-t', 'cell',
'--process_count', f'{cores}',
'--format', default_format]
'--format', mpas_tools.io.default_format,
'--engine', mpas_tools.io.default_engine]
check_call(args, logger=logger)

0 comments on commit 14afb41

Please sign in to comment.