Re: [netcdfgroup] renaming a Group?

Hi,

> I want this functionality too. I thought it might be easy to do
> by emulating the existing rename functions for vars and dimensions.
> Unfortunately, I never managed to get my patch to work.
> Maybe somebody will see what I did wrong:
> http://dust.ess.uci.edu/tmp/nc_rename_grp.tar.gz
> 
> In the meantime, I use NCO GPE to rename groups. This "renames" the
> hard way, by writing to a new file rather than by relinking internal
> data structures in an existing file.
> 
> ncks -O -G f4:1 -g g4 ~/nco/data/in_grp.nc ~/tmp.nc # Move /g4 to /f4
> ncks -O -x -g g4 ~/nco/data/in_grp.nc ~/out.nc # Excise /g4
> ncks -A ~/tmp.nc ~/out.nc # Add /f4 to new file
> 
> Awkward? Yes. Three steps instead of an easy ncrename.
> 
> See http://nco.sf.net/nco.html#gpe for more details.

Thanks to Dennis Heimbigner, there is now a draft implementation of 

  /* Rename a group */
  int nc_rename_group(int ncid, int grpid, const char *name);

in the latest svn trunk.  See the last comment in

  https://bugtracking.unidata.ucar.edu/browse/NCF-204

for status and what we still need to do, including more testing and
documentation. 

Also, if you're used to using our svn repository, note that we will be
moving from svn to github in the next few months ...

--Russ



  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: