Skip to content

Commit e8c1f39

Browse files
authored
Merge pull request #663 from LinkedEarth/soi_fix
Better SOI series
2 parents 69431fd + 407d699 commit e8c1f39

File tree

7 files changed

+2028
-887
lines changed

7 files changed

+2028
-887
lines changed

pyleoclim/core/series.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2431,7 +2431,8 @@ def annualize(self, months=list(range(1, 13)), min_res=0.25, frac_req_months=2/3
24312431
24322432
Examples
24332433
--------
2434-
1) Annual average
2434+
1) Calendar average
2435+
24352436
.. jupyter-execute::
24362437
24372438
soi = pyleo.utils.load_dataset('SOI')
@@ -2444,32 +2445,35 @@ def annualize(self, months=list(range(1, 13)), min_res=0.25, frac_req_months=2/3
24442445
fig, ax = soi.plot(title='Jan-Dec averaging')
24452446
soi_a.plot(marker='o',ax=ax)
24462447
2447-
2) JJA average : straightforward
2448+
2) JJA average (straightforward)
2449+
24482450
.. jupyter-execute::
24492451
24502452
soi_jja = soi.annualize(months=[6, 7 , 8])
24512453
fig, ax = soi.plot(title='JJA averaging')
24522454
soi_jja.plot(marker='o',ax=ax, label='JJA average')
24532455
24542456
3) DJF average : straddles a year; handles it gracefully
2457+
24552458
.. jupyter-execute::
24562459
24572460
soi_djf = soi.annualize(months=[12, 1 , 2])
24582461
fig, ax = soi.plot(title='DJF averaging')
24592462
soi_djf.plot(marker='o',ax=ax, label='DJF average')
24602463
24612464
4) Varying the fraction of required months
2465+
24622466
.. jupyter-execute::
24632467
24642468
AprMar = [4,5,6,7,8,9,10,11,12,1,2,3]
24652469
soi_am_default = soi.annualize(months=AprMar)
2466-
soi_am_stringent = soi.annualize(months=AprMar,frac_req_months=0.9)
2470+
soi_am_stringent = soi.annualize(months=AprMar,frac_req_months=1.0)
24672471
2468-
fig, ax = soi.plot(title='Apr-Mar averaging')
2472+
fig, ax = soi.plot(title='Apr-Mar averaging', xlim = [2000, 2026])
24692473
soi_am_default.plot(marker='o',ax=ax, label='Apr-Mar, $f=2/3$')
2470-
soi_am_stringent.plot(marker='o',ax=ax, label='Apr-Mar, $f=0.9$')
2474+
soi_am_stringent.plot(marker='o',ax=ax, label='Apr-Mar, $f=1.0$')
24712475
2472-
We see that insisting on a very high fraction of available months will result in dropped years
2476+
The last year is incomplete, so insisting on complete coverage results in dropping it
24732477
24742478
Notes
24752479
-----
@@ -3458,11 +3462,11 @@ def wavelet(self, method='cwt', settings=None, freq=None, freq_kwargs=None, verb
34583462
Examples
34593463
--------
34603464
3461-
Wavelet analysis on the evenly-spaced SOI record. The CWT method will be applied by default.
3465+
Wavelet analysis on the evenly-spaced NINO3 record. The CWT method will be applied by default.
34623466
34633467
.. jupyter-execute::
34643468
3465-
ts = pyleo.utils.load_dataset('SOI')
3469+
ts = pyleo.utils.load_dataset('NINO3')
34663470
scal1 = ts.wavelet()
34673471
scal_signif = scal1.signif_test(number=20) # for research-grade work, use number=200 or larger
34683472
fig, ax = scal_signif.plot()

pyleoclim/data/metadata.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
SOI:
2-
filename: 'soi_data'
2+
filename: 'soi.long'
33
file_extension: 'csv'
44
pandas_kwargs:
55
skiprows: 0
6-
header: 1
6+
header: 0
7+
parse_dates: [0]
8+
index_col: 0
9+
skipfooter: 1
710
pyleo_kwargs:
811
time_name: 'time'
912
time_unit: 'year C.E.'
1013
value_name: 'SOI'
1114
value_unit: 'mb'
1215
label: 'Southern Oscillation Index'
1316
archiveType: 'Instrumental'
14-
time_column: 1
15-
value_column: 2
17+
time_column: 0
18+
value_column: ' SOI from CRU missing value -99.99 https://psl.noaa.gov/data/timeseries/month/'
1619

1720
NINO3:
1821
filename: 'wtc_test_data_nino_even'

0 commit comments

Comments
 (0)