Re: [netcdf-java] Problems getting Coordinate System in v4.3


I'm not sure about the RC stuff, but it looks like you are getting a NullPointerException at line 39 which means that uwindgrid is null. I suspect that is due to the variable name changes in 4.3. If findGridDatatype can't find the grid, it will return null.


On 2/10/12 11:47 AM, Pablo Rozas Larraondo wrote:

I've completed the recommended emergency shutdown of my project, as I
was working with grib files and 4.2 API version ;-)

Once updated my build path to the new 4.3 version, I'm having some
problems compiling the same code:

37 GridDataset gds ="~/myfile.grb");
38  GridDatatype uwindgrid = gds.findGridDatatype("U_component_of_wind");

39  GridCoordSystem gcs = uwindgrid.getCoordinateSystem();

Error message:

   Feb 10, 2012 7:11:29 PM ucar.nc2.util.rc.RC loadDefaults

   INFO: No .rc file found

   Exception in thread "main" java.lang.NullPointerException

at Test.main(

I've checked the new javadoc and all the used methods seem to be the
same, but I can't find any reference to ucar.nc2.util.rc.RC class to
trace back the NullPointerException... Any suggestions?

Thank you everybody for your help,

Pablo Rozas

This body part will be downloaded on demand.

Don Murray

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