dailyAno <- function(x, jdays) {
  climatology <- tapply(x, INDEX = jdays, FUN = mean)
  anomalies <- c()
  for (i in 1 : length(x)) {
    index <-  which(names(climatology) ==jdays[i])
    anomalies[i] <- x[i] - climatology[index]
  }
  return(anomalies)
}
