Created
March 11, 2019 16:54
-
-
Save JoFAM/2a671bac176a4ec7e5753d3dc4d3840a to your computer and use it in GitHub Desktop.
Quick plot of the hadcrut data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download median of regional timeseries | |
temp <- readLines("https://www.metoffice.gov.uk/hadobs/hadcrut4/data/current/time_series/HadCRUT.4.6.0.0.monthly_ns_avg.txt") | |
temp <- data.frame(do.call(rbind, strsplit(temp," ")), | |
stringsAsFactors = FALSE) | |
temp[-1] <- lapply(temp[-1], as.numeric) | |
temp$year <- as.numeric(gsub("/.*","",temp[,1])) | |
temp$month <- as.numeric(gsub(".*/","",temp[,1])) | |
temp$time <- temp$year + temp$month/12.5 | |
# Create plot ensemble median | |
id <- temp$year > 1997 | |
plot(temp$time[id],temp[id,2] + 14, type = "l", | |
xlab = "time", | |
ylab = "Median of 100 simulations", | |
main = "SST bias adjustment simulations of HadCRUT") | |
# Information on methodology : | |
# https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2011JD017187 | |
# also explained here with the data format | |
# https://www.metoffice.gov.uk/hadobs/hadcrut4/data/current/series_format.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment