Load temperature data from GEE

Once you extracted the data from Google Earth Engine, you can load it here. In our example the data file is called lst.csv (lake surface temperature)

lst <- read.csv("lst_2sites.csv")
#process the data file
lst$Date<-as.Date(lst$datetime)
lst$year<-year(lst$Date)
lst$yday<-yday(lst$Date)

Filter low quality data

Next we need to filter out data points from cloudy days and remove potentially deteriorated data from Landsat 7 timeseries (from 2018 to 2022).

lst1<-lst[lst$satellite %in% c('Landsat 4', 'Landsat 5', 'Landsat 7') &!is.na(lst$SR_CLOUD_QA) & lst$SR_CLOUD_QA==32 & lst$QA_PIXEL<5510,]
lst2<-lst[lst$satellite %in% c('Landsat 8', 'Landsat 9') & lst$QA_PIXEL==21952,]

lst12<-full_join(lst1,lst2)
# aggregate pixel data
lst_final<- summarise(group_by(lst12,Lake_name,monSiteCode,FID,Date,year,yday), ST=round(mean(ST),1),satellite=unique(satellite))

# remove Landsat 7 data from 2018
lst_final[lst_final$satellite=='Landsat 7' & lst_final$Date>'2018-01-01','ST']<-NA
lst_final<-lst_final[!is.na(lst_final$ST),]

# remove invalid values
lst_final<-lst_final[lst_final$ST>(-5) & lst_final$ST<35,]

Now you have your lst_final.csv dataset for the desired coordinate points starting from year 1984. The ST column of the lst_final data frame shows surface temperature in Celsius degrees. You can also use codes for plotting Figure 2 and 3 - timeseries of temperature.

You can plot the time series of all or one location using the example scripts below.

Plot temperature

Plot all lakes

Filter one lake and plot each year separately