File:Chaco precipitation 0 2000 ad 1.svg
Original file (SVG file, nominally 2,160 × 720 pixels, file size: 198 KB)
Captions
Summary
[edit]DescriptionChaco precipitation 0 2000 ad 1.svg |
English: Chaco Canyon precipitation 0 - 2000 AD |
Date | |
Source | Own work |
Author | Merikanto |
This plt is based on "Southwestern USA Growing Degree Days and Precipitation Reconstructions"
R. Kyle Bocinsky, Johnathan Rush, Keith W. Kintigh and Timothy A. Kohler. 2016. Exploration and exploitation in the macrohistory of the pre-Hispanic Pueblo Southwest. Science Advances, 2(4), e1501532. doi: 10.1126/sciadv.1501532
NOAA Study Page:
https://www.ncei.noaa.gov/access/paleo-search/study/19783
JSON Metadata:
https://www.ncei.noaa.gov/access/paleo-search/study/search.json?xmlId=17591
DIF Metadata:
http://www1.ncdc.noaa.gov/pub/data/metadata/published/paleo/dif/xml/noaa-recon-19783.xml
ISO Metadata:
http://www1.ncdc.noaa.gov/pub/data/metadata/published/paleo/iso/xml/noaa-recon-19783.xml
DOI:
https://doi.org/10.25921/8ctk-8v26
R code to download data and plot curve. In Linux, uses pdf2svg.
- 3
-
- southwest usa 2000 years data temperature, precipitation curve
- "R"
-
- 15.01.2024 v 0000.002
-
library(raster)
library(ncdf4)
library(terra)
library(pals)
download_data=1
- mesa verde
- sitename1<-"Mesa Verde"
- plat1<- 37.183889
- plon1<- -108.488611
- chaco
sitename1="Chaco Canyon"
plat1=36.058333
plon1 =-107.958889
yeara=1
yearb=2000
title1<-paste0(sitename1, " annual precipitation ",as.character(yeara)," - ",as.character(yearb)," AD")
konvo1<-paste0("pdf2svg out.pdf ",gsub(" ","_",tolower(sitename1)),"_precipitation_",as.character(yeara),"_",as.character(yearb),"_1.svg")
slat1=as.character(as.integer(plat1))
slon1=as.character(as.integer(abs(plon1))+1)
print(slat1)
print(slon1)
nametrunc1=paste0(slon1, "W", slat1, "N")
iname1<-paste0(nametrunc1, "_GDD.nc4")
iname2<-paste0(nametrunc1, "_PPT.nc4")
print(iname1)
print(iname2)
urlbase1<-"https://www.ncei.noaa.gov/pub/data/paleo/treering/reconstructions/northamerica/usa/bocinsky2016/"
url1<-paste0(urlbase1, iname1)
url2<-paste0(urlbase1, iname2)
if(download_data==1)
{
download.file(url = url1,destfile = iname1)
download.file(url = url2,destfile = iname2)
}
- quit(-1)
ncin1<- nc_open(iname1)
lon <- ncvar_get(ncin1, "longitude")
lat <- ncvar_get(ncin1, "latitude")
t <- ncvar_get(ncin1, "Year")
- print(t)
- stop(-1)
- pdsi0 <- ncvar_get(ncin1, "SPI")
gbrick1<-brick(iname1)
pbrick2<-brick(iname2)
- plot(gbrick1)
- plot(pbrick2)
temp_series <- extract(gbrick1, SpatialPoints(cbind(plon1,plat1)), method='simple')
precip_series <- extract(pbrick2, SpatialPoints(cbind(plon1,plat1)), method='simple')
- print(temp_series)
- plot(temp_series)
- y<-temp_series
y0<-precip_series
x0<-1:length(y0)
- x2<-x0
- y2<-y0
print(x0)
idx1<-which(x0==yeara, arr.ind=T)
idx2<-which(x0==yearb , arr.ind=T )
print(idx1)
print(idx2)
x<-x0[idx1:idx2]
y<-y0[idx1:idx2]
- stop(-1)
df2<-data.frame(cbind(x,y))
names(df2)<-c("x", "y")
ymean2<-mean(y)
fit1 <- smooth.spline(x, y, all.knots=F, nknots=501)
pdf(file = paste0("out.pdf"), width = 24, height = 8, colormodel = "rgb")
plot(x,y, type="l", lwd=2,
- col="#af7070",
col="#7070af",
lty=1,
main=title1,
xlab="Year AD",
ylab="precipitation mm",
cex.lab=2, cex.axis=1.5, cex.main=2, cex.sub=1.5
,xaxt="n"
)
axis(1, at = seq(0, 2000, by = 100), cex.axis=1.5)
grid(nx = NULL, ny = NULL,
lty = 2, # Grid line type
col = "gray", # Grid line color
lwd = 1)
- lines(x,y , col="#af7070", lwd=2,add=T)
lines(x,y , col="#7070af", lwd=2,add=T)
abline(h=ymean2, col="#007f00", lwd=3,add=T )
- lines(x,y , col="#3f0000", lwd=5,add=T)
- Add the smooth curve to the plot
- lines(fit1, col = "#7f0000", lwd = 4)
lines(fit1, col = "#00007f", lwd = 4)
- lines(valu2, col = "blue", lwd = 2 )
- axis(1, xaxp=c(700, 1800, 19), las=2)
- lines(x,y,col = "red",lwd = 4, add=T)
dev.off()
system(konvo1)
print(".")
quit("yes")
- dev.off()
Licensing
[edit]- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 11:40, 15 January 2024 | 2,160 × 720 (198 KB) | Merikanto (talk | contribs) | code update | |
18:39, 10 January 2024 | 2,160 × 720 (194 KB) | Merikanto (talk | contribs) | Uploaded own work with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 1728pt |
---|---|
Height | 576pt |