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

Review documentation of cube.var_name #363

Closed
pp-mo opened this issue Feb 19, 2013 · 4 comments
Closed

Review documentation of cube.var_name #363

pp-mo opened this issue Feb 19, 2013 · 4 comments

Comments

@pp-mo
Copy link
Member

pp-mo commented Feb 19, 2013

Suggestion from Alistair Sellar...
In the docstring for cube.var_name, it should be described as a "netCDF variable name", not "CF variable name"


From: Sellar, Alistair
Sent: 19 February 2013 12:58
To: Peglar, Patrick
Subject: RE: WO0000000043571 - netcdf variable names in cubes // Cubes and netcdf

Perfect! You work so fast that you had answered my requirement before I even asked!

One small mistake in the documentation (I think):
http://scitools.org.uk/iris/docs/v1.2/iris/iris/cube.html#iris.cube.Cube.var_name
It says "The CF variable name for the Cube." and I think it should say "The NetCDF The CF variable name for the Cube.", as the variable name itself is not constrained by the CF conventions.

Thanks,
Alistair

Dr. Alistair Sellar Manager of Ocean Forecast Verification
Ocean Forecasting R&D
Met Office FitzRoy Road Exeter EX1 3PB United Kingdom
Tel: +44 (0)7909 099534
[email protected] http://www.metoffice.gov.uk

@rhattersley
Copy link
Member

On the face of it ... 👍, but @esc24 - I have a vague feeling we discussed this already...?

@esc24
Copy link
Member

esc24 commented Feb 26, 2013

We did discuss it and I considered it together with 'CF-netCDF variable name' when I wrote the code and decided on just 'CF'. My reasons are:

  1. The very fact that the CF spec acknowledges the existence of the variable name (in stating that "This convention does not standardize variable names" and "If a variable has no long_name attribute then an application may use, as a default, the standard_name if it exists, or the variable name itself") means it is a concept in CF.
  2. The conventions include the following when describing naming conventions in section 2.3 "Variable, dimension and attribute names should begin with a letter and be composed of letters, digits, and underscores. Note that this is in conformance with the COARDS conventions, but is more restrictive than the netCDF interface which allows use of the hyphen character.".

To summarise, whilst CF does not standardize variable names, it's clear that it does constrain them (and Alistair's statement is therefore incorrect). Consequently, I opted for 'CF'.

I'm 👎 on this.

@pp-mo
Copy link
Member Author

pp-mo commented Feb 26, 2013

Well to come off the fence, I will support the original suggestion.
Whatever CF says about variable names, the variable name is a NetCDF core concept, not a CF extension concept (like coordinates, for instance).
When you load any old plain (non-CF) netCDF data into an Iris cube, it will definitely have var_name properties.
I'm generally keen that we should support generic NetCDF read+write, being clear about the differences.
So gets my 👍

@esc24
Copy link
Member

esc24 commented Feb 26, 2013

@pp-mo - CF is central to our data model and as I pointed out, a CF variable name is not exactly the same thing as a netCDF variable name (due to the additional constraints - although I don't think I implemented them 😉 ). However, you make a good point that loading a netCDF file will populate the variable name so I'm ok with the proposed change, I'm just not in favour of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants