Re: [netcdf-java] Redefine mode fails if "." in variable name

Hi Aron,

NetcdfFileWriteable is deprecated as of v4.3. Perhaps you could try this procedure again in 4.3 using NetcdfFileWriter and see if the problem persists?

Cheers,
Christian


On 3/28/2014 2:26 PM, Aron Bartle wrote:

Hello,

This is with netcdf-4.2.20.jar.

To reproduce, just add a new variable to a netCDF file with an existing variable containing a "." (or any other reserved character) in the variable name. When exiting redefine mode It will silently fail to copy that variable over so it will be just fill values instead.

I think the bug is in NetcdfFileWriteable.java line 683 or any place where variables are retrieved by name.

I think it should be: Variable oldVar = oldFile.findVariable(NetcdfFile.escapeName(v.getName()));

As opposed to: Variable oldVar = oldFile.findVariable(v.getName());

Thanks,

-Aron



_______________________________________________
netcdf-java mailing list
netcdf-java@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: 
http://www.unidata.ucar.edu/mailing_lists/

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