Skip to content

Commit dfbc2e5

Browse files
committed
Add more global attributes
1 parent 2bd353a commit dfbc2e5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pygmt/datatypes/header.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,16 @@ def get_data_attrs(self) -> dict:
214214
attrs
215215
The attributes for the data variable.
216216
"""
217-
attrs = {}
217+
attrs = {"Conventions": "CF-1.7"}
218218
long_name, units = _parse_nameunits(self.z_units.decode())
219219
if long_name:
220220
attrs["long_name"] = long_name
221221
if units:
222222
attrs["units"] = units
223223
attrs["actual_range"] = np.array([self.z_min, self.z_max])
224+
attrs["title"] = self.title
225+
attrs["history"] = self.command
226+
attrs["description"] = self.remark
224227
return attrs
225228

226229
def get_dims(self):

0 commit comments

Comments
 (0)