2013年10月18日金曜日

test case: nns_annual



Mixing in Northern North Sea including the NPZD bio-geochemical model: http://www.gotm.net/index.php?go=software&page=testcases

More about this case: http://www.gotm.net/pages/documentation/manual/stable/html/node237.html#nns_annual

Biogeochemical Model: NPZD (4 variables)
Advection scheme for vertical motion: TVD with ULTIMATE QUICKEST
ODE scheme for source and sink dynamics: Modified Patankar-RK (2. order, conservat., posit.)

bio_npzd.nml

I am going to play around with this file.

".value" files

This type of file gives you the list of parameters or T/F statements of your choice for the run. Can be useful to keep track of your simulation settings.

sst and sss restoring (every 3 hours with 3-D model output)

temperature and salinity resotring (whole depth, every 12 hours with 3-D model output)

dt = 1 hour

Sensitivity Analysis: Select 5 parameters.

Parameter Number.  Code Name: Default Value: Line Number in "bio_npzd.nml"

  1. I_min: 25.: L39
  2. rmax: 1.: L40
  3. gmax: 0.2: L41
  4. alpha: 1.35: L43
  5. rzd: 0.02: L49

How to rewrite a specific line using sed: http://www.linuxquestions.org/questions/programming-9/bash-replace-a-line-in-text-file-631208/#post3102926

c=1 for -5%
c=2 for +5%
c=3 for -25%
c=4 for +25%


I created a simpler script than the one I created before for PISCES:

sensitivity.sh


#---------------------------------------------------------------
for it in `seq 1 5`; #Number of cases
do
for it2 in `seq 1 4`; #Number of parameters
do

testname="p${it}c${it2}.nc" #p=parameter number, c=case number

casenum=${testname:3:1}
if [ $casenum -eq 1 ]
then
 variation="0.8"
elif [ $casenum -eq 2 ]
then
 variation="0.95"
elif [ $casenum -eq 3 ]
then
 variation="1.05"
elif [ $casenum -eq 4 ]
then
 variation="1.2"
fi

parnum=${testname:1:1}
if [ $parnum -eq 1 ]
then
 sed -i "39s/.*/  I_min=       `echo "scale=5;25.*$variation"|bc`/" bio_npzd.nml
 grep "I_min=" bio_npzd.nml >> samemo.txt
elif [ $parnum -eq 2 ]
then
 sed -i "40s/.*/  rmax=        `echo "scale=5;1.*$variation"|bc`/" bio_npzd.nml
 grep "rmax=" bio_npzd.nml >> samemo.txt
elif [ $parnum -eq 3 ]
then
 sed -i "41s/.*/  gmax=        `echo "scale=5;0.2*$variation"|bc`/" bio_npzd.nml
 grep "gmax=" bio_npzd.nml >> samemo.txt
elif [ $parnum -eq 4 ]
then
 sed -i "43s/.*/  alpha=       `echo "scale=5;1.35*$variation"|bc`/" bio_npzd.nml
 grep "alpha=" bio_npzd.nml >> samemo.txt
elif [ $parnum -eq 5 ]
then
 sed -i "49s/.*/  rzd=         `echo "scale=5;0.02*$variation"|bc`/" bio_npzd.nml
 grep "rzd=" bio_npzd.nml >> samemo.txt
fi
./rungotm
mv nns_annual.nc output/$testname
cp bio_npzd_original.nml bio_npzd.nml

done
done
#------------------------------------------------------



By producing output for each run in "samemo.txt", it helped me to check if the modifications were made in "bio_npzd.nml" appropriately.

One thing I learned from making this script: the square brackets [ ] in IF statements have to be isolated (a space before and after [ or ]).

図書館の違い

UVic(ビクトリア大学)へやってきてもう少しで2ヶ月が経とうとしている。まだ二ヶ月?っという感じだが毎日充実して過ごせている証拠だろう。

MUN(メモリアル大学)で修士論文を提出したことを証明するのに約2週間ほどかかってしまったがようやくStudent ID(学生証)が手に入ったので最近図書館をよく利用している。そこで双方の大学の図書館での違いに気づかされたので紹介する。

本の入手はMUNのほうが簡単

図書館のウェブサイトから欲しい本を検索してその本が借りられていない場合その本がどこにあるかをメモして自分で足を運んで手に入れる。

これは多分普通のことだと思うがMUNではリクエストすれば職員の方が事前に見つけて本を受付カウンターに保管しておいてもらうことができる。本が見つかり次第Eメールで連絡が入り5日以内に受け取ればいい。これは今思うとすごくありがたいサービスだった。

UVicでは本の貸し出しをセルフサービスできる

リコールした本が届いたというメールが図書館からあったので受付カウンターへ行ってみると「リコールされた本は向こうの戸棚に並べてあるから自分で探してからここで借りるかそこにある機械を使って借りて」と言われた。

本のバーコードと学生証を画面の指示に従って自分でスキャンする。これは便利。

2013年10月9日水曜日

Successfully compiled FABM!

With the developer's version of GOTM (GOTM/gotm-git), I was able to follow all the steps including the simulation of 0d test case: http://sourceforge.net/apps/mediawiki/fabm/index.php?title=Downloading_and_compiling_FABM_(Windows,_Linux)

However, I get errors when I try to do the same with the stable version of GOTM (i.e. gotm-4.0.0). Perhaps, FABM only couples with the developers version?

Anyways, at the end of the step, I get the following files in the "testcases/0d" directory:

-rw-r--r-- 1 hakase users  723 Oct  4 14:25 run.nml
-rw-r--r-- 1 hakase users  524 Oct  4 14:25 plotresults.py
-rw-r--r-- 1 hakase users  233 Oct  4 14:25 Makefile
-rw-r--r-- 1 hakase users   65 Oct  4 14:25 env.dat
drwxr-sr-x 5 hakase users 4.0K Oct  7 15:53 ..
-rwxr-xr-x 1 hakase users  356 Oct  9 10:45 doit
-rwxr-xr-x 1 hakase users 318K Oct  9 10:45 fabm0d
lrwxrwxrwx 1 hakase users   30 Oct  9 10:47 fabm.nml -> ../fabm-gotm-multiple-npzd.nml
-rw-r--r-- 1 hakase users  22M Oct  9 10:47 output.dat
-rw-r--r-- 1 hakase users 2.5K Oct  9 10:47 log

By default, the output is produced in .dat format. Plotting of this output data can be done simply executing:

python plotresults.py

Then,

swr.png

is produced, which looks like:
swr.png
Pretty cool! Now I can create my own testcases.

2013年10月8日火曜日

ビクトリア大学(UVic)大学院の学費はいくら?

ビクトリア大学(University of Victoria)へ大学院留学を考えている方の参考になればと思い今年度の秋&春学期の学費を紹介します。これは大学院博士課程(理系)の場合です。理系と文系、または学科によって支払う金額が異なるかもしれませんが目安として考えていただけたらいいと思います。
こちらが秋学期(9月ー12月)。赤い線は気にしないでください。

そしてこちらが春学期(1月ー4月)。
項目が少なくてわかりやすいですね。UVIC Athleticsは体育館や施設の利用料、Grad Student Societyは院学生会(ユニオン)、GSS Extended Healthはユニオンが提供する追加医療保険、GSS Dental Planはユニオンが提供する歯科保険、GSS Bus Passはユニオンが提供するバス定期券、Graduate -International-Wは大学院留学生学費(Wの意味はわかりません)。

保険料は秋学期に年間費として支払いますがユニオンに頼めば月1回の12回払いにすることもできます(この場合手数料$25がかかります)。

いつから支払うことができるのか?

それぞれの学期の登録(registration)をした時点で支払いをすることができます。

いつまでに支払わなければいけないのか?

それぞれの学期の初めの月の月末までに学費は納めないといけません。つまり秋学期の場合9月30日、春学期の場合1月31日。

夏学期は…?

夏学期は春学期と同等の学費を納めます(夏学期の登録がまだなので絶対とは言えませんが恐らく)。

2013年10月7日月曜日

FABM compilation (Progress 4)

Following, http://sourceforge.net/apps/mediawiki/fabm/index.php?title=Downloading_and_compiling_FABM_(Windows,_Linux), I get an error at the step 'compile the 0d test driver...':

fabm0d.F90:14.11:

   use time
           1
Fatal Error: Can't open module file 'time.mod' for reading at (1): No such file or directory
make[1]: *** [fabm0d.o] Error 1




Not too sure where fabm0d.F90 is located (or even if it exists).

Fixing this will be the next step.