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.

[netcdf-java] NetCDF-Java - displaying Level2 data

Hi,

Does anyone here have a basic example of how to view level2 radar data
(convert to a jpg or gif) from the iastate mesonet using NetCDF-Java?
Right now I'm reading in the elevation data and Reflectivity_HI
variable using:

    ncfile = NetcdfFile.open(filename);
    String varName = "Reflectivity_HI";
    String varName2 = "elevationR_HI";
    Variable refl_high = ncfile.findVariable(varName);
    Variable elevation = ncfile.findVariable(varName2);
        
    Array data = refl_high.read("0,0,:")
    Array data2 = elevation.read(":,2");
I'm not sure why I wrote an index of 2 for the 2nd dimension there,
but it seemed to return an accurate result when I calculated the
minimum element of that 1-d array for the tilt/elevation angle.

I would probably use the python version/wrapper for netcdf, but I am
developing an app for android and it's easiest to use java since there
is native support for it.

Michael Sabino
michael.r.sabino@xxxxxxxxx



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