跳转到内容

File:SOI.svg

页面内容不支持其他语言。
这个文件来自维基共享资源
维基百科,自由的百科全书

原始文件 (SVG文件,尺寸为1,248 × 384像素,文件大小:138 KB)


摘要

Python code

from urllib.request import urlretrieve
if input('Refresh local copy of SOI data from ftp.bom.gov.au/..?\n'
         'Empty input for NO, anything else for YES '
        ) > '':
    print('Loading...')
    urlretrieve('ftp://ftp.bom.gov.au/anon/home/ncc/www/sco/soi/soiplaintext.html',
                'soiplaintext.html')
data = []
with open('soiplaintext.html', 'r') as f:
    for line in f: # until table header (the line after '"`UNIQ--pre-00000001-QINU`"'
data = [float(_) for _ in data]
import numpy as np
x = 1876. + 1/24. + np.linspace(0., len(data)/12, len(data), endpoint=False)
n = 7
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
from matplotlib.ticker import MultipleLocator
plt.rcParams['svg.fonttype'] = 'none' # text as text, not curves
fig, ax = plt.subplots(1,1)
fig.set_size_inches(13, 4)
ax.fill_between(x[n2:-n2], av, 7., where= av > 7., facecolor='blue', interpolate=True)
ax.fill_between(x[n2:-n2], av,-7., where= av <-7., facecolor='red',  interpolate=True)
ax.plot(x[n2:-n2], av, 'k-', linewidth=0.4)
ax.plot(x, data, 'ko', markerfacecolor='#00000040', markeredgecolor='#00000000', markersize=3)
ax.set_xlim(x[0]-2., x[-1]+2.)
ax.set_ylim(-43., 40.)
ax.xaxis.set_major_locator(MultipleLocator(10.))
fig.tight_layout()
fig.text(.91,.88, 'La-Niña', color='blue', fontname='Verdana', fontsize=15)
fig.text(.91,.12, 'El-Niño', color='red',  fontname='Verdana', fontsize=15)
fig.savefig('SOI.svg', format='svg')
fig.show()
from re import sub
svg = open('SOI.svg', 'r').read() # In the file ...
svg = sub(r'[0-9]+\.[0-9]+', lambda x: str(round(float(x.group()), 1)), svg) # round to .1f,
STYLE = ' style="fill-opacity: 0.3; stroke: #000000; stroke-opacity: 0"'
rest = svg.split(STYLE)                                                   # draw the style info
rest[0] = sub('z\n" style="', 'z\n" style="fill-opacity: 0.3; ', rest[0]) # into the g element,
symbol = rest[1].split('"')[1][1:]    # identify the symbol name for the marker
svg = sub(symbol, 'o', ''.join(rest)) # and shorten it to "o",
svg = sub(' *<use x', '<use x', svg) # and finally unindent the most frequent lines.
open('SOI.svg', 'w').write(svg)

描述
English: Southern Oscillation Index monthly data 1876-2024, black line: smoothed with a 7-months cosine kernel, events colored with a threshold at |SOI| = 7 according to the Bureau of Meteorology description page. The red events are generally associated with El Niño and the blue events with La Niña.
Data Source:ftp://ftp.bom.gov.au/anon/home/ncc/www/sco/soi/soiplaintext.html
Description:http://www.bom.gov.au/climate/glossary/soi.shtml
日期
来源 自己的作品
作者 Rainald62
其他版本 File:Soi.svg outdated, disallowed to overwrite.

许可协议

我,本作品著作权人,特此采用以下许可协议发表本作品:
w:zh:知识共享
署名 相同方式共享
本文件采用知识共享署名-相同方式共享 4.0 国际许可协议授权。
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。
  • 相同方式共享 – 如果您再混合、转换或者基于本作品进行创作,您必须以与原先许可协议相同或相兼容的许可协议分发您贡献的作品。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描绘内容

image/svg+xml

文件来源 简体中文(已转写)

上传者的原创作品 简体中文(已转写)

数据大小 简体中文(已转写)

141,130 字节

384 像素

1,248 像素

校验和 简体中文(已转写)

1b8fb7394ceaaa727dc8ee132ecd36296b4ea755

断定方法:​SHA-1 简体中文(已转写)

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2025年2月1日 (六) 16:572025年2月1日 (六) 16:57版本的缩略图1,248 × 384​(138 KB)Rainald62Update
2024年9月2日 (一) 21:192024年9月2日 (一) 21:19版本的缩略图1,248 × 384​(138 KB)Rainald62Update (latest el nino is definitely over), no hyphen
2024年5月9日 (四) 20:242024年5月9日 (四) 20:24版本的缩略图1,248 × 384​(138 KB)Rainald62Update and shorter smoothing kernel (7 yr instead of 25 yr) to show the latest El-Niño.
2024年3月31日 (日) 05:342024年3月31日 (日) 05:34版本的缩略图1,170 × 360​(118 KB)AspereFile uploaded using svgtranslate tool (https://svgtranslate.toolforge.org/). Added translation for ko.
2023年11月7日 (二) 19:432023年11月7日 (二) 19:43版本的缩略图1,170 × 360​(119 KB)Rainald62{{Information |Description={{en|1=Southern Oscillation Index monthly data 1876-Oct2023, black line: smoothed with a 25-months cosine kernel, events colored with a threshold at |SOI| = 7 according to the bom description page.<br>Data Source:ftp://ftp.bom.gov.au/anon/home/ncc/www/sco/soi/soiplaintext.html<br>Description:http://www.bom.gov.au/climate/glossary/soi.shtml}} |Source={{own}} |Date=2023-11-07 |Author=Rainald62 |Permission= |other_v...

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件:

元数据