2013年12月30日月曜日

Coupling the two BGC models in FABM

During initialize routine, you can call a variable (state or diagnostic) of other BGC model as follows:

      call self%register_dependency(self%id_temp,'uvic_eco_fph1zo1')

for the case of the variable "fph1zo1" which is a diagnostic variable in "uvic_eco" model.

2013年12月29日日曜日

ビクトリア観光・2

Miniature world: 大人から子供までみんな楽しめるであろうミニチュアミュージアム
料金: $10(学割)
所要時間: 1~2時間

ミニチュアの世界は誰もが楽しめるのではないかと思いますし入場料も$10ぐらいと他の施設と比べると高くないし一時間ほどあれば全部回れたのでインナーハーバーやダウンタウン付近を観光するときのオススメスポット。立地もFairmont Empressの裏側の通りになので立ち寄りやすいかと。ちなみにネット購入すれば$1安く入れます。

館内はいろいろな歴史や童話などがミニチュアで再現されています。例えば:カナダの各都市、ヨーロッパの有名な城、先住民、戦争、ジャックと豆の木、クリスマス、サーカス、Sci-Fi、…などなど。

注文をつけるとすればお土産屋がなかったので何かミニチュアなものが買えればいいのになと思った。ポストカードだけは売ってあった(ただし館内での写真撮影は自由なのでポストカードは売れてないんじゃないかと思う…)。
入り口はホテルみたい

英国とどこかの戦争だと思う

先住民に白人が銃の使い方を教えている場面だと思う

ロマンチックなハリウッドのワンシーン
Senzushi: 「お・も・て・な・し」するときにオススメする和食レストラン
料金:晩ご飯の場合一人当たり~$20

「お・も・て・な・し」するときとはどういうことかというと、誕生日や他のお祝い事などの目的で外食したり外国人の友達を連れて来る場所としていいチョイスだと思います。

なぜかというと:店員さんがほとんど日本人(日本語対応OK)、店内の雰囲気が良い(ライトや装飾)、メニューが豊富(日本語表記あり)。

今回は二回目の来店(ディーナー時)だったが両方とも店内に入ると空席待ちの列ができていたので予約は必須(電話又はネット予約)。

個人的に好きなところは、イカゲソ唐揚げ、たこわさ、酢の物など前菜ものが旨くて提供時間が短いところ。あまりオススメできないところは寿司ネタが新鮮じゃなかった(海鮮ロール)こととスパイシーソースが塩辛かった(スパイシーツナ)ところ。つまり個人的には寿司系以外のものをオススメ。

うなぎ押し寿司、カニ天ぷら、イカ下足唐揚げ、寿司
たこわさ!これを食べられるとは嬉しかった。
入り口

2013年12月25日水曜日

ビクトリア観光

冬休み期間中に一週間友達が来ていたのでバスで行ける範囲でいろいろと観光地を回った。

Royal British Columbia Museum: 自然科学や歴史に興味がある人はぜひお立寄りを☆

場所:インナーハーバーすぐそば
入場料:~$10(学生)
所用時間:3~4時間

二階の展示コーナーで「Wildlife photographer of the year 2013」が行われており入賞者の写真が飾られていた。どのカメラを使ったかも書いてあったのでそこに注目した結果、一枚の写真を除くと展示されていた写真は全てNikon又はCanonで撮影されているということがわかった。唯一nikon/canon以外で撮られた写真はオリンパスのボディにパナソニックのレンズという組み合わせだった。そしてCanonのうち2枚だけPower shot(一眼レフじゃないタイプ)で撮られていた。それで入賞ってすごいな。残りは恐らく全て一眼レフだと思う。日本からの入賞者は一人でトラをロシアで撮影。さらに入賞した作品のなかで日本で撮影された作品は二点あって北海道と地獄谷。いや、調べてみたら地獄谷って北海道にあるんだね。ってことは両方とも北海道で撮影された写真。

自分が気に入った写真はエジプトで撮影されたDugongの写真。最初は何だこれと思っとったけどカタカナに直すとジュゴン…ってあのポケモンのジュゴンかw計三枚展示されていて:
  • 一枚目は魚と共存(共泳)している写真でここで見れる(最初の写真)。
  • 二枚目はここで見れる(最初に紹介されている写真)。
  • 三枚目はseagrassを食べている写真。ここで見れる。これまた面白い写真。

この三枚の写真を見てからジュゴンが好きになり興味がわいてきた。

ちなみにコンテストの優勝者の写真はここで見れる(一枚目が優勝作品、二枚目が17歳以下のカメラマンによってとられた最優秀作品でこの写真を撮影したのは14歳)。

残りのコーナーはおそらく常時展示されているもので個人的にタイトルをつけるとすれば二階は「地球科学」で3階は「BC州の先住民&最近100年の歴史」。

iMAXもあったが追加~$10ぐらいするみたいだったので行かなかった。

説明は電子表示のもの以外は全て英語でわかりやすく説明されているので英語が読める人は読みいってしまうのでは…っということで4時間あれば充分楽しめるかと。
先住民が作った彫刻
The Butchart Gardens: いつの時期行っても楽しめるはず。

場所:ビクトリア郊外(州営バスは75番で行ける)
入場料:季節により異なる($17~30)。学割なし。
所要時間:これも恐らく季節により異なるかと…3〜4時間

年中営業ということなんですがクリスマスシーズンはイルミネーションを売りにしているようで自分たちが行った時(12月23日・日没後)は入場する車で渋滞していて30分待ちという表示を見かけた(自分たちはバスで行ったので最寄りのバス停から歩いて向かったので渋滞とは無縁)。かなり人気スポットのよう。

2回以上行けば年間パスのほうがお得なようだったので年間パスを$55で購入。購入日から一年間有効で他にもいくつか特典付き(レストラン&ギフトショップで一割引。パスを持ってない付添人の入場料一割引。等)。

アイススケート、メリーゴーランドなど子供連れも楽しめる。学生も友達やカップルで来ている人も結構いた。メリーゴーランドは一回$2。最後に乗ったのはいつかわからないくらいに久しぶりで楽しめた。
ブッチャートガーデンのクリスマスイルミネーション
The University of Victoria: 時間がある人は行ってみてもいいかも?

場所:ビクトリア近郊(バスがいくつかある。ダウンタウンからは4番で行ける)
入場料:無料
所要時間:2時間

森の中に大学が建てられたように思えるくらい自然と調和している美しい大学。観光としても楽しめそうな場所は:
  • Finnerty Gardens :大学の西南に位置する庭園。30分ぐらいで回れるかと。
  • 図書館:多くの学部生が宿題などに励む場所なのでそういった雰囲気を楽しめるのでは。一階には展示コーナーあり。
  • Bookstore:大学グッズが売ってある書店。その他雑貨や文具もある。
補足:案内した友達は大学内の建物がそれぞれ似通ってなくて楽しめたと言っていたので建物に興味がある人は各学部の建物内を歩き回ってもいいかも。
ビクトリア大学の看板

Seaweed & egg soup

Ingredients:
  • Chicken flavoured bouillon
  • Garlic
  • Ginger
  • Green onion
  • Dried seaweed

Procedures:
  1. In a pan, put some water and chicken flavoured bouillon. This will be the base of the soup.
  2. Grate the garlic and ginger (1 clove each) and add into the soup.
  3. Bring the soup to boil. If desired, adjust the taste by adding more water or chicken flavoured bouillon.
  4. Turn off the stove once the soup starts boiling.
  5. Beat the egg and add into the soup. But do NOT mix. Let it diffuse on its own.
  6. The soup is ready. Pour the soup into a bowl.
  7. Chop the green onion and add into the soup. Add the dried seaweed into the soup as well.
THAT'S IT! ENJOY!
Broth cube
A picture of dried seaweed (Cut wakame)

2013年12月21日土曜日

木曜日にわかったこと

現在ecosystem modelのコード作成&テスト中。

とりあえずこの前わかったことは、light limitation用の式で扱われる変数baiは86400で割る必要はないということ。割った場合以下の赤線のようになってしまうので意味がなくなる。

デフォルトの設定だと栄養塩がマイナス値になってしまってシミュレーションは8月の終わりで止まってしまう。植物プランクトンの食するレートが高すぎるのか又は栄養塩が充分にリサイクルされてないのか。まだまだ落ち着くまでには時間がかかりそうだ。

2013年12月20日金曜日

木曜日の日記

家に帰る前、GSSオフィスによってcar share co-op programのメンバーシップを支払ってきた。料金は50ドル。

サービスはレンタカーと同じだがレンタカー会社より安く借りれる。今現在の料金システムは:

  • 一回のレンタル料5ドル
  • 使用料25セント(毎キロメートル)
基本的な費用はこれだけ。別途消費税がかかるが保険料とガソリン代は含まれていると記載されているので払わなくていいっぽい。

以上、詳しくは英語で☞Car Co-op UVic GSS又はVictoria Car Share Co-opをご覧あれ。



2013年12月17日火曜日

2013年12月11日水曜日

次日本へ帰ったら…

長崎と福岡へ次は夏に帰りたいが再来年になるかな〜。そのときにやりたいこと行きたいとこ食べたいものを忘れないようにメモ。

行きたいところ

  • ユニクロ
  • 夏祭り
  • ヤフードーム:野球観戦
  • 水族館

食べたいもの

  • 戸隠:そば
  • かわよし:うどん
  • 回転寿司
  • うなぎ(北御門か魚荘)
  • 牡蠣

やりたいこと

  • 免許証の更新
  • 花火

2013年12月8日日曜日

Q&A about my experience with Islam

My friend sent me an email with a list of questions about my experience with Islam last summer, and I forgot and also did not have time to answer them for a long time, but alhamdulillah I did last week. So I thought of sharing it here so that someone might be able to benefit from it inshallah.

Q1. Introduce yourself (country, parents , wife etc).
I am originally from Japan, and live in Canada now with my wife. My parents live in Japan, both Japanese.

Q2. Say about study
I am a Ph.D. student in the Department of Earth and Ocean Sciences. My research work is mainly related to climate change. 

Q3. When did you tern to Islam?
I have given my shahadah in August 2009. 

Q4. How did you guided to Islam, by whom?
My initial encounter to Islam was in September 2007. I happened to be in the same class with my wife (she is a born-Muslim). We became friends and at times she explained to me about Islamic teachings and practices.

Q5. How did you inspire?
I first admired the practical aspects of Islam, such as praying five times a day, fasting continuously during the month of ramadan, preventing from drinking alcohol, etc.

Q6. Which book of Islam did you read first time?
I cannot remember which was the first book I read to learn about Islam, but I find the book called “A brief illustrated guide to understanding Islam” really helpful (the web link is: http://www.islam-guide.com/).

Q7. Now how do you enjoy Islamic life?
It feels great!

Q8. How do you enjoy halal food now?
I enjoy it very much. It is always good to know what I am eating (e.g. how the animals were slaughtered).

Q9. How do you face problem when you turn into Islam?
I had not faced any problem with turning into Islam. My parents are open-minded, and they are happy with whatever decisions I make in life.

Q10 Say some thing about your future plan for Islam?
Currently I am studying the Arabic grammar, so hopefully (Insha Allah) I will be able to understand each word in the Qu’ran as I recite.

Q11. Say some things you feel free to inspire people.
I believe that people tend to stay away from any religion nowadays. Perhaps “being religious” sounds scary? If you think that way, consider Islam as "a way of life", as it is in fact a way of life (Read the first few lines on Page 7 of Drs. Mahmoud and Yaser Haddara’s article, "Introduction to Islam": http://www.manal.ca/sites/default/files/IntroductionToIslam.pdf). For me, it is a successful way of life: I feel healthy both physically and spiritually and always find myself at ease by implementing Islam in everyday life.

外寒っ!!

昨日は一年生の試験のために朝から体育館へ。体育館はオリエンテーション以来。あまりきれいではなかったな。

試験が始まるちょっと前に来て問題用紙と答案マークシートと公式シートを三百近くある机の上に並べていく。

それが終わると生徒たちがぞろぞろ入ってくる…













試験監視中思ったんだが筆箱って禁止したほうがいい。中を調べることってしないし怪しいと思える根拠がなければなかなかできない。だから例えば何か書いた紙を入れといて監視されてないときに見ることが簡単にできてしまう、と思う。特に今回のような300人近くに対し5人で試験を監督している場合。

なぜこんなことを思ったかというと試験中に実際ある生徒が筆箱の蓋(ジッパーが三カ所についている)の一部を開けながら問題を解いていたのをみたから。はっきりした証拠もないので筆箱を調べることもしなかったが、もしもの場合を考えて、試験時間も残り少なくなって生徒もほとんどいなくなったから残りの時間はその生徒の近くの空いた机の上に座って試験を監視することにした。

次の学期も同じ科目のTAをするのでテストのときは筆箱やその他不要そうなものは全て机の上に置かないようにさせようと思う。



話は変わって試験後、Uptownへ。

お腹がすいていたのでNoodle Boxという店へ行ってみた。前に通りかかったときラーメンのようなものをすすっている客を見たのでもしや日本のラーメンがあるんじゃと思ったが東南アジア系のライスヌードルだったようだ。

まぁどちらにしてもラーメンみたいなスープまでうまい麺類を食べたかったのでメニューのSoup & Noodle欄の一番始めに書いてあった「トムヤムクンスープというのを頼んでみた。


←もやしや薬味がたくさん入っていてエビベースのスープが美味しかった。妻が食べると「トムヤムクンというよりラクサだね」っと言っていたが本当にそうだと思った。

でも美味しかったしベジタリアン(スープはエビを使っている)なのでまた食べに行きたいと思った。soup&noodleの部類では他にタイのグリーンカレーやペナンのレッドカレーがあった。マレーシアのナシゴレンやベトナム料理なんかもあった。

ビクトリアはレストランがたくさんあって毎回新しいところへ行けるから外食好きな僕らには最高☆

来週は「ウチダ食堂」へ行ってみる予定♪

2013年12月5日木曜日

今冬初雪!

朝、外に出てみると雪が。。

小粒ながら日中コンスタントに降り続け午後四時頃帰宅した時にはこれぐらいアパートの木々や植物に積もりました。


風が吹いていなかったからそんなに寒くはなかった。

しかし夕食後、突然停電…三十分程…

暗闇の中、iPadがあったので洞窟章を朗読(木曜日の日没後☆)。

天気予報によると明日は体感温度で−15℃まで下がるらしい。原因は北極風が南下していてブリティッシュコロンビア州を覆っているらしくこれから一週間ぐらいは寒くなるそう( ´ ▽ ` )ノ


冬到来だな。


2013年12月3日火曜日

眼科は2割、歯科は3割、処方薬は3割。

先日ブログで「視力検査は$75、メガネは$200まで保険が効くから自己負担額は$38ですんでハッピ〜♪」みたいなこと書いたが、昨日保険会社からの返済があり、自分が勘違いしていたことがあったようで…

以下保険会社からの明細:











これによると保険からは視力検査代、メガネ代それぞれ8割しか負担されていない。

ブックレットを見直してみると7ページに負担率(Reimbursement)が記載されていた:









処方薬は7割、真ん中の不明なやつは全額、そしてどうやら最後の「Other(その他)8割」に今回の出費は属するらしい。

つまり$62.60で視力検査&メガネを購入したことになる。

思ったより高い出費になってしまったがいい勉強になったと思ってポジティブに受け止めよう。メガネもいいのを買えたしね☆


ちなみに歯医者も年間$750まで保険が効くが保険会社から全額負担されるわけではなく自己負担は3割なので注意が必要。

2013年12月2日月曜日

generate meteo.dat for Station Papa

To calculate air-sea flux, you need wind speed, which means you need meteo.dat file in the GOTM system.





sed: how to retain the same block of text after replacement.





PMEL data memo

If no data is available:
  • -9.999 for ocean temperature and salinity data
  • -99.9 for surface fluxes data

2013年11月23日土曜日

Eye Exam・視力検査

大学で加入している医療保険を利用して視力検査をしてメガネを新しく購入した。カレンダーイヤー単位で保険の利用限度は設定されていてEye examは$75、メガネ・コンタクトレンズなどは$200まで毎二年、保険からカバーされることになっている。詳しくはこのブックレット23ページに記述されている。なので今年中に上限を使い果たせばまた二年後に利用できるということ。高い保険料を納めている限りは使えるだけ利用しないとね。

ビクトリア内のショッピングモールにあるメガネ屋さんを回ったっ結果、視力検査はウォルマートが一番安いことがわかった。メガネもブランドとかこだわりないのでウォルマートで購入。

視力検査は85ドル。メガネは一式228㌦(レンズ64.50㌦×2、フレーム99㌦)。

これを保険からひくと自己負担は計$38。ちなみに保険金請求は後なので全額先に自己負担。

視力検査の結果は英語じゃわけわからないのでこちらのウェブサイトで確認した。

ウォルマートのメガネ屋さんの店員さんはとても親切にレンズの種類を説明してくれて保険料を差し引いた自己負担額を正確に教えてくれた。さらにフレーム選びもしてくれてすごく助かった。

2013年11月22日金曜日

Meteo file

meteo.dat is used to calculate surface fluxes in GOTM.

What's in the meteo.dat?

  1. date [yyyy-mm-dd
  2. Time [hh:mm:ss]
  3. zonal wind at 10 m above sea surface (m/s)
  4. meridional wind at 10 m above sea surface (m/s)
  5. Atmospheric pressure at 2 m above sea surface (hPa)
  6. Air temperature at 2 m above sea surface (Celsius)
  7. Relative humidity (%) OR wet bulb temperature (Celsius) OR dew point (Celsius) OR specific humidity (kg/kg)
  8. Cloud cover in 1/10

2013年11月21日木曜日

トロント出張

11月17〜19日の間、研究プロジェクト(NETCARE)の第一回ワークショップのためトロントへ行ってきました。

朝6時半発のフライト(トロントへの直行便はたぶんこの一便)のためシャトルバスでビクトリア空港へ。今回利用したのはYYJ Airport Shuttle。どうやら前の会社(Akal)からこの会社に変わったようです。空港まで片道$29…Akalでは$21で行けていたので残念。しかし聞いてみるとダウンタウン内のホテルからだと片道$24だそうです。15分遅れでSandman Hotel到着。
Sandmanホテルのほうが距離的には近いのに値段が高い。っということを突っ込んで聞いてみるとダウンタウン内ホテルのほうが主要だから〜というような返事が返ってきた。需要が高いから、またはスポンサーになってもらってるんだろうか。とにかく次回利用するとしたら市内バスでダウンタウン内のホテルまで行ってそこから乗ったがいいなと思った。

中部は耕されたプレーリーが広がります。
宿泊先のホテルのすぐそばに建っている教会
トロントピアソン空港到着後、安くダウンタウンへ行きたかったのでバスと地下鉄でホテルまで。行き順は:

  1. 空港一階のバス乗り場から194番のKipling行きのバスに乗車。大人料金$3(学生は$2と書いてあったが学割証みたいなのを提示するみたいなことが書いてあったので大人料金で)。
  2. 15分ぐらい乗車後Kipling駅で降りる(大多数の人がここで降りるのですぐにわかる)。降りたら地下鉄に乗るためエスカレーターで下る(これも大多数について行けばよい)。乗り換えのための切符などは必要ない。
  3. 自分はSpadina駅で降りた。所用約30分。

今回泊まったのは駅からすぐ近く(2ブロックぐらい)のHoliday Inn
Holiday Inn on Bloor Street。ワンベッドルーム。
部屋はきれいで満足。歯ブラシ・歯磨き粉・カミソリなどのは頼めばタダでもらえたらしい。知らずに一階にあるパソコンからの印刷が無料だったので帰りのチケットを印刷した。残念だったところはWifiが遅かったこと(動画ストリーミング)。
バスルームもきれい。

ハードロックカフェ

ダンダススクエアで待ち合わせする人々
ホテル到着後荷物を置いて街の中心地であるダンダススクエアへ。カナダ版タイムズスクエア。

クリスマスライト

ダンダススクエアの向かいにあるイートンセンターというショッピングモールの前にFREE INFO ISLAMという看板を発見→
立ち寄って見ると見覚えのある人が一人誰かと話をしている…
シャイフ・シェハリアだった。NAMFのイマームでセントジョーンズへ今年の1月か2月に来てレクチャーをしてくださった方。まさにイッツ・ア・スモール・ワールドという感じ。元気そうで何より。
いくつかのチームを作って毎日ストリート・ダァワ(路上布教活動)を行っているらしい。ビクトリアでも始めたいと思った。
イートンセンター前でダァワを行うトロント在住のムスリムの方達

Faculty Club
ワークショップはトロント大学で二日間あった。
二階に礼拝室がある建物。Faculty Clubのすぐそば。
町中を走るケーブルカー。

ネットケアミーティング

以下メモ:

Northern Scientific Training Program
カナダ国内の大学院生の北極圏での研究を資金援助。来年度(2014−2015)応募締め切りは12月。よくある質問のページを見てみると対象はカナダ国籍又は永住権を持った学生のみらしい…残念!

AEROCOM
CMIPの大気エアロゾルモデル版のようなもの。現段階では季節性を再現することも難しいらしい。参照:Shindel et al., 2008

Browse et al., 2012
  • seasonal cycle (processes diagram)
  • fixed the "inverse" seasonal cycle problem
Browse et al., 2013
  • complex response of Arctic CCN to sea-ice retreat
Residence time is inversely proportional to particle size of aerosols.
  • small --> live long
  • big --> live short
SSA (Sea Spray Aerosols)

O'Dowd, 2004 (Nature)
  • looked at sea-salt CCN
  • SSA
    • sea salt
    • organic carbon
      • alkaline
      • hydroxyl
      • ...
  • TOC
    • POC ~10% (P,Z,D,B)
    • DOC ~90%
DOCは海洋から生産されるエアロゾルとしては重要か?だとしたらDOCの大気海洋フラックスをモデルに含めたほうがいい。

Ice & mixed-phase clouds
  • Ice nuclei
    • mineral dust
    • BC
    • Biological particles
    • crystalline salts
    • organic glasses
    • particles in oceans
    • others
Levasseur and Gosselin
  • Under-ice Melosira mats 
  • Arctic MLD ~20 m: easy access of DMS for atmosphere.
  • Diatoms don't have DMSPp-lysis!
  • Two types of marine DMS production (Which type does Arctic ecosystem belong to?)
    • Bloom dominated regime (i.e. DMS is proportional to CHL)
    • Stress-forced regime
彼らが興味があるのは北極の海氷上にできるメルトポンド(表面が太陽光で温められて溶けてできた池)らしくDMS濃度が高いと予測。しかしここで疑問に思うのは栄養塩がどこからやってくるのか。海氷下で起こる藻の繁殖もDMSを大量生産すると考えられている。来年&再来年に航海が計画されている。

DGF (Dehydration Greenhouse Feedback)
GEM-MACH (Global Environment Multiscale-Modeling Air quality and Chemistry)

CanAM4.2
  • Prognostic aerosol microphysics (size distribution)
  • Sulphate, sea salt, mineral dust, hydrophobic and hydrophilic black and organic carbon
Steiner et al., 2012: Time-varying S:N ratio
Chang et al., 2011
  • Aerosol compositon and sources in the central Arctic
  • Organic carbon is significant.
Schmale 2013: Sub-Antarctic marine aerosol: dominant contributions from biogenic sources

Pico (0.2-2 um)
Nano (2-20)
Micro (>20)
Among these algae, nanoalgae seems to be the greatest DMS producer.
The impact of DMS on the climate system depends on the response of the microphysics above.

2013年11月15日金曜日

ブランドストーン

Blundstone(ブランドストーン)というブーツを妻に誕生日(二ヶ月ぐらい早いがw)プレゼントとして買ってもらった☆

タスマニアで生まれたブーツらしい。
 
靴ひもはないがすごくフィットして履き心地がいい。靴ひもが嫌いな自分にはちょうどいい♪
靴底のかかとにSPSというのはShock Protection Systemの略でショック吸収的な役割を果たしてくれるそう(詳しくはこちら)。工事現場で働く人用にこれよりも頑丈に作られたタイプもあるらしい。

ちなみに足のサイズはイギリス式で自分は6.5が合った。でも6.5って25cmやん。年を取るにつれてサイズが小さくなってきているような??高校の頃は26.5cm(カナダでサイズ9)を履きよったとけどな。

値段は高いけど毎日使うものだから質のいいが良いと思う。妻が聞いた話では10年持ちする場合もあるらしい。

さぁ自分のは何年持つかな〜☆

2013年11月14日木曜日

subroutine "do" cannot be renamed.

Since yesterday, I started adding parameters and equations in my code. The compilation was successful, but the output of the model simulation was not promising:

The output (z vs t of DMS) was a constant field with initial value. So the calculation was not done. It turns out that the issue arises from the subroutine where you deal with the RHS of the equation:

In my "dms.F90":  

 subroutine do(self,_ARGUMENTS_DO_)
   class (type_uvic_dms),intent(in) :: self
   _DECLARE_ARGUMENTS_DO_

   real(rk) :: dms

   _LOOP_BEGIN_

   _GET_(self%id_dms,dms)
   dms=dms+2
   _SET_ODE_(self%id_dms,self%q)

   _LOOP_END_

   end subroutine do

I used to name this subroutine "do_dms" as I thought it can be customizable. It seems, however, that it cannot be changed. If I changed to something else other than "do", the computation within the subroutine was not done. Not sure why. Anyway, I will just keep the subroutine name as "do" and not worry about it...

2013年11月13日水曜日

Model development in FABM: Create an empty model

Following the FABM documentation (http://sourceforge.net/apps/mediawiki/fabm/index.php?title=Developing_a_new_biogeochemical_model), I started to develop a DMS model.

I prepared the directories (uvic/dms) and appropriate files (uvic/Makefile, uvic/dms/Makefile, and uvic/dms/dms.F90), and modified few of the core files and then compiled the model........

...Hello Error!

Problem:

./doit

make[2]: Entering directory `~/FABM/fabm-git/src/models/uvic'
Makefile:4: *** missing separator.  Stop.

Solution:

This happened because I used 'spaces' instead of 'tab' for Makefiles in 'src/models/uvic/' and 'src/models/uvic/dms' directories.  ---> fixed it by replacing the 'spaces' with 'tabs'.

Problem:

./doit

make[3]: Entering directory `~/FABM/fabm-git/src/models/uvic/dms'
make[3]: *** No rule to make target `/HOME/hakase/FABM/fabm-git/lib/gotm/GFORTRAN/libfabm_prod.a(uvic_dms.o)', needed by `objs'.  Stop.

Solution:

I compared my 'src/models/uvic/dms/Makefile' with 'src/models/gotm/npzd/Makefile', and found few differences between the two files. Thus, I modified my Makefile following the NPZD Makefile.

vi models/uvic/dms/Makefile

include ../../../Rules.make

OBJS = ${LIBFABM}(dms.o)

DOCSRC = dms.F90

all: objs

${OBJS}: $(FABMBASE)

objs: ${OBJS}
        $(MOVE_MODULES_COMMAND)

doc:    $(DOCSRC)
        $(PROTEX) $(DOCSRC) > ../../../../doc/uvic_dms.tex

clean:
        $(RM) *.o *~

Compilation done successfully. Now I have an empty DMS model :)

One thing I noticed after the compilation of FABM.. If you couple FABM with GOTM, the GOTM executable is deleted after the FABM recompilation. Thus the recompilation of GOTM is also required every time you recompile FABM which makes sense. 

The message below is output of GOTM execution with uvic_dms model, which indicates the model is read successfully:

 Initializing biogeochemical model "uvic_dms"...
 model "uvic_dms" initialized successfully.

2013年11月12日火曜日

タックス

今日郵便受けを開けてみるとCanada revenue agencyから郵便が入っとった。

要約すると2012年度のニューファンドランド州からこれまでもらっていたNLHSTCというタックスの一部を返金してくださいとの内容。

どうやら他の州に引っ越した場合はもらえなくなるらしい。

これまで過去六年間はずっとニューファンドランドに居て毎年四月頃になるとタックスリターンというのをオンラインでやっていて、申請すればいくらか給料や学費や保険で支払っていた税金の一部が戻ってくるんだ~という感じで思っていたんだが今回の件で少し理解度が増したような。

とりあえずNLHSTCというのはニューファンドランド在住の所得の少ない人に与えらるための税金らしい。これを今まで自分はもらっていたということがわかった。

カナダはタックスは州が管理しているので州によって税金の種類が違うみたい。今後のタックス支払いのスケジュールみたいなのが同封されていてBC Climate Action Tax Creditという税金が$115.50と表記されていた。多分これは温暖化やco2対策に積極的なブリティッシュコロンビア州ならではの税金ではなかろうか。

通りでこの州のバスはハイブリッドが多いわけだ。この税金が使われているんだろうな。

2013年11月10日日曜日

git FABM

I am not familiar with 'git' command, but GOTM and FABM use git to update the models.

Today, I used 'git pull' to check for updated files on FABM and I could see that there are some updates available at least:

~/FABM/fabm-git$ git pull
remote: Counting objects: 504, done.
remote: Compressing objects: 100% (399/399), done.
remote: Total 405 (delta 265), reused 0 (delta 0)
Receiving objects: 100% (405/405), 596.49 KiB | 618 KiB/s, done.
Resolving deltas: 100% (265/265), completed with 71 local objects.
From git://fabm.git.sourceforge.net/gitroot/fabm/fabm
   ce042d4..75702b8  master     -> origin/master
Updating ce042d4..75702b8
error: Your local changes to the following files would be overwritten by merge:
src/fabm_types.F90
testcases/0d/run.nml
Please, commit your changes or stash them before you can merge.
Aborting

The message seems to tell me that the two files listed (fabm_types.F90 and run.nml) will be overwritten if I 'git merge'. I edited 'fabm_types.F90' so that the model would be compiled successfully, so I wouldn't want to overwrite it. Thus, I decided to rename these files *_old.* so that I don't lose them. Then I 'git pull' again:

~/FABM/fabm-git$ git pull
Updating ce042d4..75702b8
Fast-forward
 compilers/compiler.FTN                             |   16 +
 compilers/vs2010/fabm-0d.vfproj                    |   15 +-
 compilers/vs2010/fabm-gotm.vfproj                  |   15 +-
 include/standard_variables.h                       |  232 +++++++
 src/Makefile                                       |    9 +-
 src/Rules.make                                     |    8 +
 src/drivers/0d/fabm0d.F90                          |   55 +-
 src/drivers/gotm/Makefile                          |   11 +-
 src/drivers/mossco/Makefile                        |    9 +-
 src/fabm.F90                                       |  167 ++++-
 src/fabm_expressions.F90                           |  123 ++++
 src/fabm_library.F90                               |    8 +
 src/fabm_standard_variables.F90                    |  193 +-----
 src/fabm_types.F90                                 |   93 ++-
 src/models/aed/Makefile                            |    6 +-
 src/models/aed/aed_bacteria.F90                    |    4 +-
 src/models/aed/aed_carbon.F90                      |   16 +-
 src/models/aed/aed_chlorophylla.F90                |    8 +-
 src/models/aed/aed_iron.F90                        |    2 +-
 src/models/aed/aed_nitrogen.F90                    |    6 +-
 src/models/aed/aed_organic_matter.F90              |   26 +-
 src/models/aed/aed_oxygen.F90                      |   18 +-
 src/models/aed/aed_pathogens.F90                   |   18 +-
 src/models/aed/aed_phosphorus.F90                  |   30 +-
 src/models/aed/aed_phytoplankton.F90               |  120 ++--
 src/models/aed/aed_sedflux.F90                     |    2 +-
 src/models/aed/aed_silica.F90                      |    4 +-
 src/models/aed/aed_sulfur.F90                      |    2 +-
 src/models/aed/aed_tracer.F90                      |    6 +-
 src/models/aed/aed_util.F90                        |    8 +-
 src/models/aed/aed_viruses.F90                     |    4 +-
 src/models/aed/aed_zooplankton.F90                 |   70 +--
 src/models/au/prey_predator/Makefile               |    2 +
 src/models/au/prey_predator/prey_predator.F90      |    4 +-
 src/models/bb/Makefile                             |    1 +
 src/models/bb/filter_feeder/Makefile               |   26 +
 src/models/bb/filter_feeder/filter_feeder.F90      |  166 +++++
 src/models/bb/passive/Makefile                     |    2 +
 src/models/examples/Makefile                       |    1 +
 src/models/examples/benthic_predator/Makefile      |    2 +
 .../examples/benthic_predator/benthic_predator.F90 |    2 +-
 src/models/examples/duplicator/Makefile            |    2 +
 src/models/examples/mean/Makefile                  |   26 +
 src/models/examples/mean/mean.F90                  |   84 +++
 src/models/examples/npzd/Makefile                  |    2 +
 src/models/examples/npzd/phy.F90                   |   10 +-
 src/models/examples/npzd/zoo.F90                   |    8 +-
 src/models/examples/npzd_f2003/Makefile            |    2 +
 src/models/examples/npzd_f2003/npzd_f2003.F90      |   12 +-
 src/models/gotm/Makefile                           |    1 +
 src/models/{iow => gotm}/ergom/Makefile            |    7 +-
 src/models/{iow => gotm}/ergom/ergom.F90           |  638 +++++++-------------
 src/models/gotm/fasham/Makefile                    |    2 +
 src/models/gotm/fasham/fasham.F90                  |    2 +-
 src/models/gotm/npzd/Makefile                      |    2 +
 src/models/gotm/npzd/npzd.F90                      |   10 +-
 src/models/hzg/omexdia_p/Makefile                  |    2 +
 src/models/hzg/omexdia_p/omexdia_p.F90             |   20 +-
 src/models/iow/Makefile                            |    3 +-
 src/models/iow/spm/Makefile                        |    2 +
 src/models/iow/spm/spm.F90                         |  550 ++++++++++++++---
 src/models/klimacampus/phy_feedback/Makefile       |    2 +
 .../klimacampus/phy_feedback/phy_feedback.F90      |   14 +-
 src/models/metu/mnemiopsis/Makefile                |    2 +
 src/models/metu/mnemiopsis/mnemiopsis.F90          |   24 +-
 src/models/pml/carbonate/Makefile                  |    2 +
 src/models/pml/carbonate/carbonate.F90             |   10 +-
 src/models/pml/ersem/Makefile                      |    2 +
 src/models/pml/ersem/ersem.F90                     |    8 +-
 testcases/0d/run.nml                               |    1 +
 testcases/fabm-bb-filter_feeder.nml                |   84 +++
 .../{fabm-iow-ergom.nml => fabm-gotm-ergom.nml}    |    4 +-
 .../standard_variables/parse_standard_variables.py |   32 +-
 73 files changed, 2062 insertions(+), 1018 deletions(-)
 create mode 100644 compilers/compiler.FTN
 create mode 100644 include/standard_variables.h
 create mode 100644 src/fabm_expressions.F90
 create mode 100644 src/models/bb/filter_feeder/Makefile
 create mode 100644 src/models/bb/filter_feeder/filter_feeder.F90
 create mode 100644 src/models/examples/mean/Makefile
 create mode 100644 src/models/examples/mean/mean.F90
 rename src/models/{iow => gotm}/ergom/Makefile (71%)
 rename src/models/{iow => gotm}/ergom/ergom.F90 (50%)
 mode change 100644 => 100755 src/models/iow/spm/spm.F90
 create mode 100644 testcases/fabm-bb-filter_feeder.nml
 rename testcases/{fabm-iow-ergom.nml => fabm-gotm-ergom.nml} (99%)

This time, it started updating the model right away and gives me all the details about the update.

I wonder how to update the model without losing my own modification in the code(s) being updated...

2013年11月7日木曜日

[solved!] Strange behaviour with GOTM-FABM-NPZD-OWS_PAPA

1) GOTM problem in temperature output

Different results with the same settings between GOTM 4.0.0 and 4.1.0.
Both models do NOT use T restoring (i.e. restoring time is set to some large value, e.g. 1e15), but the results are significantly different (Fig.1 4.0.0 on right 4.1.0 on left).
Figure 1: SST (bottom) and Time series of temperature in top 250 m


Nevertheless, I decided to restore T for 4.1.0 to fix physics. Now, T is restored alright (Fig.2 left), but the corresponding biology looks so strange (Fig.2 right).
Figure 2: Temperature (left) and Phytoplankton in top 250 m in 4.1.0.
  • no swr.dat is present in 4.0.0.
    • This is because heatflux.dat contains both swr (short wave radiation) and qh (surface heat flux) data.
      • In 4.1.0, two variables are stored in different files swr.data and heatflux.dat.
I FOUND it... 'swr_method=0' was the problem. It should be 'swr_method=2'. Otherwise, no insolation, and no biological response.

The newly obtained results look promising! Temperature looks like the one in the Figure 2 without restoring, and the phytoplankton exists in the new run :D

2013年11月6日水曜日

List of registered FABM models by default

In the current version of FABM, there are 9 models available according to '~/FABM/fabm-git/src/fabm.F90':

   subroutine register_models()
!
! !REVISION HISTORY:
!  Original author(s): Jorn Bruggeman
!EOP
!
!-----------------------------------------------------------------------
!BOC
   ! Start with empty arrays with model identifiers and names.
   allocate(modelids  (0))
   allocate(modelnames(0))

   ! Register specific biogeochemical models.
   call register_model(model_container_id,          '')
   call register_model(gotm_npzd_id,                'gotm_npzd')
   call register_model(gotm_fasham_id,              'gotm_fasham')
   call register_model(metu_mnemiopsis_id,          'metu_mnemiopsis')
   call register_model(pml_ersem_id,                'pml_ersem')
   call register_model(pml_carbonate_id,            'pml_carbonate')
   call register_model(examples_benthic_predator_id,'examples_benthic_predator')
   call register_model(iow_ergom_id,                'iow_ergom')
   call register_model(iow_spm_id,                  'iow_spm')
   call register_model(klimacampus_phy_feedback_id, 'klimacampus_phy_feedback')
   ! ADD_NEW_MODEL_HERE - required

   end subroutine register_models

Those in red are the IDs you would define at the beginning of 'fabm.nml'.

Apparently 'au_prey_predator' is not added in the code while the namelist exists. Perhaps this model is under development?

Obviously, to implement a new model, you need to add a new line with your model name in the above code (better description can probably be found here: http://sourceforge.net/apps/mediawiki/fabm/index.php?title=Developing_a_new_biogeochemical_model).

The namelist files for each of these models can be found in '~/FABM/fabm-git/testcases' except for 'pml_ersem' (I couldn't find the namelist for this model).

Some models such as 'pml_carbonate' may be coupled to 'gotm_npzd' as in the case for '~/FABM/fabm-git/testcases/fabm-npzd-carbonate.nml'. In this configuration, an additional parameter is defined in 'gotm_npzd': 

dic_variable='pml_carbonate_dic'

I believe (and I did not check the model code) that this parameter activates the calculation of DIC concentration within the NPZD model, in which the information is passed onto the carbon cycle model to account for the biological pump. 'pml_carbonate' runs on its own, in which case I think it simulates the physicochemical dynamics only.

Setting a GOTM-FABM configuration with 'ows_papa'

Summary
  • 'make' is sufficient ('make run_all' or 'make ows_papa' did not work).

Details

make run_all

make: *** No rule to make target `run_all'.  Stop.

make ows_papa

make: *** No rule to make target `ows_papa'.  Stop.

make

~/editscenario/editscenario.py --skipvalidation -e nml --schemadir=/HOME/hakase/GOTM/gotm-git/gui.py/schemas/scenario/ ows_papa.xml . --targetversion=gotm-4.1.0
Operating on values file with version gotm-4.1.0.
Exporting values to namelist file(s) /HOME/hakase/GOTM/gotm-git/gotm-cases/ows_papa...

running gotm

gotm 2> log.ows_papa
make: *** [run] Error 127

head log.ows_papa

/bin/sh: 1: gotm: not found

ls

airsea.nml     gotmturb.nml      obs.nml       swr.dat
bio.nml        heatflux.dat      ows_papa.xml     swr_file.dat
fabm.nml       heatflux.dat.kb      README       timestamp
filelist       heatflux_file.dat      seagrass.nml     tprof.dat
gotm       log.ows_papa      sprof.dat        t_prof_file.dat
gotm_fabm.nml  Makefile      s_prof_file.dat
gotmmean.nml   momentumflux.dat       sst.dat
gotmrun.nml    momentumflux_file.dat  sst_file.dat

In addition to the namelist files generated by 'make' command, you need to have two namelist files in red above.

In 'fabm.nml', you provide the parameters for your ecosystem model (for this preliminary run, I copied the Fasham (1990) model from '~/FABM/fabm-git/testcases/fabm-gotm-fasham.nml' and renamed it to 'fabm.nml'. If you want to use more than one model at one run, you can combine the multiple namelist files into one (and name it 'fabm.nml'). In such case, make sure that all the models you want to use for the run are defined at the beginning of the file:

&fabm_nml
   models = 'gotm_fasham','gotm_npzd','gotm_npzd'
/

In the above example, three models will be run with one simulation of GOTM (physical model). The NPZD model in red is added twice since I wanted to run the same model with two different sets of parameters (extremely useful for sensitivity experiments). Refer to '0d' test case for further information.

In 'gotm_fabm.nml', you make several model choices (e.g. ODE scheme, advection scheme, etc.). You obtain this file from '~/FABM/fabm-git/testcases/GOTM/gotm_fabm.nml' and paste in your GOTM working directory (in this case, '~/GOTM/gotm-git/gotm-cases/ows_papa'). Make sure that 'fabm_calc' is set to '.true.' to activate the FABM.

GOTM is now coupled to FABM.              Great!

Finally done! gotm-git (4.1.0) setup

Summary

  • In the developer's version (4.1.0) of GOTM, namelist files must be generated with 'make' command as well as specifying appropriate .xml files ('make run_all' will recognize all the .xml files inside the working directory.
  • To do this, you need 'editscenario.py', which can be obtained by executing 'git clone git://git.bolding-burchard.com/editscenario editscenario' (refer to my previous post)
  • After modifying 'gotm-cases/Rule.make' to address the appropriate path for 'editscenario.py', you should be able to 'make run_all' to generate all the appropriate namelist files.
  • You can 'make namelist' to generate the appropriate .nml files, and then 'make run' to run the model.

Step-by-step

After obtaining 'editscenario.py', which is located in '~/editscenario/', I had to modify 'Rule.make' accordingly to address the correct path for this file (there are two places where 'editscenario.py' is called): 

gotm-cases/Rules.make

        ~/editscenario/editscenario.py --skipvalidation -e nml --schemadir=$(SCHEMADIR) $(setup).xml . --targetversion=gotm-$(ver)

...

scenario:

        ~/editscenario/editscenario.py -e zip --schemadir=$(SCHEMADIR) $(setup).xml $(setup).gotmscenario --targetversion=gotm-$(ver)


make run_all

Generating input files for: kepsilon

ln -sf kepsilon.xml channel.xml && make namelist && make run && mv channel.nc kepsilon.nc && mv log.channel log.kepsilon.channel
make[1]: Entering directory `/HOME/hakase/GOTM/gotm-git/gotm-cases/channel'
~/editscenario/editscenario.py --skipvalidation -e nml --schemadir=/HOME/hakase/GOTM/gotm-git/gui.py/schemas/scenario/ channel.xml . --targetversion=gotm-4.1.0
Operating on values file with version gotm-4.1.0.
Exporting values to namelist file(s) /HOME/hakase/GOTM/gotm-git/gotm-cases/channel...
make[1]: Leaving directory `/HOME/hakase/GOTM/gotm-git/gotm-cases/channel'
make[1]: Entering directory `/HOME/hakase/GOTM/gotm-git/gotm-cases/channel'

running gotm

gotm 2> log.channel
make[1]: *** [run] Error 127
make[1]: Leaving directory `/HOME/hakase/GOTM/gotm-git/gotm-cases/channel'
make: *** [kepsilon] Error 2

I don't know what these errors mean. 'running gotm'? Does the 'make' command start the simulation automatically??

Here is what's inside 'log.channel' file:

/bin/sh: 1: gotm: not found

I am not sure what this means. 'gotm' command was not found in /bin/sh directory? obviously??
---Beginning of Update---
I found where it went wrong. I had to add './' in the file "~/GOTM/gotm-git/gotm-cases/Rules.make":

BEFORE:      gotm 2> log.$(name)
AFTER:         ./gotm 2> log.$(name)

The problem solved for this part. However, I then received the following error message:

make

/bin/sh: 1: Syntax error: Unterminated quoted string
make: *** [all] Error 2

Now I noticed (by staring at '~/GOTM/gotm-git/gotm-cases/Rules.make') that, by 'make', it means 'make all' or 'make namelist run'. Then I decided to do 'make namelist' and 'make run' separately. 

Then guess what? No error was produced. Strange! But problem solved! 
---End of Update---

Anyways, ignoring this error, the 'make run_all' command managed to create all the required namelist files:

ls

airsea.nml   filelist   gotmturb.nml  Makefile   seagrass.nml
bio.nml      gotm   kepsilon.xml  MellorYamada.xml
channel.xml  gotmmean.nml  komega.xml obs.nml
doit     gotmrun.nml   log.channel README

Therefore, I can do './gotm' to start the simulation and it did work (no more errors with airsea.nml!).

2013年11月5日火曜日

Words to memorize from Lesson 1

Dog
Heart
Word
Beloved
Muslim
Eye
Helper
Student
Pen

كَلْبٌ
قَلْبٌ
كَلِمَةٌ
حَبِيبٌ
مُسْلِمٌ
عَينٌ
نَاصِرٌ
مُعَلَّمٌ
قَلَمٌ

Plus, the words listed on page 9-10 of 80% Quranic vocabulary.

Getting there... progress in gotm-git set-up (90% done)

So basically, the namelist files from gotm-4.0.0 test cases cannot be used in the developer's version, which is 4.1.0 currently, because they've added extra parameters in namelist. For example, you can compare the airsea.F90 file between the two versions:

gotm-4.0.0/src/airsea/airsea.F90

! !LOCAL VARIABLES:
   namelist /airsea/ calc_fluxes, &
                     meteo_file, &
                     wet_mode, &
                     heat_method, &
                     const_swr,const_heat, &
                     heatflux_file, &
                     momentum_method, &
                     const_tx,const_ty, &
                     momentumflux_file, &
                     p_e_method,const_p_e,p_e_flux_file, &
                     sst_method, sst_file, &
                     sss_method, sss_file

GOTM/gotm-git/src/airsea/airsea.F90

! !LOCAL VARIABLES:
   namelist /airsea/ calc_fluxes, &
                     fluxes_method, &
                     back_radiation_method, &
                     meteo_file, &
                     wind_factor, &
                     hum_method, &
                     heat_method, &
                     rain_impact, &
                     calc_evaporation, &
                     swr_method,const_swr,swr_file,swr_factor, &
                     const_heat, &
                     heatflux_file, &
                     momentum_method, &
                     const_tx,const_ty, &
                     momentumflux_file, &
                     precip_method,const_precip,precip_file,precip_factor,&
                     sst_method, sst_file, &
                     sss_method, sss_file, &
                     ssuv_method

Clearly, more parameters are added in the latter file. Therefore, I cannot copy and paste the namelist files from gotm-4.0.0 to gotm-git.

I found the thread that had the same problem as mine: https://groups.google.com/d/msg/gotm-users/upXzPAq0S8A/MSFggrFvaGwJ

The tricky part was to understand that, in the newer version (4.1.0), namelist files are generated using 'make' command within the specific test case of interest according to: https://groups.google.com/d/msg/gotm-users/2DeMk6R38uo/sHqA1URVmcoJ

By following this instruction, I get the following error after executing:

make run_all

Generating input files for: kepsilon

ln -sf kepsilon.xml channel.xml && make namelist && make run && mv channel.nc kepsilon.nc && mv log.channel log.kepsilon.channel
make[1]: Entering directory `/HOME/hakase/GOTM/gotm-git/gotm-cases/channel'
editscenario.py --skipvalidation -e nml --schemadir=/HOME/hakase/GOTM/gotm-git/gui.py/schemas/scenario/ channel.xml . --targetversion=gotm-4.1.0
make[1]: editscenario.py: Command not found
make[1]: *** [namelist] Error 127
make[1]: Leaving directory `/HOME/hakase/GOTM/gotm-git/gotm-cases/channel'
make: *** [kepsilon] Error 2

The error first tells me that my computer does not recognize "editscenario.py" command. In the later post of the same thread (https://groups.google.com/d/msg/gotm-users/2DeMk6R38uo/nCQjB-tHAcYJ), I 'git clone' the command (or the python file), then got the following error:

~$ git clone git://bbh.homelinux.net/editscenario
Cloning into 'editscenario'...
fatal: unable to connect to bbh.homelinux.net:
bbh.homelinux.net: Name or service not known

According to this thread, the location of 'editscenario' has been moved: https://groups.google.com/d/msg/getm-users/QB5vUPR6kYA/Rd7w9yjXKeYJ

~$ git clone git://git.bolding-burchard.com/editscenario editscenario
Cloning into 'editscenario'...
remote: Counting objects: 8, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 8 (delta 2), reused 0 (delta 0)
Receiving objects: 100% (8/8), 5.42 KiB, done.
Resolving deltas: 100% (2/2), done.

Alright, it works. I downloaded 'editscenario'.

Make a symbolic link to 'editscenario.py' in bin file, following: https://groups.google.com/d/msg/gotm-users/2DeMk6R38uo/nCQjB-tHAcYJ

This is where I stopped for today.