cf.CellMethods.netcdf_translation¶
-
CellMethods.
netcdf_translation
(f)[source]¶ Translate netCDF variable names stored in the
names
attribute intoaxes
andnames
attributes.Parameters: - f : cf.Field
The field which provides the translation.
Returns: - out : cf.CellMethods
A new cell methods instance with translated names.
Examples: >>> c = cf.CellMethods('t: mean lon: mean') >>> c.names = (('t',), ('lon',)) >>> c.axes = ((None,), (None,)) >>> d = c.netcdf_translation(f) >>> d.names = (('time',), ('longitude',)) >>> d.axes = (('dim0',), ('dim2',)) >>> d <CF CellMethods: 'time: mean longitude: mean')