Page 1 of 1

Error reading in gridded data

Posted: Fri Aug 21, 2009 5:33 pm
by wstraka
I have a CF compliant (thanks to Tom W) netCDF file (attached). However, for scaled data, McIDAS-V (beta4) seems to have an issue displaying the unscaled data. In the image below, I have the result from the netCDF file from IDL, UCAR's netCDF tools user interface and McIDAS-V. As can be seen, both IDL and the UCAR tool box display the image correctly. However, Mc-V seems to have an issue with showing NDVI values (what I am plotting here) over 0.2. Any thoughts as to why Mc-V is not displaying the entire image?? It is properly navigated, just most of the data is missing???


I should also mention that I have tested, and verified that the unscaled data does basically match that of the original dataset.

Re: Error reading in gridded data

Posted: Mon Aug 24, 2009 4:04 pm
by tomw
This appears to be a problem in specifying the valid_range and/or missing values of the data....

Re: Error reading in gridded data

Posted: Mon Aug 24, 2009 4:53 pm
by wstraka
Even if you set the valid range to 0-254 (since 255 is the missing value), or the non-converted byte value range, the surface temperature (or any of the scaled data) still comes out as the image I sent. Byte values, as you know, go from 0-255, so if it was scaling to missing for the majority of the image, then the difference between the orginal data and unscaled should reflect that, but it doesn't.

Also, if I set my range from 0-253, with missing being 254, the same issue comes up. So, I am a bit confused as to what you are suggesting doing.

Re: Error reading in gridded data

Posted: Mon Aug 24, 2009 5:22 pm
by wstraka
Ok, figured out what it was. IDL likes to do 0-255 for byte values, but TomW pointed out that IDL likes -127 to 128 for byte values. As you can see, it looks a bit better now.

Re: Error reading in gridded data

Posted: Tue Aug 25, 2009 3:24 pm
by tomw
Just to clarify this. The NetCDF library treats bytes as "signed" values (-127:128), so that the re-scaling the user was doing was not being computed as he thought (since he thought the values were 0:255).