File:Fairbanks 20000 bp climate diagram.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 1,080 × 720 pixels, file size: 47 KB)

Captions

Captions

Climate diagram of Fairbanks, 20000 years ago

Summary[edit]

Description
English: Climate diagram of Fairbanks, Alaska, 20000 years ago during last ice age. Data is based from Chelsa Trace21ka and attempted to correlate downscaling artefact with Zagoskin lake paleotemperature data.
Date
Source Own work
Author Merikanto
Camera location64° 50′ 37″ N, 147° 43′ 23″ W  Heading=1° Kartographer map based on OpenStreetMap.View this and other nearby images on: OpenStreetMapinfo

This ice age climate diagram is based on Chelsa Trace21ka data.

Karger, D. N., Nobis, M. P., Normand, S., Graham, C. H., & Zimmermann, N. E. (2021). CHELSA-TraCE21k v1. 0. Downscaled transient temperature and precipitation data since the last glacial maximum. Climate of the Past Discussions, 1-27

https://chelsa-climate.org/paleo-climate/ https://chelsa-climate.org/chelsa-trace21k/ https://envicloud.wsl.ch/#/?prefix=chelsa%2Fchelsa_V1%2Fchelsa_trace%2F

And midge-based temperature data of Zagoskin Lake

https://www.ncei.noaa.gov/access/paleo-search/study/8706 https://www.ncei.noaa.gov/pub/data/paleo/insecta/chironomidae/northamerica/usa/alaska/zagoskin-burial2009.txt

Data is processec with Geany to Age, T_July format, separator of columns is ;

Kurek et al. 2009 Alaska 39KYr Midge-Inferred July Temperature Originator: Kurek, J.; Cwynar, L.C.; Ager, T.A.; Abbott, M.B.; Edwards, M.E.

NAME OF DATA SET: Western Alaska 39KYr Midge-Inferred July Temperatures

LAST UPDATE: 10/2009 (Original receipt by WDC Paleo) CONTRIBUTOR: Joshua Kurek, University of New Brunswick IGBP PAGES/WDCA CONTRIBUTION SERIES NUMBER: 2009-113


WDC PALEO CONTRIBUTION SERIES CITATION: Kurek, J., et al. 2009. Western Alaska 39KYr Midge-Inferred July Temperatures. IGBP PAGES/World Data Center for Paleoclimatology Data Contribution Series # 2009-113. NOAA/NCDC Paleoclimatology Program, Boulder CO, USA.


ORIGINAL REFERENCE: Kurek, J., L.C. Cwynar, T.A. Ager, M.B. Abbott, and M.E. Edwards. 2009. Late Quaternary paleoclimate of western Alaska inferred from fossil chironomids and its relation to vegetation histories. Quaternary Science Reviews, Vol. 28, pp. 799-811. doi:10.1016/j.quascirev.2008.12.001



Fairbanks climate 20000 BP

"fairbanks.csv"

"";"Month";"T";"P" "1";1;-23.83;15 "2";2;-19.93;10 "3";3;-11.83;8 "4";4;-2.63;8 "5";5;2.97;15 "6";6;8.47;28 "7";7;10.97;49 "8";8;8.07;44 "9";9;2.17;28 "10";10;-6.53;20 "11";11;-15.73;18 "12";12;-21.53;17


Chironomid/midge data of Zagoskin Lake, "zagoskinlake.csv"

Age;July_T 0;11.3 531.6;11.29 876.9;11.47 1482;10.89 1902.4;10.94 2359.6;10.97 2892.3;11.45 3264.5;11.76 4271.8;11.31 4386.9;11.5 4921.5;11.12 6791.6;11.82 7048.5;12.02 7431.7;12.15 7667.5;11.45 7794.1;11.9 8636.2;11.39 9289.6;11.19 10245.5;11.56 10929.1;12.35 11418.6;12.76 12267.1;13.77 13018.7;13.48 13566;13.13 13597.9;13.08 14514.5;13.1 15134.7;12.03 15623.8;11.39 16091.6;12.48 16789.8;12.99 17082.8;11.82 17675.8;12.27 18103.3;11.01 18678.5;10.98 19202.6;11.44 21464.3;10.95 22708.3;10.01 22816.1;9.43 23406.2;9.91 23867.3;10.52 24540.6;10.06 25718;9.5 26831.3;9.28 26918.2;8.49 27014.3;9.66 27100.2;9.71 27995;9.92 28381.9;10.21 28849;9.82 29096;8.83 29201.3;9.39 29281.6;9.33 29917.2;8.45 30095.5;8.72 30759.9;9.27 30786.9;9.26 30813.9;8.92 31136.5;10.51 31270.2;9.49 31589.9;9.23 31977.4;9.63 32049.4;8.62 32109.6;8.36 32201;9.27 32764.3;9.57 32984.4;9.6 33031.7;9.74 33201.8;9.97 33319.8;9.7 33573.7;9.84 33705.4;8.35 33730.6;8.95 33797.8;9.69 33991.9;10.25 34017.2;10.27 34049.2;10.47 34075.4;10.29 34145.4;9.17


"R" script to acquire chelsa trace21ka v1 data, ad 2021

    1. chelsa trace21ka climate data download
  1. and climate diagram w/external python script
    1. extract monthly data
    1. in this version calibration of alaska inland temperatures
    2. with zagoskin lake chironomid data
    3. 20.10.2021 0000.0002


library(raster) library(sp) library("readxl") library("tidyverse")


download_chelsa_trace21ka_file<-function(linkdir1,variable1,month1, kyrs1) { linkbase1="https://os.zhdk.cloud.switch.ch/envicloud/chelsa/chelsa_V1/chelsa_trace/" filebase1="CHELSA_TraCE21k_" suffix1="_V1.0.tif"

filename1=paste0(filebase1,variable1,"_",as.character(month1),"_-",as.character(kyrs1),suffix1) print(filename1)

inlink1=paste0(linkbase1,linkdir1,filename1) infn1=paste0(filename1)

print(inlink1) print(infn1)

download.file(inlink1,infn1,method="curl", mode="wb") }


download_chelsa_data_files<-function(kyrs1) { indir1="./indata" ## dir.remove(indir1) dir.create(indir1) setwd(indir1)

for (n in 1:12) { download_chelsa_trace21ka_file("pr/","pr",n, kyrs1) }

for (n in 1:12) { download_chelsa_trace21ka_file("tasmax/","tasmax",n, kyrs1) }

for (n in 1:12) { download_chelsa_trace21ka_file("tasmin/","tasmin",n, kyrs1) }

}



load_climate_data<-function(sitename,age, lon1, lat1) { outfilename=paste0(tolower(sitename),".csv")

agecents1=age/100


precips=c() temps1=c() temps2=c() temps=c()

for (n in 1:12) { variable1="pr" precip1<-get_value(variable1, lon1, lat1,agecents1, n) precips=c(precips, precip1) }

for (n in 1:12) { variable1="tasmax" temp1<-get_value(variable1, lon1, lat1,agecents1, n) temps1=c(temps1, temp1) }

for (n in 1:12) { variable1="tasmin" temp2<-get_value(variable1, lon1, lat1,agecents1, n) temps2=c(temps2, temp2) }


temps0=(temps1+temps2)/2 temps1=(temps0/10)-273.15 temps=round(temps1, digits = 1)

months=1:12

print(precips) print(temps)


daffy1<-data.frame(months, temps, precips)

names(daffy1)<-c("Month","T","P") print(daffy1)

write.table(daffy1, file = outfilename, sep = ";",row.names = TRUE, col.names = NA)

return(temps[7])

}


create_climate_plot<-function(sitename,age, lon1, lat1) {

load_climate_data(sitename,age, lon1, lat1)

placename1=sitename yearr1=as.character(age)

    1. we use external python script to plot

sj1=paste0("python hadiag1.py ",placename1," ",yearr1)


print(sj1)

system(sj1)

}

read_chironomid_datafile<-function(zagoname1,aake1) { cin1=read.csv(zagoname1, sep=";") #print(cin1) ager1=as.vector(cin1['Age']) temper1=as.vector(cin1['July_T']) lusmu1=which(ager1>aake1) a2=lusmu1[1] a1=a2-1 ake1=cin1[a1,1] t1=cin1[a1,2] ake2=cin1[a2,1] t2=cin1[a2,2] agestep=ake2-ake1 tstep=t2-t1 koo=tstep/agestep dake=aake1-ake1 tempera=t1+dake*koo return(tempera) }

read_climate_datafile<-function(filename1) { cin1=read.csv(filename1, sep=";") return(cin1) }

write_climate_datafile<-function(daffy1, filename1) { #cin1=read.csv(filename1, sep=";") if (file.exists(filename1)) { file.remove(filename1) } write.table(daffy1, filename1, sep = ";",row.names = TRUE, col.names = NA) return(daffy1) }


filter_temperature_data<-function (daffy1, tofset1) { print(" TO FILT") print(daffy1)

df1 = data.frame(Month = numeric(), T = numeric(),P=numeric() )

   names(df1)<-c("Month","T","P")

print (daffy1$July_T)

print(tofset1)


for (n in 1:12) {

kuku1<-daffy1[n,2]

## JN WARNING

tofu1<-daffy1[n,3]+tofset1 #tofu1<-(daffy1[n,8]*1.0)+tofset1

tofu2<-round(tofu1,2) pepe1<-daffy1[n,4]

df1[nrow(df1) + 1,] = c(kuku1,tofu2,pepe1)

}

print("FILTETED")

print(df1)

return(df1)

}


filter_climate_datafile<-function(filename1, tofset1) { print("Filtering climate data by TJuly offset ...") print(tofset1) daffy1<-read_climate_datafile(filename1)

daffy2<-filter_temperature_data(daffy1, tofset1) print("Filtered data:") print(daffy2)

write_climate_datafile(daffy2, filename1) print(filename1)

return(daffy2)

}




load_zagoskin_lake_midge_data_from_net_xls<-function() { #targeturl1="https://www.ncei.noaa.gov/pub/data/paleo/insecta/chironomidae/northamerica/usa/alaska/zagoskin-burial2009.txt" targeturl1="https://www.ncei.noaa.gov/pub/data/paleo/insecta/chironomidae/northamerica/usa/alaska/zagoskin-burial2009.xls" targetfile1="zagoskin_input.xls"

download.file(targeturl1, targetfile1, method="curl")

excel1=read_excel(targetfile1)

path1 <- targetfile1

excel1<-path1 %>% excel_sheets() %>% set_names() %>% map(read_excel, path = path1)

#excel1

#str(excel1)

zagoskin01<-excel1[3]

zagoskin02<-zagoskin01$`Zagoskin Lake`

zages01<-zagoskin02[2] ztemps01<-zagoskin02[3]

#zages01 #ztemps01

zago_data_1<-data.frame(zages01,ztemps01)

names(zago_data_1)<-c("Age", "July_T")

write.table(zago_data_1,"zagoskinlake.csv",sep=";")

#print(zago_data_1)

return(zago_data_1) }


get_value<-function(variable1, lon1, lat1,agecents1, month1) { filebase1="CHELSA_TraCE21k_" suffix1="_V1.0.tif"

filename1=paste0(filebase1,variable1,"_",as.character(month1),"_-",as.character(agecents1),suffix1)

inf1=paste0("./indata/", filename1) rin1<-raster(inf1)

#print(filename1) #print(inf1)

xy1 <- SpatialPoints(coords = cbind(lon1,lat1))

#print(rin1) #print(xy1)

## must use raster::, because tidyr has also extract()! value1<-raster::extract(rin1, xy1)

 return(value1)

}


    1. main proge
    1. set 1, if you want download data, must do tht in first time
  1. USAGE is some complicated
    1. by first, to download date, set download_?=1 , plot_data=0
  2. drawer does not func
  3. download_data=1
  4. download_alaska_midge_data=1
  5. plot_data=0
    1. by second, to made plot, set plot_data=0, drawer is ok
  6. download_data=0
  7. download_alaska_midge_data=0
  8. plot_data=1


download_data=0 ## obtain chelsa trace 21 kadata ad 2021.10 download_alaska_midge_data=0

    1. secont, set plot 1

plot_data=1

filter_by_zagoskin=1 ## filter plotted alaska temperatures w/zagoskin lake chironomid data


  1. age=20000
    1. age=14000

age=20000


sitename="Fairbanks" lon1=-147.723056 lat1=64.843611


  1. sitename="Selerika"
  2. lat1=64.66666
  3. lon1=147.833333
  1. sitename="Kitluk"
  2. lat1=66.50939782345924
  3. lon1=-164.42294254249194


  1. sitename="Paris"
  2. lat1=48.856613
  3. lon1=2.352222
  1. sitename="Yukagir"
  2. lat1=71.75
  3. lon1=139.883333
    1. sitename="Kiev"
    2. lat1=50.45
    3. lon1=50.45
  1. sitename="Les_Eyzies"
  2. lat1=44.936667
  3. lon1=1.018056
  1. sitename="Rouffignac"
  2. lat1=45.008889
  3. lon1=0.9875


    1. must download chelsa trace21ka files, if you have not

if(download_alaska_midge_data==1) { print("Download Alaska midge paleo data ...") load_zagoskin_lake_midge_data_from_net_xls() }

if(download_data==1) { print("Download Chelsa Trace21ka data ...")

agecents1=age/100 download_chelsa_data_files(agecents1) }


if(plot_data==1) {

  1. Sys.sleep(20)

if(filter_by_zagoskin==1) {

    1. filter alaska data by zakoskun laje Age, T_July chironomid
    2. to get better july temp

print("Filtering climate data by offset ...") print("Plotting, correction with Zagoskin lake data ....")


zagotemp1=read_chironomid_datafile("./zagoskinlake.csv",age)


print(zagotemp1)

zagosimu1=load_climate_data("zagoskin",age, -162.10752764569278, 63.44888166191213)

print(zagosimu1)


filename1=paste0(tolower(sitename),".csv") ## loaf fairbaks etc load_climate_data(sitename,age, lon1, lat1)


tofset1<-zagotemp1-zagosimu1 #tofset1<-round(tofset1,1)

print (tofset1)

print(sitename)

filter_climate_datafile(filename1, tofset1)


placename1=sitename yearr1=as.character(age)

## we use external python script to plot

sj1=paste0("python hadiag1.py ",placename1," ",yearr1)

print(sj1)

system(sj1)

}


if(filter_by_zagoskin==0) { print("Plotting, no correction w/Zagoskin lake data ....") create_climate_plot(sitename,age, lon1, lat1) }

} # ... plot data


Python script "hadiag1.py" to draw climate diagram

    1. drawing climate diagram in python 3
    2. from input csv file
    3. version 2.1102
    4. 17.10.2021

import matplotlib.pyplot as plt import numpy as np import pandas as pd from scipy import interpolate import sys

print ('Argument List:', str(sys.argv))

pohjanimi=sys.argv[1] ika=sys.argv[2] isonimi=pohjanimi.capitalize()

print(pohjanimi, isonimi, ika)

  1. quit(-1)
  1. pohjanimi="paris"
  2. ika="40750"

captioni=isonimi+", "+ika+" BP" maxrainfall=120 mintemperature=-40 maxtemperature=20

datafilename=pohjanimi+".csv" savename=pohjanimi+"_"+ika+"_bp_climate_diagram.svg"

figsizex=12 figsizey=8

x0 = [] y0 = [] y20= []

x = [] y = [] y2= []

dfin0=pd.read_csv(datafilename, sep=";") lst1 = ['Month','T','P']

dfin1 = dfin0[dfin0.columns.intersection(lst1)]

x0=dfin1['Month'] y0=dfin1['T'] y20=dfin1['P']

x.append(0) y.append(y0[11]) y2.append(y0[11])

for n in range(0, 12): x.append(x0[n]) y.append(y0[n]) y2.append(y20[n])

x.append(13) y.append(y0[0]) y2.append(y0[0])

print(x)

  1. print(y)
  2. print (type(x))
  3. print (type(y))
  1. quit(0)

yearprecip=0 yeartemp=0

for n in range(1, 13): yearprecip=yearprecip+y2[n] yeartemp=yeartemp+y[n] print (n,y[n],y2[n])


size1=22 size2=26 size3=30

yeartemp=round((yeartemp/12.0),1) mintemp=min(y) maxtemp=max(y) yearprecip=round(yearprecip,0) maxprecip=max(y2) minprecip=min(y2)

print(yearprecip) print(minprecip) print(maxprecip)

print(yeartemp) print(mintemp) print(maxtemp)

ymax1=int((maxprecip+60)/20)*20 ymax2=int((maxtemp+15)/5)*5 ymin2=int((mintemp-10)/5)*5

x_sm = np.array(x) y_sm = np.array(y) x_smooth = np.linspace(x_sm.min(), x_sm.max(), 200) funk1 = interpolate.interp1d(x_sm, y_sm, kind="quadratic") y_smooth = funk1(x_smooth)

fig, ax1 = plt.subplots()

  1. plt.rcParams["figure.figsize"] = (12,16)

ax1.axis((1,12,0,ymax1))

ax1.bar(x, y2, color='#0000ff', label="Precip. mm", width=0.9, align="center")

ax1.set_ylabel('Precipitation mm', color='#00007f', fontsize=size2)

for tl in ax1.get_yticklabels():

tl.set_color('b')
tl.set_fontsize(size1)

ax2 = ax1.twinx() ax2.set_ylabel('Temperature °C', color='#7f0000', fontsize=size2)

ax2.axis((1,12,ymin2, ymax2))

  1. ax2.plot(x,y, label='Temperature °C',color="#ff0000", linewidth=7)

ax2.plot(x_smooth,y_smooth, label='Temperature °C',color="red", linewidth=10)

for t2 in ax2.get_yticklabels():

t2.set_color('r')
t2.set_fontsize(size1)

ax1.set_xlabel('Month', color="darkgreen", fontsize=size2)

for tix in ax1.get_xticklabels():

tix.set_color("Black")
tix.set_fontsize(size1)

ax1.set_title(captioni, fontsize=size3)

ax2.text(1, ymax2-4, " P annual "+str(int(yearprecip))+ " mm", color="#00007f", fontsize=size1) ax2.text(1, ymax2-8, " T year "+str(yeartemp) + " °C", color="#7f0000",fontsize=size1) ax2.text(1, ymax2-12, " T max "+str(maxtemp)+ " °C", color="#7f0000", fontsize=size1) ax2.text(1, ymax2-16, " T min "+str(mintemp) + " °C", color="#7f0000",fontsize=size1)

fig = plt.gcf() fig.set_size_inches(figsizex, figsizey, forward=True)

plt.plot()

plt.savefig(savename, format="svg", dpi = 100)

plt.show()

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
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/TimeThumbnailDimensionsUserComment
current08:46, 18 October 2021Thumbnail for version as of 08:46, 18 October 20211,080 × 720 (47 KB)Merikanto (talk | contribs)Uploaded own work with UploadWizard

The following page uses this file:

Metadata