0

I want to calculate the Crop Water Requirements and for this I need NDVI values for a period of time.

Because I have Sentinel 2 images and the temporal resolution is 5 days, I need also the values for NDVI for days when the satellite don't take the images.

Do you know a software that can interpolate/fill the gaps where I don't have NDVI values? I need to obtain just NDVI values for each day.

closed as primarily opinion-based by Vince, whyzar, Fran Raga, ahmadhanb, PolyGeo May 31 at 4:03

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Do you need raster layers for each day or do you need just values? Please add this information editing your question – aldo_tapia May 29 at 12:49
  • Sorry, I did not mention. I need just values for each days. – Cristina Mihalache May 30 at 18:53
  • Since you need just NDVI values, you can use from excel to almost any statistical software. In terms of R processing, with zoo() and na.approx() you can do it easily. Are you working with ET0 to compute CWR? – aldo_tapia May 30 at 19:21
  • I am working with ET0 to compute ETc and after these to compute CWR, GIWR and NIWR. – Cristina Mihalache May 31 at 8:16
  • You can check the work of UCLM related to this topic and Irrisat, a very interesting tool mounted in GEE – aldo_tapia May 31 at 12:30
3

You can use R for this purpose. A really small example:

Given some rasters (where values are (ndvi*100) + 100):

library(raster)
library(zoo)
library(hydroTSM)

d1 <- raster('ndvi_2019-79.tif')
d2 <- raster('ndvi_2019-94.tif')
d3 <- raster('ndvi_2019-104.tif')

s <- stack(d1,d2,d3)

plot(s)

enter image description here

Create a date object with rasters names and an empty object with days in period:

dates <- names(s) # extract names
dates <- as.Date(dates, format = 'ndvi_%Y.%j')

dips <- dip(from = dates[1], to = dates[3])
zoo_ <- zoo(NA, order.by = dips)
idx <- which(dips %in% dates)

A function for fill gaps for those days:

fillGaps <- function(x){
  temp <- zoo_
  temp[idx] <- x
  na.approx(temp)
}

s2 <- calc(s, fillGaps)

And voila:

names(s2) <- dips
plot(s2)

enter image description here


A small area to see date differences (BTW, are Sentinel-2 ndvi product):

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.