Skip to content

Commit

Permalink
build nNodes_per_face on attribute call
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc2 committed Jul 14, 2023
1 parent a4263f4 commit 4687e4f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions uxarray/core/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ def __init__(self, input_obj, **kwargs):
v: k for k, v in self.grid_var_names.items()
}

# construct nNodes_per_Face
self._build_nNodes_per_face()

def __init_grid_var_names__(self):
"""Populates a dictionary for storing uxarray's internal representation
of xarray object.
Expand Down Expand Up @@ -363,6 +360,8 @@ def nNodes_per_face(self):
Dimensions (``nMesh2_nodes``) and DataType ``INT_DTYPE``.
"""
if "nNodes_per_face" not in self._ds:
self._build_nNodes_per_face()
return self._ds["nNodes_per_face"]

# coordinate properties
Expand Down

0 comments on commit 4687e4f

Please sign in to comment.