Error reading in gridded data

Errors and unexpected results
Post Reply
User avatar
wstraka
Posts: 66
Joined: Thu Jun 18, 2009 5:05 pm

Error reading in gridded data

Post 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.
Attachments
patmosx_n18_asc_2006_180.level2b.nc
(1.36 MiB) Downloaded 369 times
Mc-V_issue.jpg
User avatar
tomw
Posts: 296
Joined: Tue Dec 23, 2008 3:40 pm

Re: Error reading in gridded data

Post by tomw »

This appears to be a problem in specifying the valid_range and/or missing values of the data....
User avatar
wstraka
Posts: 66
Joined: Thu Jun 18, 2009 5:05 pm

Re: Error reading in gridded data

Post 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.
User avatar
wstraka
Posts: 66
Joined: Thu Jun 18, 2009 5:05 pm

Re: Error reading in gridded data

Post 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.
Attachments
NDVI_2.gif
User avatar
tomw
Posts: 296
Joined: Tue Dec 23, 2008 3:40 pm

Re: Error reading in gridded data

Post 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).
Post Reply