Skip to content

Commit

Permalink
Amend var_name documentation (#3020)
Browse files Browse the repository at this point in the history
Amend documentation to be explicit that var_name is a netCDF quantity, not necessarily a CF one.
  • Loading branch information
tv3141 authored and pelson committed May 23, 2018
1 parent 82a6076 commit e275b70
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions lib/iris/_cube_coord_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,18 @@ def units(self, unit):

@property
def var_name(self):
"""The CF variable name for the object."""
"""The netCDF variable name for the object."""
return self._var_name

@var_name.setter
def var_name(self, name):
if name is not None:
if not name:
raise ValueError('An empty string is not a valid CF variable '
'name.')
raise ValueError('An empty string is not a valid netCDF '
'variable name.')
elif set(name).intersection(string.whitespace):
raise ValueError('{!r} is not a valid CF variable name because'
' it contains whitespace.'.format(name))
raise ValueError('{!r} is not a valid netCDF variable name '
'as it contains whitespace.'.format(name))
self._var_name = name

@property
Expand Down
4 changes: 2 additions & 2 deletions lib/iris/aux_factory.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) British Crown Copyright 2010 - 2017, Met Office
# (C) British Crown Copyright 2010 - 2018, Met Office
#
# This file is part of Iris.
#
Expand Down Expand Up @@ -51,7 +51,7 @@ def __init__(self):
#: Descriptive name of the coordinate made by the factory
self.long_name = None

#: CF variable name of the coordinate made by the factory
#: netCDF variable name for the coordinate made by the factory
self.var_name = None

#: Coordinate system (if any) of the coordinate made by the factory
Expand Down
16 changes: 8 additions & 8 deletions lib/iris/coords.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,11 @@ def __init__(self, points, standard_name=None, long_name=None,
Kwargs:
* standard_name:
CF standard name of coordinate
CF standard name of the coordinate.
* long_name:
Descriptive name of coordinate
Descriptive name of the coordinate.
* var_name:
CF variable name of coordinate
The netCDF variable name for the coordinate.
* units
The :class:`~cf_units.Unit` of the coordinate's values.
Can be a string, which will be converted to a Unit object.
Expand All @@ -446,7 +446,7 @@ def __init__(self, points, standard_name=None, long_name=None,
#: Descriptive name of the coordinate.
self.long_name = long_name

#: The CF variable name for the coordinate.
#: The netCDF variable name for the coordinate.
self.var_name = var_name

#: Unit of the quantity that the coordinate represents.
Expand Down Expand Up @@ -1883,11 +1883,11 @@ def __init__(self, data, standard_name=None, long_name=None,
Kwargs:
* standard_name:
CF standard name of coordinate
CF standard name of the coordinate.
* long_name:
Descriptive name of coordinate
Descriptive name of the coordinate.
* var_name:
CF variable name of coordinate
The netCDF variable name for the coordinate.
* units
The :class:`~cf_units.Unit` of the coordinate's values.
Can be a string, which will be converted to a Unit object.
Expand All @@ -1904,7 +1904,7 @@ def __init__(self, data, standard_name=None, long_name=None,
#: Descriptive name of the coordinate.
self.long_name = long_name

#: The CF variable name for the coordinate.
#: The netCDF variable name for the coordinate.
self.var_name = var_name

#: Unit of the quantity that the coordinate represents.
Expand Down

0 comments on commit e275b70

Please sign in to comment.