Я думаю, что это должно работать
my.array = array(1:344291597, dim=c(307, 307, 3653))
#Find locations from array
Locations <- cbind(my.array[,1,1],my.array[1,,1])
#Create new matrix to store temperature values
LocationsData <- matrix(data= NA,nrow = dim(my.array)[1], ncol = dim(my.array)[3])
#Populate new matrix with temperature values
for (i in 1:dim(my.array)[1]){
LocationsData[i,] <-as.vector(t(my.array[i,i,]))
}
Desiredoutput <- data.frame(cbind(Locations,LocationsData))
#add correct names
Names(Desiredoutput) <- c("Lon", "Lat", dimnames(my.array)[[3]])