NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [netcdfgroup] renaming a Group?

Jeff et al.,

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.

c
-- 
Charlie Zender, Earth System Sci. & Computer Sci.
University of California, Irvine 949-891-2429 )'(



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