File:PDO.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file(SVG file, nominally 450 × 270 pixels, file size: 260 KB)

Summary

Description
English: Dots, monthly values for the Pacific decadal oscillation index, 1900 – sep2019

line, smoothed index using a 121-months cosine half-wave as windowing function.

Data source:http://jisao.washington.edu/pdo/PDO.latest
Source Own work
 
This W3C-unspecified plot was created with Matplotlib.
Author Rainald62
Other versions

Python code

from urllib.request import urlretrieve
url = 'http://research.jisao.washington.edu/pdo/'
file = 'PDO.latest' # Monthly PDO from 1900.
if input(f'''Refresh local copy from {url}?
non-empty input for YES '''): urlretrieve(url+file, file)
data = []
with open(file, 'r') as f:
    for line in f:
        if line.startswith('YEAR'): break
    f.readline()
    for line in f:
        if line == '\n': break
        data += line.split()[1:]
data = [float(_) for _ in data]
import numpy as np
x = 1900. + 1/24. + np.linspace(0., len(data)/12, len(data), endpoint=False)
n = 121
n2 = n//2
kernel = np.sin(np.pi*np.linspace(1/(n+1), 1., n, endpoint=False))
kernel /= np.sum(kernel)
av = np.convolve(data, kernel, mode='valid')
import matplotlib.pyplot as plt
plt.rcParams['svg.fonttype'] = 'none' # text as text, not curves
fig, ax = plt.subplots(figsize=(5,3))
ax.fill_between(x[n2:-n2], av, 0., where= av > 0., facecolor='red',  interpolate=True)
ax.fill_between(x[n2:-n2], av, 0., where= av < 0., facecolor='blue', interpolate=True)
ax.plot(x[n2:-n2], av, 'k-', linewidth=0.4)
ax.plot(x, data, 'ko', markerfacecolor='#00000060', markeredgecolor='#00000000', markersize=2)
ax.set_xlim(x[0]-2., x[-1]+2.)
fig.text(.52,.88, 'PDO Index', horizontalalignment='center', fontname='Verdana', fontsize=14)
fig.tight_layout()
fig.savefig('PDO.svg', format='svg')
fig.show()

Licensing

I, the copyright holder of this work, hereby publish it under the following licenses:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported 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.
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
You may select the license of your choice.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

image/svg+xml

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current00:35, 5 January 2020Thumbnail for version as of 00:35, 5 January 2020450 × 270 (260 KB)Rainald62flipped colors, darker dots
23:37, 4 January 2020Thumbnail for version as of 23:37, 4 January 2020450 × 270 (258 KB)Rainald62Another 66 months. Colored the smoothed index instead of monthly values to avoid visual overweight of the latter.
07:09, 18 April 2014Thumbnail for version as of 07:09, 18 April 20141,000 × 650 (440 KB)Giorgiogp2update to mar 2014
19:29, 1 April 2013Thumbnail for version as of 19:29, 1 April 20131,000 × 650 (364 KB)Giorgiogp2fix colors
18:46, 1 April 2013Thumbnail for version as of 18:46, 1 April 20131,000 × 650 (364 KB)Giorgiogp2update to feb 2013
18:26, 17 February 2012Thumbnail for version as of 18:26, 17 February 20121,000 × 700 (360 KB)Giorgiogp2update to 2012-01
08:32, 14 February 2011Thumbnail for version as of 08:32, 14 February 2011900 × 650 (483 KB)Giorgiogp2{{Information |Description ={{en|1=Monthly values for the Pacific decadal oscillation index, 1900 – 2010 Black line:121-month smooth Data source:http://jisao.washington.edu/pdo/PDO.latest}} |Source ={{own}} |Author =[[User:Giorgiogp2
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Global file usage

The following other wikis use this file:

Metadata