Skip to content

Commit

Permalink
Use short enum names in header.py
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Sep 24, 2024
1 parent ce3c55c commit 1640e6c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pygmt/datatypes/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,8 @@ def data_attrs(self) -> dict[str, Any]:
Attributes for the data variable from the grid header.
"""
attrs: dict[str, Any] = {}
if self.type in { # netCDF format
GridID.GMT_GRID_IS_NB,
GridID.GMT_GRID_IS_NS,
GridID.GMT_GRID_IS_NI,
GridID.GMT_GRID_IS_NF,
GridID.GMT_GRID_IS_ND,
}:
if self.type in {GridID.NB, GridID.NS, GridID.NI, GridID.NF, GridID.ND}:
# Only set the 'Conventions' attribute for netCDF.
attrs["Conventions"] = "CF-1.7"
attrs["title"] = self.title.decode()
attrs["history"] = self.command.decode()
Expand Down

0 comments on commit 1640e6c

Please sign in to comment.