I am working with MODIS snow cover products (MOD10A1) and am unable to understand some of the values that are returned. I am trying to get % snow cover from the NDSI (normalised difference snow index) snow cover layer. The MODIS user manual states that the NDSI snow cover layer has values from 0 - 100, representing % snow cover in each pixel, and eight values between 200 and 255 that represent all other possible features/masks (cloud, missing data etc). In processing the images I am finding values between 100 and 200 and cannot find any reference to such values in the MODIS documentation.
I downloaded the MOD10A1 product as .hd files from the NSIDC.org site. I work in R, but have not been able to work with the .hd files in R, so I converted the NDSI snow cover layer to .tif files using the HEG converter program that is recommended on the MODIS NASA website. I imported the .tif files into RStudio using the raster package and used the getValues and unique functions to find the value in each pixel. The returned values are anything from 0 to 255, including values in the range 100-200.
Does anyone know what these values mean? Have they come with the product or is there an error in the file conversion? Thank you for your help.
EDIT: thanks for the suggestion. One of the exact file names is 'MOD10A1.A2015364.h25v06.006.2016182181418.hdf' and a link to the file https://drive.google.com/file/d/1HeEpIL15EC_PSBWsuGT4FJMZOPr4_oND/view?usp=sharing
I have tried using the rast function in the terra package and get the same result.
You can look at this with
terra
.You can do
And use the first layer
Or acknowledge the sub-dataset structure of the file
And use the first sub-dataset
Now check the values with
freq
(orunique
)There are values below 100 and above 200, but not in between, as you assert.
A next step could be
Perhaps you where accidentally using the "Snow_Albedo_Daily_Tile" subdataset?
That one has values between 100 and 200. But is that unexpected?