Re: [netcdf-java] Problem reading HDF files

(Sending again to make sure the list gets it).

Antonio,

Thanks for the information, and sorry it's taken so long to get back--I
blame the holidays and the AMS meeting.

I've found the cause of the problem: the "Data Fields" group in the hdf5
file is getting converted in netcdf-java to "Data_Fields". So as a
workaround, you could get it working by making sure any spaces in the path
variable (or at least the groups) are replaced with "_". I still need to
find out if this is deliberate behavior in netcdf-java for some reason, or
just a bug.

On Tue, Dec 30, 2014 at 1:13 PM, Antonio Rodriges <antonio.rrz@xxxxxxxxx>
wrote:

> Ryan,
>
> The path is
>
> /HDFEOS/GRIDS/ColumnAmountNO2/Data Fields//ColumnAmountNO2TropCloudScreened
>
> and the HDF5 file is attached. There are also HDF4 files with the same
> problem
>
> This worked fine under netcdf-4.2 but now I need new features
> introduced in later versions so I consider switching to 4.3 at least
> or higher
>
> 2014-12-30 20:57 GMT+03:00 Ryan May <rmay@xxxxxxxx>:
> > Antonio,
> >
> > It would be helpful to see a sample file as well as the value of the path
> > variable in order to understand the problem.
> >
> > Ryan
> >
> > On Sun, Dec 28, 2014 at 9:25 AM, Antonio Rodriges <antonio.rrz@xxxxxxxxx
> >
> > wrote:
> >>
> >> Hello,
> >>
> >> the code
> >>
> >>         String path = groupInFile + SUBDATASETS_GROUP_DELIMITER +
> >> nameInGroup;
> >>         Variable findVariable = file.findVariable(path);
> >>
> >> Worked with netcdf-4.2 Java lib but does not with netcdf-4.3 and 4.5
> >> (returns findVariable = null)
> >> What is the problem?
> >>
> >> _______________________________________________
> >> netcdf-java mailing list
> >> netcdf-java@xxxxxxxxxxxxxxxx
> >> For list information or to unsubscribe, visit:
> >> http://www.unidata.ucar.edu/mailing_lists/
> >>
> >
> >
> >
> > --
> > Ryan May
> > Software Engineer
> > UCAR/Unidata
> > Boulder, CO
>



-- 
Ryan May
Software Engineer
UCAR/Unidata
Boulder, CO
  • 2015 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: