In [1]:
%matplotlib inline
from matplotlib import pyplot as plt
import pandas as pd
In [2]:
import sys
sys.path.insert(0, '../')
In [3]:
from paleopy import proxy
from paleopy import analogs
from paleopy import ensemble
In [4]:
djsons = '../jsons/'
pjsons = '../jsons/proxies'
In [5]:
p = proxy(sitename='Rarotonga', \
lon = -159.82, \
lat = -21.23, \
djsons = djsons, \
pjsons = pjsons, \
pfname = 'Rarotonga.json', \
dataset = 'ersst', \
variable ='sst', \
measurement ='delta O18', \
dating_convention = 'absolute', \
calendar = 'gregorian',\
chronology = 'historic', \
season = 'DJF', \
value = 0.6, \
calc_anoms = True, \
detrend = True)
In [6]:
p.find_analogs()
In [7]:
p.proxy_repr(pprint=True)
In [8]:
from paleopy import WR
In [9]:
w = WR(p, classification='New Zealand')
In [10]:
f = w.plot_bar(sig=1)
In [11]:
f.savefig('/Users/nicolasf/Desktop/proxy.png')
In [12]:
w = WR(p, classification='SW Pacific')
In [13]:
f = w.plot_bar(sig=1)
this is consistent with the known relationships between the SW Pacific regimes and the large-scale SST anomalies:
i.e. the SW#4 is strongly positively correlated to a La Niña
pattern in the ERSST / SST (see e.g. the proxy.ipynb
notebook), and here we show that warm anomalies in Rarotonga are related to increased probability of the SW Pacific regime #4. On the other hand, SW#1 and SW#3 see their probability reduced, consistent with their positive correlation with El Niño
patterns.
In [14]:
w.df_probs
Out[14]:
In [15]:
ens = ensemble(djsons=djsons, pjsons=pjsons, season='DJF')
In [16]:
classification = 'SW Pacific'
In [17]:
w = WR(ens, classification=classification)
In [18]:
w.parent.description
Out[18]:
In [19]:
w.climatology
Out[19]:
In [20]:
w.probs_anomalies(kind='many')
In [21]:
w.df_anoms
Out[21]:
In [22]:
f = w.plot_heatmap()
In [23]:
f = w.plot_bar()
In [24]:
w.df_anoms.to_csv('/Users/nicolasf/Desktop/table.csv')
In [25]:
w.df_probs_MC
Out[25]:
In [ ]: