File:Les eyzies lgm.png
Les_eyzies_lgm.png (500 × 480 pixels, file size: 10 KB, MIME type: image/png)
Captions
Summary
editDescriptionLes eyzies lgm.png |
English: Climate diagram of Les Eyzies, France, at Last Ice age coldest period. This climate diagram presents temperature, precipittation on Les Eyzies, Dordogne, Near Vezere river Aquitania, France, ca. 21000 calendar years (cal.21 ka BP) ago. during Last Glacial Maximum LGM. |
Date | |
Source | Own work |
Author | Merikanto |
This image is produced from CCSM4 Last Glacial Maximum data on WorldClim 1.4 home page.
http://www.worldclim.org/paleo-climate1 archive copy at the Wayback Machine
With special R scripts was taken seacimen from location ca. 01E, 45N.
data is processed with gdal_translate, and with some R scripts to
form
1 0 87
2 0 90
3 4 92
4 6 89
5 9 87
6 12 71
7 12 48
8 12 66
9 10 68
10 7 82
11 3 97
12 0 103
Plotting was done with gnuplot, using this script
bash script
- Rscript a4e.r --args paikat.txt
modeli="./malli5.plg"
- !/bin/bash
file="./sitez.txt"
while IFS=: read -r f1 f2 f3 f4 f5 f6
do
# printf '<%s> <%s> <%s> <%s> <%s>\n' "$f1" "$f2" "$f3" "$f4" "$f5"
nimi=$f2
kaption=$f1
paikka=$kaption
data=$f3
output=$f4
echo $output
faili=$data
- tkeski=$(awk '{s+=$2}END{print s/12}' $faili)
tkeski=$(awk '{s+=$2}END{print (int((s*10)/12))/10 }' $faili)
tminimi=$( awk '{if(min>$2){min=$2;line=$2}}END{print line}' $faili)
tmaksimi=$( awk '{if(max<$2){max=$2;line=$2}}END{print line}' $faili)
tsadem=$(awk '{s+=$3}END{print s}' $faili)
echo $tkeski
echo $tsadem
echo $tminimi
echo $tmaksimi
- gnuplot -e "datafile='${data}'; paikka='${paikka}';outputname='${output}'" $modeli
- gnuplot -e "datafile='${data}'; paikka='${paikka}';outputname='${output};avgtemp='${tkeski};totalprecip='${tsadem};mintemp='${tminimi};maxtemp='${tmaksimi};'" $modeli
- gnuplot -e "datafile='${data}'; paikka='${paikka}';outputname='${output} ';avgtemp='${tkeski} '; " $modeli
gnuplot -e "datafile='${data}'; paikka='${paikka}';outputname='${output} ';avgtemp='${tkeski} ';mintemp='${tminimi} ';maxtemp='${tmaksimi} ';totalprecip='${tsadem} ';" $modeli
done <"$file"
Gnuplot script
- gnuplot ilmastokaavio
- gnuplot climate diagram test script
- draw month, precipitation and rainfall
- run from command line
- tex. gnuplot -e
- output=test1.png
- data=foo.data
- gnuplot -e "datafile='${data}'; paikka='${paikka}';outputname='${output};avgtemp='${tkeski};totalprecip='${tsadem};mintemp='${tminimi};maxtemp='${tmaksimi};'" $modeli
set xrange [1:12]
set yrange [-10:20]
set y2range [0:200]
set key font ",16"
set tics font ", 16"
set title font ", 16"
- set terminal svg size 400 600 enhanced font 'Verdana,10'
set terminal png size 500 1200 enhanced font 'Verdana,10'
set output outputname
- paikka2=paikka"LGM"
set title paikka font ",20"
- set label 1 font ",14" "at LGM" at 5,15
- set title paikka2 font ",20"
set xtics 0,2,12 nomirror tc rgb '#000000'
set xlabel 'Months' font ",14" tc rgb '#003f00'
set ytics 5 nomirror tc rgb '#ff0000'
set ylabel 'Temperature (°C)' font ",14" tc rgb '#3f0000'
set y2tics 20 nomirror tc rgb '#0000ff'
set y2label 'Precipitation mm' font ",14" tc rgb '#00003f'
set boxwidth 0.9
set style fill solid 1.00
set style line 1 lc rgb 'blue'
set style line 2 lc rgb 'red'
- koe
koe=datafile
set label 1 "koe" at 1,1
set table 'temp.dat'
plot datafile using 1:2 smooth cspline
unset table
min_y = GPVAL_DATA_Y_MIN
max_y = GPVAL_DATA_Y_MAX
- mean_y
yposi=19
ydelta=1.5
ydelta1=ydelta
ydelta2=ydelta*2
ydelta3=ydelta*3
set label 2 font ",13" gprintf("Tavg= %3.1f °C", avgtemp) at 2,yposi
set label 3 font ",13" gprintf("Precipa= %3.0f mm", totalprecip) at 2,yposi-ydelta1
set label 4 font ",13" gprintf("Tmin= %3.1f °C", mintemp) at 2, yposi-ydelta2
set label 5 font ",13" gprintf("Tmax= %3.1f °C", maxtemp) at 2,yposi-ydelta3
- origo
- plot datafile using 1:3 notitle with boxes lc rgb '#0000ff' axes x1y2, datafile using 1:2 notitle with lines lc rgb '#ff0000' linewidth 5
- koe
plot datafile using 1:3 notitle with boxes lc rgb '#0000ff' axes x1y2, 'temp.dat' using 1:2 notitle with lines lc rgb '#ff0000' linewidth 5
R script produce the table was
- install.packages("raster")
library(ncdf4)
library(fields)
library(sp) # classes for spatial data
library(raster)
library(rasterVis) # raster visualisation
sitezfile<-"./sitez.txt"
piirroshak<-"./plot/"
tekstihak<-"./teksti/"
ohakemisto<-"./teksti/"
tnimi<-"./paikat.txt"
modeli<-"malli4.plg"
sname1 <- "./data/ccsm4_europe_lgm_tk.nc"
sname2 <- "./data/ccsm4_europe_lgm_pr.nc"
lgm_nayte<-function ( slongitude, slatitude, nimi)
{
- lgm data specimen, worldclim ccsm4 360 shifted data
paluu=0
oname<-paste(ohakemisto,nimi,"_lgm.txt", sep="")
ncfilee1 <- nc_open(sname1)
ncfilee2 <- nc_open(sname2)
longitude <- ncvar_get(ncfilee1,"lon")
latitude <- ncvar_get(ncfilee1,"lat")
tas<-ncvar_get(ncfilee1,"temperature")
pr<-ncvar_get(ncfilee2,"precipitation")
latlen=length(latitude)
lonlen=length(longitude)
- print(paste(latlen," ",lonlen))
latdex=0
londex=0
for (n in 1:latlen)
{
- oletus nouseva
if (latitude[n]>slatitude)
{
latdex=n
break
}
}
for (n in 1:lonlen)
{
- oletus nouseva
if (longitude[n]>slongitude)
{
londex=n
break
}
}
print(paste(latdex," ",londex))
- longitude
print (oname)
sink(oname)
for(n in 1:12)
{
lugu=tas[londex,latdex,n]
lugu2=pr[londex,latdex,n]
paska=paste(n, lugu[1],lugu2[1])
#print(paska)
cat (sprintf(" %i %i %i\n",n, lugu,lugu2))
}
sink()
paluu=0
return(paluu)
}
tiedkas<-function(tanimi, siirros)
{
kentat <- read.csv(file=tanimi, header=FALSE, sep=",")
kaptionat<-kentat[,1]
longit<-kentat[,3]
latit<-kentat[,2]
kaptionit<-gsub(" ", " ", kaptionat)
tokat<-gsub(" ", "_", kaptionit)
nimet<-tolower(tokat)
pitu<-length(kaptionit)
for (n in 1:pitu )
{
kaption<-kaptionit[n]
nimi<-nimet[n]
longi<-longit[n]
lati<-latit[n]
longib=longi
if (siirros==360)
{
if(longi<0)
{
longib<-longi+360
}
}
print("UUSLONG>")
print(longib)
- kaption
- nimi, longi, lati
piha<<-piirroshak[1]
teha<<-tekstihak[1]
- print(runkku)
piirrosnimi=paste(piha,"lgm_",nimi, "_diagram_en.svg", sep="")
tekstinimi=paste(teha, nimi,"_lgm.txt",sep="")
- print(runkku[1])
- print (kaption)
- print (longib)
- print (lati)
- print(piirrosnimi)
- print (tekstinimi)
print (nimi)
print (longib)
print (lati)
kippo=lgm_nayte(longib, lati, nimi)
- gnuplot -e "datafile='${data}'; paikka='${paikka}';outputname='${output}'" $modeli
- kommando="ls"
- system(kommando)
}
print (sitezfile)
sink(sitezfile)
for (n in 1:pitu )
{
kaption<-kaptionit[n]
nimi<-nimet[n]
longi<-longit[n]
lati<-latit[n]
if (siirros==360)
{
if(longi<0)
{
longib<-longi+360
}
}
piha<<-piirroshak[1]
teha<<-tekstihak[1]
piirrosnimi=paste(piha,"lgm_",nimi, "_diagram_en.svg", sep="")
tekstinimi=paste(teha, nimi,"_lgm.txt",sep="")
jono=sprintf(" %s:%s:%s:%s:%s:%s:", kaption,nimi,tekstinimi,piirrosnimi, longib, lati)
cat (sprintf("%s\n",jono))
}
sink()
paluu=0
return(paluu)
}
- pääohjelma main
- esim. Rscript a4.r --args paikat.txt
args <- commandArgs(trailingOnly = TRUE)
- print(args[2])
- tnimi <- args[2]
tnimi
tiedkas(tnimi, 0)
- slongitude <- args[3]
- slatitude <- args[4]
- print (paste (nimi, " ",slongitude, " ", slatitude) )
- kippo=lgm_nayte(212.2, 64.85,"fairbanks")
- kippo=lgm_nayte(slongitude, slatitude,nimi)
Old gnuplot script was this
set xrange [1:12]
set yrange [-20:20]
set y2range [0:200]
set key font ",16"
set tics font ", 16"
set title font ", 16"
set terminal png size 400 600 enhanced font 'Verdana,10'
set output "output.png"
- set term postscript color size 3in, 3in
- set output "les_eyzies_lgm.ps"
- set terminal svg enhanced size 1200 800
- set output 'les_eyzies_lgm.svg'
set title "Les Eyzies, LGM" font ",20"
set xtics 12 nomirror tc rgb '#000000'
set xlabel 'month' font ",14" tc rgb '#003f00'
set ytics 10 nomirror tc rgb '#ff0000'
set ylabel 'temperature' font ",14" tc rgb '#3f0000'
set y2tics 20 nomirror tc rgb '#0000ff'
set y2label 'precipitation' font ",14" tc rgb '#00003f'
set boxwidth 0.9
set style fill solid 1.00
set style line 1 lc rgb 'blue'
set style line 2 lc rgb 'red'
plot "wezere.txt" using 1:3 notitle with boxes lc rgb '#0000ff' axes x1y2, "wezere.txt" using 1:2 notitle with lines lc rgb '#ff0000' linewidth 5
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:42, 12 August 2016 | 500 × 480 (10 KB) | Merikanto (talk | contribs) | PNG edition. | |
09:29, 12 August 2016 | 400 × 600 (24 KB) | Merikanto (talk | contribs) | Spline curve, annual precipitation, max min average temperatures. | ||
08:21, 27 July 2016 | 400 × 480 (7 KB) | Merikanto (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on fi.wikipedia.org
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.
Horizontal resolution | 37.8 dpc |
---|---|
Vertical resolution | 37.8 dpc |