In [6]:
%matplotlib inline
import pandas as pd
import numpy as np
try:
import xarray as xray
except:
import xray
import matplotlib.pyplot as plt
In [7]:
import sys
In [8]:
sys.path.insert(0, '../')
In [9]:
from paleopy import proxy
from paleopy import analogs
from paleopy.plotting import scalar_plot
In [10]:
djsons = '../jsons/'
pjsons = '../jsons/proxies'
In [11]:
proxies = pd.read_excel('../data/ProxiesLIANZSWP.xlsx')
In [12]:
proxies.head()
Out[12]:
Site
Lat
Long
Anom
dataset
variable
0
Rarotonga
-21.230000
-159.820000
0.60
ersst
sst
1
Amedee
-22.480000
166.470000
-0.26
ersst
sst
2
Oroko
-43.222615
170.307329
-0.42
ncep
Tmean
3
Greenlaw
-43.006108
171.419497
-0.26
ncep
Tmean
4
Crow
-43.346222
170.998122
-0.62
ncep
Tmean
In [13]:
for irow in proxies.index:
p = proxy(sitename=proxies.loc[irow,'Site'], \
lon = proxies.loc[irow,'Long'], \
lat = proxies.loc[irow,'Lat'], \
djsons = djsons, \
pjsons = pjsons, \
pfname = '{}.json'.format(proxies.loc[irow,'Site']), \
dataset = proxies.loc[irow,'dataset'], \
variable =proxies.loc[irow,'variable'], \
measurement ='delta O18', \
dating_convention = 'absolute', \
calendar = 'gregorian',\
chronology = 'historic', \
season = 'DJF', \
value = proxies.loc[irow,'Anom'], \
qualitative = 0, \
calc_anoms = 1, \
detrend = 1, \
method = 'quintiles')
p.find_analogs()
p.proxy_repr(pprint=True, outfile=True)
{
sitename:Rarotonga
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(200.18000000000001, -21.23)
aspect:None
elevation:None
season:DJF
dataset:ersst
variable:sst
calc_anoms:True
detrend:True
value:0.6
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[200.0, -22.0]
distance_point:87.56368858840081
trend_params:{'intercept': -60.96501637775517, 'slope': 0.030535947029886681}
category:WA
analog_years:[1982, 1997, 1999, 2000, 2001, 2006, 2009]
weights:[0.15645480307020584, 0.12800536294956205, 0.13090508326029401, 0.16334634614636281, 0.15762466128135916, 0.1220029495538857, 0.1416607937383304]
}
{
sitename:Amedee
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(166.47, -22.48)
aspect:None
elevation:None
season:DJF
dataset:ersst
variable:sst
calc_anoms:True
detrend:True
value:-0.26
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[166.0, -22.0]
distance_point:71.98760982961697
trend_params:{'intercept': -16.257205985829472, 'slope': 0.0081587299763683299}
category:B
analog_years:[1983, 1987, 1997, 2001, 2003, 2013, 2014]
weights:[0.12030582528225524, 0.14130672325982882, 0.14602323617355531, 0.15477112280550417, 0.15052130006811879, 0.12187469005527739, 0.16519710235546031]
}
{
sitename:Oroko
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(170.30732900000001, -43.222614999999998)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.42
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[170.0, -42.5]
distance_point:84.11208434388203
trend_params:{'intercept': 21.494354317769279, 'slope': -0.010740051394194556}
category:B
analog_years:[1980, 1992, 2000, 2001, 2002, 2005, 2010]
weights:[0.13719655697816149, 0.14050948595789184, 0.16530091723364615, 0.13453891538699117, 0.1665181223586947, 0.12250992072350948, 0.13342608136110512]
}
{
sitename:Greenlaw
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(171.41949700000001, -43.006107999999998)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.26
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[172.5, -42.5]
distance_point:104.57596044098003
trend_params:{'intercept': 41.873055256737615, 'slope': -0.020944575657920243}
category:B
analog_years:[1991, 1992, 1994, 1997, 2000, 2002, 2010]
weights:[0.13738349098508673, 0.13423517944336696, 0.15921320855250568, 0.16250357361804696, 0.13975942260580124, 0.13350552470044413, 0.13339960009474827]
}
{
sitename:Crow
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(170.998122, -43.346221999999997)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.62
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[170.0, -42.5]
distance_point:124.25433418836984
trend_params:{'intercept': 21.494354317769279, 'slope': -0.010740051394194556}
category:B
analog_years:[1980, 1992, 2000, 2001, 2002, 2005, 2010]
weights:[0.129177737012279, 0.16420453555580453, 0.14687419063842327, 0.12750430161842832, 0.14764062737112646, 0.15779502363837741, 0.12680358416556101]
}
{
sitename:Cameron
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(171.50513900000001, -42.934066999999999)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.81
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[172.5, -42.5]
distance_point:94.46733893961293
trend_params:{'intercept': 41.873055256737615, 'slope': -0.020944575657920243}
category:WB
analog_years:[1983, 1984, 1993, 2003, 2004, 2005, 2007]
weights:[0.13500513662618582, 0.16184984668445271, 0.12336248315291025, 0.13029524282220381, 0.16123261217721352, 0.14834895947130913, 0.13990571906572477]
}
{
sitename:Avoca
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(171.405812, -43.043030999999999)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.53
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[172.5, -42.5]
distance_point:107.73975744104352
trend_params:{'intercept': 41.873055256737615, 'slope': -0.020944575657920243}
category:B
analog_years:[1991, 1992, 1994, 1997, 2000, 2002, 2010]
weights:[0.16051743220580109, 0.15459689924752107, 0.10373110812603097, 0.1099187787415854, 0.16498547206801112, 0.15322475265516694, 0.15302555695588346]
}
{
sitename:Temple
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(169.70987199999999, -44.146465999999997)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.79
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[170.0, -45.0]
distance_point:97.58982094997447
trend_params:{'intercept': 14.152330697217241, 'slope': -0.0070486105234126521}
category:WB
analog_years:[1983, 1984, 1992, 1993, 2002, 2003, 2007]
weights:[0.11224227146945494, 0.16121397971699733, 0.15921680311740918, 0.14499599158961243, 0.13029849085833708, 0.16479995664567795, 0.12723250660251109]
}
{
sitename:Hopkins
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(169.88749899999999, -43.942568999999999)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.39
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[170.0, -45.0]
distance_point:117.84526868991945
trend_params:{'intercept': 14.152330697217241, 'slope': -0.0070486105234126521}
category:B
analog_years:[1991, 1995, 1997, 2000, 2001, 2004, 2005]
weights:[0.1374302779690392, 0.12716145202549431, 0.14390981540930989, 0.16085066230274431, 0.13972899992719826, 0.14210125797571688, 0.14881753439049702]
}
{
sitename:Turnbull
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(169.850303, -43.877606999999998)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.4
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[170.0, -45.0]
distance_point:125.29023646426968
trend_params:{'intercept': 14.152330697217241, 'slope': -0.0070486105234126521}
category:B
analog_years:[1991, 1995, 1997, 2000, 2001, 2004, 2005]
weights:[0.13806181160658379, 0.12488044995904606, 0.142030693649628, 0.16204417271526811, 0.14041569185481245, 0.14284487270649815, 0.14972230750816332]
}
{
sitename:Jollie
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(170.33000000000001, -43.697778)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.99
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[170.0, -42.5]
distance_point:135.76947455586478
trend_params:{'intercept': 21.494354317769279, 'slope': -0.010740051394194556}
category:WB
analog_years:[1983, 1984, 1991, 1993, 2003, 2004, 2007]
weights:[0.095983978791864599, 0.13362559503761576, 0.1485229743441154, 0.16240552876554271, 0.16415262181092283, 0.13769043730375397, 0.15761886394618485]
}
{
sitename:Cass
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(170.315493, -43.652675000000002)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.16
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[170.0, -42.5]
distance_point:130.62568491574098
trend_params:{'intercept': 21.494354317769279, 'slope': -0.010740051394194556}
category:N
analog_years:[1988, 1994, 1995, 1997, 1998, 2009, 2014]
weights:[0.14050674187357531, 0.16245457132042215, 0.12513908860485556, 0.14796165660420671, 0.13941416900812012, 0.16267668355830042, 0.12184708903051972]
}
{
sitename:Caples
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(168.18284499999999, -44.801850999999999)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.35
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[167.5, -45.0]
distance_point:58.084070977038905
trend_params:{'intercept': 5.3646267022739131, 'slope': -0.0026633273319703788}
category:B
analog_years:[1991, 1995, 1997, 2000, 2002, 2003, 2009]
weights:[0.10167598135694365, 0.16582173502573244, 0.16624973070808291, 0.16462439083531816, 0.14118074096409586, 0.10248744262978754, 0.15795997848003929]
}
{
sitename:Fraser
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(168.18688399999999, -44.786354000000003)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.21
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[167.5, -45.0]
distance_point:59.056131286896935
trend_params:{'intercept': 5.3646267022739131, 'slope': -0.0026633273319703788}
category:N
analog_years:[1980, 1988, 1994, 1998, 2005, 2010, 2014]
weights:[0.12961147544075249, 0.14257907377638623, 0.11433190934857283, 0.15892000593555872, 0.16560152885611032, 0.12295411613954051, 0.1660018905030789]
}
{
sitename:Frances
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(168.395713, -44.596521000000003)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.41
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[167.5, -45.0]
distance_point:83.65886439139706
trend_params:{'intercept': 5.3646267022739131, 'slope': -0.0026633273319703788}
category:B
analog_years:[1991, 1995, 1997, 2000, 2002, 2003, 2009]
weights:[0.12964027926445412, 0.15419653515950754, 0.15322284555531082, 0.15196869136512317, 0.13387896612552022, 0.13026642372357025, 0.14682625880651387]
}
{
sitename:Hunter
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(169.64666700000001, -44.094444000000003)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.88
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[170.0, -45.0]
distance_point:104.4478564149211
trend_params:{'intercept': 14.152330697217241, 'slope': -0.0070486105234126521}
category:WB
analog_years:[1983, 1984, 1992, 1993, 2002, 2003, 2007]
weights:[0.11614328944100148, 0.15523191357633639, 0.15316532443096362, 0.15003537614222476, 0.1348270588198478, 0.15894252234167883, 0.13165451524794713]
}
{
sitename:Hunter
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(169.636111, -44.120832999999998)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.14
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[170.0, -45.0]
distance_point:101.85711302293483
trend_params:{'intercept': 14.152330697217241, 'slope': -0.0070486105234126521}
category:B
analog_years:[1991, 1995, 1997, 2000, 2001, 2004, 2005]
weights:[0.13039443429222705, 0.16258075470310607, 0.1609196269090126, 0.14414452456481761, 0.13174401224901508, 0.13313676318991521, 0.13707988409190636]
}
{
sitename:Mistake
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(168.01526100000001, -44.843612)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-1.14
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[167.5, -45.0]
distance_point:44.11061086498545
trend_params:{'intercept': 5.3646267022739131, 'slope': -0.0026633273319703788}
category:WB
analog_years:[1983, 1984, 1992, 1993, 2001, 2004, 2007]
weights:[0.13302655044270587, 0.13799344946615891, 0.13874665512357406, 0.14716481098050174, 0.14230854031301884, 0.13663298277795691, 0.16412701089608367]
}
{
sitename:Pyke
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(168.17833300000001, -44.803610999999997)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.1
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[167.5, -45.0]
distance_point:57.680550981802064
trend_params:{'intercept': 5.3646267022739131, 'slope': -0.0026633273319703788}
category:N
analog_years:[1980, 1988, 1994, 1998, 2005, 2010, 2014]
weights:[0.13882921914423862, 0.15460481214454913, 0.12024102650804286, 0.15884913502053635, 0.14812923579200801, 0.13073027992091638, 0.14861629146970853]
}
{
sitename:Falls Creek
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(168.01593700000001, -44.824221000000001)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.71
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[167.5, -45.0]
distance_point:45.057254239109
trend_params:{'intercept': 5.3646267022739131, 'slope': -0.0026633273319703788}
category:WB
analog_years:[1983, 1984, 1992, 1993, 2001, 2004, 2007]
weights:[0.075628924943889939, 0.15815006900970507, 0.15935342128633997, 0.16053072069297997, 0.16504403527686695, 0.15597653158281935, 0.12531629720739859]
}
{
sitename:Pear Drop
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(168.84904800000001, -44.251904000000003)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.69
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[170.0, -45.0]
distance_point:123.27337655298903
trend_params:{'intercept': 14.152330697217241, 'slope': -0.0070486105234126521}
category:WB
analog_years:[1983, 1984, 1992, 1993, 2002, 2003, 2007]
weights:[0.11147354099422473, 0.16596833074926876, 0.16554735023702352, 0.14128306122543915, 0.12790670446993252, 0.16270469378186406, 0.12511631854224725]
}
{
sitename:Clarke
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(169.45166699999999, -43.873610999999997)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.13
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[170.0, -45.0]
distance_point:132.51511287932962
trend_params:{'intercept': 14.152330697217241, 'slope': -0.0070486105234126521}
category:B
analog_years:[1991, 1995, 1997, 2000, 2001, 2004, 2005]
weights:[0.13046031008450637, 0.16341951180090014, 0.16030127666290664, 0.14390219035125798, 0.13177963708135923, 0.13314116933444589, 0.13699590468462364]
}
{
sitename:Browning Creek
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(169.83646300000001, -43.850548000000003)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.62
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[170.0, -45.0]
distance_point:128.39056026439624
trend_params:{'intercept': 14.152330697217241, 'slope': -0.0070486105234126521}
category:B
analog_years:[1991, 1995, 1997, 2000, 2001, 2004, 2005]
weights:[0.16596429879495794, 0.097545056477877284, 0.11421487907605071, 0.14265374342444501, 0.1636763566022261, 0.16131522316371305, 0.15463044246072979]
}
{
sitename:Gunn
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(170.32734300000001, -43.368293999999999)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.59
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[170.0, -42.5]
distance_point:100.09698050373754
trend_params:{'intercept': 21.494354317769279, 'slope': -0.010740051394194556}
category:B
analog_years:[1980, 1992, 2000, 2001, 2002, 2005, 2010]
weights:[0.12897747698423032, 0.16625577832730329, 0.14822663168580624, 0.12715721302288299, 0.1490603161939259, 0.15392756972877744, 0.12639501405707385]
}
{
sitename:Taramakau
proxy_type:None
measurement:delta O18
dating_convention:absolute
calendar:gregorian
chronology:historic
coords:(171.48666700000001, -42.899444000000003)
aspect:None
elevation:None
season:DJF
dataset:ncep
variable:Tmean
calc_anoms:True
detrend:True
value:-0.69
climatology:(1981, 2010)
period:(1979, 2014)
extracted_coords:[172.5, -42.5]
distance_point:93.90851968394558
trend_params:{'intercept': 41.873055256737615, 'slope': -0.020944575657920243}
category:WB
analog_years:[1983, 1984, 1993, 2003, 2004, 2005, 2007]
weights:[0.13576326608759764, 0.15601220832804316, 0.12698122235554851, 0.132210597148784, 0.16374443432863364, 0.14582850044740894, 0.13945977130398413]
}
In [ ]:
Content source: nicolasfauchereau/paleopy
Similar notebooks: