[ 岡山大学 | 理学部 | 地球科学科 | 地球および惑星大気科学研究室 ]

大気科学演習1

gnuplot

練習問題1ー1

岡山の年平均気温の変化を見る

/home/atmos/ipesc/sample/amedas/Tave.dat
/home/atmos/ipesc/sample/amedas/Tmax.dat
/home/atmos/ipesc/sample/amedas/Tmin.dat

ヒント

味わい方

1891.01.01 - 1896.05.31 岡山城旧城郭内
1896.06.01 - 1949.04.15 岡山市内山下58番地
1949.04.16 - 1982.09.30 岡山市津島桑の木町1-16
1982.10.01 - 2015.03.04 岡山市桑田町1-36
2015.03.05 -            岡山市北区津島中2丁目

温暖化


#練習問題1ー2

Skymonitor の稼働率を見る

/home/atmos/ipesc/sample/gnuplot/year.dat
/home/atmos/ipesc/sample/gnuplot/month.dat
/home/atmos/ipesc/sample/gnuplot/hour.dat

ヒント

味わい方


#練習問題1ー3

文字の出現頻度を比べる

/home/atmos/ipesc/sample/text/char01.dat
/home/atmos/ipesc/sample/text/char02.dat
/home/atmos/ipesc/sample/text/char03.dat
/home/atmos/ipesc/sample/text/char04.dat
/home/atmos/ipesc/sample/text/char05.dat
/home/atmos/ipesc/sample/text/char06.dat

ヒント

規格化

$ awk '{print $2}' datafile | xargs | tr ' ' '+' | bc

テキスト推定

/home/atmos/ipesc/sample/text/Close_to_you.txt
/home/atmos/ipesc/sample/text/Hotel_Mauna_Kea.txt
/home/atmos/ipesc/sample/text/Lorem_ipsum.txt
/home/atmos/ipesc/sample/text/My_favorite_things.txt
/home/atmos/ipesc/sample/text/Potential_Vorticity.txt
/home/atmos/ipesc/sample/text/Pangram.txt


練習問題1ー4

Lorenzアトラクタを描いてみる

ヒント

Lorenz方程式

Edward N. Lorenzが大気の流れを表す方程式を簡略化して導いた連立方程式. \begin{eqnarray} \frac{dx}{dt} & = & P ( y - x ) \\ \frac{dy}{dt} & = & - y - x z + R x \\ \frac{dz}{dt} & = & x y - b z \end{eqnarray} 決定論的な常微分方程式であるが,カオス的な振る舞いをする.

味わい方

3次元プロット

gnuplot> splot '/home/atmos/ipesc/sample/chaos/lorenz.dat' using 2:3:4 with lines

とすると,xyz を3次元でプロットする.

図の上にカーソルを持っていって,クリックしたままカーソルを動かすと,視点を変えることができる.


練習問題1ー5

CO2濃度

/home/atmos/ipesc/sample/co2/insitu.txt

ヒント

gnuplot> plot '/home/atmos/ipesc/sample/co2/insitu.txt' using 8:9 with lines
gnuplot> set datafile missing '-999.99'
gnuplot> plot '/home/atmos/ipesc/sample/co2/insitu.txt' using 8:9 with lines

図を見る


#練習問題1ー6

円周率に出てくる数字の出現頻度を見る. 図を見る

ヒント

/home/atmos/ipesc/sample/number/pi.dat

味わい方1

#練習問題1ー6a

出現確率が 0.1 であった場合の出現頻度の95%信頼区間を重ね描きする. 図を見る

ヒント

\[ \left[ n p - 1.96 \sqrt{ n p \left( 1 - p \right) } , n p + 1.96 \sqrt{ n p \left( 1 - p \right) } \right] \]

gnuplot> plot 2

味わい方2

\[ \left[ n p - 1.96 \sqrt{ n p \left( 1 - p \right) } , n p + 1.96 \sqrt{ n p \left( 1 - p \right) } \right] \]

正規分布

\begin{eqnarray} 1.64 \sigma & \ \ & 90\% \\ 1.96 \sigma & \ \ & 95\% \\ 2.58 \sigma & \ \ & 99\% \\ 3.29 \sigma & \ \ & 99.9\% \end{eqnarray}

練習問題1ー6b

各数字の出現確率を見る.

ヒント

using 1:($2/100000.0)

#練習問題1−6c

各数字の出現確率を区間推定し,出現確率と95%信頼区間を表示する. 図を見る

ヒント

\[ \left[ p - 1.96 \sqrt{ \frac{ p ( 1 - p ) }{ n } } , \ p + 1.96 \sqrt{ \frac{ p ( 1 - p ) }{ n } } \right] \]

using 1:2:3 with errorbars
using 1:($2/100000.0):(1.96*(($2/100000.0)*(1.0-$2/100000.0)/100000.0)**(0.5)) with errorbars
n=100000.0
using 1:($2/n):(1.96*(($2/n)*(1.0-$2/n)/n)**(0.5)) with errorbars

味わい方3


練習問題1ー7

岡山で観測された日平均気温を1年分,図にしてみる 図を見る

アメダスのデータ(2018年)

/home/atmos/ipesc/sample/amedas/Okayama_Okayama_2018.csv

データは4列からなり,1列目から順番に,日付,日平均気温,日最高気温,日最低気温

ヒント

gnuplot> set datafile separator ','
gnuplot> plot 'Okayama_Okayama_2018.csv' using ($0+1):2

味わい方

#練習問題1−7a

岡山で観測された気温の日較差を1年分,図にしてみる 図を見る

ヒント

gnuplot> plot 'Okayama_Okayama_2018.csv' using 0:($3-$4)

味わい方

味わい方2

gnuplot> f(x)=(floor(x/a)+0.5)*a
gnuplot> a=15
gnuplot> plot 'Okayama_Okayama_2018.csv' u 0:($3-$4), '' using (f($0)):($3-$4) smooth unique
gnuplot> a=5
gnuplot> plot 'Okayama_Okayama_2018.csv' u 0:($3-$4), '' u (f($0)):($3-$4) smooth unique




Last Updated: 2022/11/02, Since: 2019/11/07.
This page is generated by Makefile.rd2html.