This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Mr. Best, The data are properly sorted, but you cannot assume that the first radial of data starts at 0 degrees. Instead, you can find the azimuth angle for each radial contained in the "azimuth" variable. For example: Variable azimuth = ncfile.findVariable("azimuth"); float[] angles = (float[])azimuth.read().get1DJavaArray(Float.TYPE); You'll need to use these angles to properly reference the data. I hope this helps. Ryan > I am Mr.Sabu Best ( Meteorologist / Software developer ) at the Barbados > Meteorological Services, we are hoping you can lend some support on the > following please. > > We are using your NETCDF java library to decode KBYX ( FLorida Keys radar > ) but the data returned to the variable v from "read()" method appears > to be in any random order. In other words the first row in the two > dimensional array name "data" below is not the azimuth. This is causing > the data to be positioned incorrectly on final converting. Please see > code snippet below where I extract the data and store it in an array for > later operation. Is there something I am missing from this code that will > allow the data to be shorted by azimuth angle first in the two dimensional > array "data"?. I have attached 3 photos. One from key west it self as it > should look (KBYX.png). The other 2 from the decoded data using NETCDF > java library. You will see the same echo being positioned in different > locations. on the image even though the images are only 5 mins apart. > > private void extractAllRaw_DBZ_Data() throws Exception > { > RadarData = new String[numberOfRays][ (int)radialDistance]; > > Variable v = ncfile.findVariable("BaseReflectivityDR_RAW"); > > Array data = v.read(); > int[] shape = data.getShape(); > > Index index = data.getIndex(); > for (int i=0; i<shape[0]; i++) { > for (int j=0; j<shape[1]; j++) { > Object dval = data.getObject(index.set(i,j)); > RadarData[i][j] = dval.toString(); > } > } > > } > Ticket Details =================== Ticket ID: YYG-713097 Department: Support netCDF Java Priority: Normal Status: Closed