Skip to content

Commit

Permalink
fix for new esmpy
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenworsley committed Feb 28, 2024
1 parent eeba87b commit 57bcd9b
Show file tree
Hide file tree
Showing 4 changed files with 167 additions and 164 deletions.
3 changes: 3 additions & 0 deletions esmf_regrid/experimental/unstructured_regrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ def _as_esmf_info(self):
num_node = self.node_coords.shape[0]
num_elem = self.fnc.shape[0]
nodeId = np.array(range(self.nsi, self.nsi + num_node))
nodeId = np.expand_dims(nodeId, -1)
nodeCoord = self.node_coords.flatten()
nodeCoord = np.expand_dims(nodeCoord, -1)
nodeOwner = np.zeros([num_node]) # regridding currently serial
nodeOwner = np.expand_dims(nodeOwner, -1)
elemId = np.array(range(self.esi, self.esi + num_elem))
elemType = self.fnc.count(axis=1)
# Experiments seem to indicate that ESMF is using 0 indexing here
Expand Down
Loading

0 comments on commit 57bcd9b

Please sign in to comment.