File:Maya area pdsi july 1980-2020 1.svg
Original file (SVG file, nominally 630 × 630 pixels, file size: 511 KB)
Captions
Summary[edit]
DescriptionMaya area pdsi july 1980-2020 1.svg |
English: Maya area Palmer's drought index PDSI at July 1980 - 2020 |
Date | |
Source | Own work |
Author | Merikanto |
This plot is based on Terraclimate data.
https://www.climatologylab.org/terraclimate.html
Abatzoglou, J.T., S.Z. Dobrowski, S.A. Parks, K.C. Hegewisch, 2018, Terraclimate, a high-resolution global dataset of monthly climate and climatic water balance from 1958-2015, Scientific Data,
Copyrights
To the extent possible under law, John Abatzoglou has waived all copyright and related or neighboring rights to TerraClimate. This work is published from: United States. CC0
"R" code to download and visualize data
must do arter Rscript run "pdf2svg Rplots.pdf maya_area_pdsi_july_1980-2020_1.svg" or somethingg like this, if you want svg image
-
- download and average in year and many years terraclimate data, tex PDSI
- R script
library(raster)
library(ggplot2)
library(dplyr)
library(RColorBrewer)
years1=1980:2020
- variable1="soil"
variable1="PDSI"
ext <- extent(c(xmin = -94, xmax = -86, ymin = 14, ymax = 22))
- year1=1984
plotting_raster<-function(ras1, year1)
{
pal <- colorRampPalette(c("brown","yellow","green","blue"))
- title1<-paste0("Maya area July",as.character(year1),"moisture")
title1<-paste0("Maya area July drought index PDSI")
plot(ras1,
col=pal(256),
main=title1,
xlab="longitude",
ylab="latitude")
contour(ras1, add=T, alpha=50)
points(c(-89.622778 ),c(17.221944 ), col = "red",pch=2, cex=3, lwd=3, add=T)
text(c(-89.622778 ),c(17.221944 ), labels=c("Tikal"), cex= 2, pos=3)
- dev.off()
system("pdf2svg Rplots.pdf maya_area_ptopet_july_x1.svg")
- writeRaster(ras1 , filename="ras1.nc", bandorder='BSQ',
- format="NetCDF", overwrite=TRUE)
}
terraclimate_load_plot_year<-function(year1, ext, variable1)
{
- download.file(url = 'http://thredds.northwestknowledge.net:8080/thredds/fileServer/TERRACLIMATE_ALL/data/TerraClimate_ppt_2019.nc',
- destfile = 'ppt.nc')
- pdsi
filename1="http://thredds.northwestknowledge.net:8080/thredds/fileServer/TERRACLIMATE_ALL/data/TerraClimate_"
filename2=paste0(variable1,"_")
filename3=as.character(year1)
filename4=".nc"
url1=paste0(filename1,filename2,filename3, filename4)
print(url1)
- quit(-1)
download.file(url = url1 ,
destfile = 'ppt.nc')
ppt <- stack(x = 'ppt.nc')
print("crop")
ppt <- crop(x = ppt, y = ext)
print("mean")
ppt_mean <- calc(ppt, fun = mean, na.rm = TRUE)
- ras1<-ppt_mean
ras1= ppt7
crs(ras1)<-"lonlat"
return(ras1)
}
rs1<-stack()
for (year1 in years1)
{
r1<-terraclimate_load_plot_year(year1, ext, variable1)
rs1<-stack(rs1, r1)
}
rout1 <- calc(rs1, fun = mean, na.rm = TRUE)
writeRaster(rout1 , filename="rout1.nc", bandorder='BSQ',
format="NetCDF", overwrite=TRUE)
plotting_raster(rout1, year1)
- plot(rout1)
- year1=2000
- variable1="PDSI"
- terraclimate_load_plot_year(year1, ext, variable1)
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 | 13:52, 7 January 2024 | 630 × 630 (511 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 | 504pt |
---|---|
Height | 504pt |