Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amend var_name documentation #3020

Merged
merged 5 commits into from
May 23, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 '
'because it contains whitespace.'.format(name))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (80 > 79 characters)

self._var_name = name

@property
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/aux_factory.py
Original file line number Diff line number Diff line change
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 @@ -419,11 +419,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 @@ -447,7 +447,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 @@ -1884,11 +1884,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 @@ -1905,7 +1905,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