Page 1 of 1

MODIS NDVI Scaling Issue

Posted: Fri Aug 09, 2024 4:11 pm America/New_York
by sureshmk
I am using MOD13A1 NDVI data from Earthdata for a project. When I open the NDVI raster from the HDF file, it shows the range to be -20,000 to + 89,550,000. However, under file properties, for Band 1 statistics shows minimum of -2000 and a maximum of +8955. I did scaling using raster calculator by multiplying the layer by 0.0001. The resulting layer does not produce values ranging between -1 and +1. It is still a large number. Any help will be appreciated. Thanks.

Re: MODIS NDVI Scaling Issue

Posted: Mon Aug 12, 2024 10:04 am America/New_York
by LP DAAC-EDL - lien
Hello,
It appears that the software is manipulating the data somehow. I pulled the granule directly from the Data Pool and ran the statistics:
Stat capture.PNG
Stat capture.PNG
It seems that your software is first attempting to scale the data, but rather than multiplying by 0.0001 it is multiplying by 10,000. Can you check your software for a setting that is doing this.
Thanks,
LPDAAC

Re: MODIS NDVI Scaling Issue

Posted: Wed Feb 05, 2025 4:13 am America/New_York
by figuera
We are having the same issue as the one mentioned above. The reason why any software/tool based on gdal is not processing correctly the file is due to the fact that the scale factor in the metadata is wrong. The rule to apply the scaling factor for such tools is unscaled_value = scaled_value * scale + offset. Most of tools and packages (QGIS, Rasterio, Gdal) use gdal in the background, therefore apply such formula. Having a scale factor of 10000 instead of 0.0001 forces the users to apply manually the scaling factor either using the raster calculator on QGIS or via python/R script.

The interesting part comes when reading the documentation where it is written that a scale factor of 0.0001 should be applied (https://lpdaac.usgs.gov/documents/621/MOD13_User_Guide_V61.pdf --> page 9, table 1). In my opinion the value in the metadata is wrong and in order to be used with the majority of tools and python/R packages the value in the metadata should be 0.0001 and not 10000.

Thanks!