
-JeffI've been hoping NCML aggregation would be ported from the Java lib to the C lib by Unidata for years now. I don't think it's going to happen.David: Can you give an example use case? That would help me wrap my head around what you're doing.I went ahead and added a 'renameAttribute' method to Dataset, Group and Variable in svn. Unfortunately, the C library apparently does not provide a way to rename a Group.
David: Can you give an example use case? That would help me wrap my head around what you're doing.
| service_provider_name |
| service_provider_contact_info |
| west_bounding_longitude |
I went ahead and added a 'renameAttribute' method to Dataset, Group and Variable in svn. Unfortunately, the C library apparently does not provide a way to rename a Group.
I've been hoping NCML aggregation would be ported from the Java lib to the C lib by Unidata for years now. I don't think it's going to happen.
Hi Jeff, NetCDF4-PythonComments inline...On Wed, Jul 17, 2013 at 4:00 PM, Jeffrey Whitaker <whitaker...@gmail.com> wrote:
David: Can you give an example use case? That would help me wrap my head around what you're doing.
So here is what we are currently after...IOOS has a set of metadata concepts such as:
service_provider_name service_provider_contact_info west_bounding_longitude These map to elements in ISO 19115 datasets, to attributes/variables in NetCDF CF as well as other conventions and formatsI have created a library which dynamically creates objects with getters and setters for each of the IOOS concepts.foo.service_provider_namefoo.service_provider_name = 5
By providing an xpath expression for the underlying convention/format you can operate on any dataset with one API.This will make it easy to write software to create and validate metadata for IOOS.By implementing the LXML interface to NetCDF in python I can now use NetCDF files in this way with XPATH expressions. It seems that XPATH expressions on NCML is the easiest way to specify programmatically the CF attribute convention that should be set for service_provider_name.The implementation is certainly not the most efficient - but after only a few days it seems to be working.I went ahead and added a 'renameAttribute' method to Dataset, Group and Variable in svn. Unfortunately, the C library apparently does not provide a way to rename a Group.
Thanks for adding the attribute method. Bummer about groups!?!?!I've been hoping NCML aggregation would be ported from the Java lib to the C lib by Unidata for years now. I don't think it's going to happen.Ugh - I don't think it is in scope for us either right now.
David
I don't see any way in the C library to rename a group. I see routines to rename dimensions, variables and attributes, but not groups. Am I missing something, or is there some fundamental reason why groups cannot be renamed?
It's on our list to do, but hasn't been scheduled yet: https://bugtracking.unidata.ucar.edu/browse/NCF-204 There's no fundamental obstacle, it just requires adding equivalent functions for group renaming to all supported APIs, as well as new test code and documentation. Lately, fixing bugs and portability problems has taken precedence over adding new features and functions, but if the ability to rename groups is important, we'll up its priority. --Russ