File:Maya area drought index pdsi yearv 1418 1.svg
Original file (SVG file, nominally 473 × 576 pixels, file size: 1.3 MB)
Captions
Summary
[edit]DescriptionMaya area drought index pdsi yearv 1418 1.svg |
English: Maya-area drought index PDSI on year 1418 |
Date | |
Source | Own work |
Author | Merikanto |
This plot is based on Mexican drought atlas
David W. Stahle, Edward R. Cook, Dorian J. Burnette, Jose Villanueva, Julian Cerano, Jordan N. Burns, Daniel Griffin, Benjamin I. Cook, Rodolfo Acuna, Max C.A. Torbenson, Paul Sjezner, Ian M. Howard. 2016. The Mexican Drought Atlas: Tree-ring reconstructions of the soil moisture balance during the late pre-Hispanic, colonial, and modern eras. Quaternary Science Reviews, 149, 34-60. doi: 10.1016/j.quascirev.2016.06.018
https://www.ncei.noaa.gov/access/paleo-search/study/20353
Homegape of Mexican drought atlas, 2014
http://drought.memphis.edu/MXDA/
R script to process pre-processed data
Separators to semicolon ;
- mexico drought hisrtorical pdsi data
library(raster)
library(ncdf4)
library(terra)
library(pals) ##palettes
library(RColorBrewer)
- year to map plot
- year1=1418
- year1=1946
- year1=2004
year1=1418
- coordinates where from take data
- tikal
- pox1=-89.622778
- poy1=17.221944
- uxmal
pox1=-89.771389
poy1=20.359444
gp0<-read.csv("./northdata1/mex/mxda-grid-points_1.csv",
header = F, sep = ";")
- print(head(gp0))
lons1<-as.vector(gp0$V2)
lats1<-as.vector(gp0$V3)
- print(lons1)
- print(lats1)
- quit(-1)
data0 <- read.csv("./northdata1/mex/mxda-recon-jja-scpdsi-1400-2012_2.csv",
header = F, sep = ";")
- print(head(data0))
d0<-as.matrix(data0)
- print(d0)
- print (dim(d0))
- stop(-1)
- Periods of frequent drought centered at the years 1483, 1533, 1571, 1601, 1650, 1691, 1730, 1783, 1818, and 1860 have been identified.
n1=year1-1400
d10<-as.numeric(d0[n1,])
- print(d10)
d1<-d10[-1]
- print(d1)
len1=length(d1)
- print(len1)
- print (length(lons1))
df1<-data.frame(cbind(lons1, lats1, d1))
names(df1)<-c("x","y","pdsi")
- print (head(df1))
r1 <- rasterFromXYZ(df1)
sr1<-rast(df1)
- plot(sr1)
col1<-colFromX(sr1, pox1)
row1<-rowFromY(sr1, poy1)
x1<-xFromCol(sr1, col1)
y1<-yFromRow(sr1, row1)
- print(x1)
- print(y1)
idxe1 <- match(df1$x, x1)
idxe2 <- match(df1$y, y1)
- print(idx1)
idxe3<-idxe1*idxe2
- print(idxe3)
idx1<-which(idxe3==1)
years1<-data0[,1]
pdsis1<-data0[,1+idx1]
pd1<-data.frame(cbind(years1, pdsis1))
names(pd1)<-c("year", "pdsi")
print (head(pd1, 32))
print("idx year pdsi")
print(idx1)
print(years1[idx1])
print(pdsis1[idx1])
print(pd1$year[1+idx1])
- lowestyears1<-pd1[pd1$pdsi<-1,]
- print(lowestyears1)
- lowest1<-pd1[as.numeric(pd1$pdsi) <-3.0]
- print(lowest1)
- quit(-1)
minidx1<-which.min(pdsis1)
- print(minidx1)
minyear1<-minidx1+1400
print(minyear1)
- print(years1)
- plot(r1)
pal <- colorRampPalette(c("brown","yellow","green","blue"))
plot(years1, pdsis1, type="l")
- lines
plot(r1,
col=pal(256),
main="Maya area annual P/PET percent",
xlab="longitude",
ylab="latitude")
#sub="Aridity P/PET %")
contour(r1, add=T, alpha=50)
points( c(-89.622778), c(17.221944), col = "red",pch=2, cex=2, lwd=1, add=T)
points( c(-89.771389), c(20.359444), col = "red",pch=2, cex=2, lwd=1, add=T)
text(c(-89.622778 ),c(17.221944 ), labels=c("Tikal"), cex= 1, pos=3)
text(c(-89.771389), c(20.359444), labels=c("Uxmal"), cex= 1, pos=3)
dev.off()
- system("pdf2svg Rplots.pdf maya_area_pdsi.svg")
crs(r1)<-"lonlat"
writeRaster(r1 , filename="mexico_pdsi.nc", bandorder='BSQ',format="NetCDF", overwrite=TRUE)
GMT6 bash unix plotting script
- mexico drought hisrtorical pdsi data
library(raster)
library(ncdf4)
library(terra)
library(pals) ##palettes
library(RColorBrewer)
- year to map plot
- year1=1418
- year1=1946
- year1=2004
year1=1418
- coordinates where from take data
- tikal
- pox1=-89.622778
- poy1=17.221944
- uxmal
pox1=-89.771389
poy1=20.359444
gp0<-read.csv("./northdata1/mex/mxda-grid-points_1.csv",
header = F, sep = ";")
- print(head(gp0))
lons1<-as.vector(gp0$V2)
lats1<-as.vector(gp0$V3)
- print(lons1)
- print(lats1)
- quit(-1)
data0 <- read.csv("./northdata1/mex/mxda-recon-jja-scpdsi-1400-2012_2.csv",
header = F, sep = ";")
- print(head(data0))
d0<-as.matrix(data0)
- print(d0)
- print (dim(d0))
- stop(-1)
- Periods of frequent drought centered at the years 1483, 1533, 1571, 1601, 1650, 1691, 1730, 1783, 1818, and 1860 have been identified.
n1=year1-1400
d10<-as.numeric(d0[n1,])
- print(d10)
d1<-d10[-1]
- print(d1)
len1=length(d1)
- print(len1)
- print (length(lons1))
df1<-data.frame(cbind(lons1, lats1, d1))
names(df1)<-c("x","y","pdsi")
- print (head(df1))
r1 <- rasterFromXYZ(df1)
sr1<-rast(df1)
- plot(sr1)
col1<-colFromX(sr1, pox1)
row1<-rowFromY(sr1, poy1)
x1<-xFromCol(sr1, col1)
y1<-yFromRow(sr1, row1)
- print(x1)
- print(y1)
idxe1 <- match(df1$x, x1)
idxe2 <- match(df1$y, y1)
- print(idx1)
idxe3<-idxe1*idxe2
- print(idxe3)
idx1<-which(idxe3==1)
years1<-data0[,1]
pdsis1<-data0[,1+idx1]
pd1<-data.frame(cbind(years1, pdsis1))
names(pd1)<-c("year", "pdsi")
print (head(pd1, 32))
print("idx year pdsi")
print(idx1)
print(years1[idx1])
print(pdsis1[idx1])
print(pd1$year[1+idx1])
- lowestyears1<-pd1[pd1$pdsi<-1,]
- print(lowestyears1)
- lowest1<-pd1[as.numeric(pd1$pdsi) <-3.0]
- print(lowest1)
- quit(-1)
minidx1<-which.min(pdsis1)
- print(minidx1)
minyear1<-minidx1+1400
print(minyear1)
- print(years1)
- plot(r1)
pal <- colorRampPalette(c("brown","yellow","green","blue"))
plot(years1, pdsis1, type="l")
- lines
plot(r1,
col=pal(256),
main="Maya area annual P/PET percent",
xlab="longitude",
ylab="latitude")
#sub="Aridity P/PET %")
contour(r1, add=T, alpha=50)
points( c(-89.622778), c(17.221944), col = "red",pch=2, cex=2, lwd=1, add=T)
points( c(-89.771389), c(20.359444), col = "red",pch=2, cex=2, lwd=1, add=T)
text(c(-89.622778 ),c(17.221944 ), labels=c("Tikal"), cex= 1, pos=3)
text(c(-89.771389), c(20.359444), labels=c("Uxmal"), cex= 1, pos=3)
dev.off()
- system("pdf2svg Rplots.pdf maya_area_pdsi.svg")
crs(r1)<-"lonlat"
writeRaster(r1 , filename="mexico_pdsi.nc", bandorder='BSQ',format="NetCDF", overwrite=TRUE)
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 | 09:49, 9 January 2024 | 473 × 576 (1.3 MB) | 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 | 378.4pt |
---|---|
Height | 460.8pt |