2013年7月12日金曜日

simulate PISCES monthly 続き

スクリプトをいくつか編集してシミュレーションをしやすくした。手順は以下の通り

一月はスクリプトを使わずに手動で行う。確認することは:

  • 大気co2濃度設定
  • namelist_topでの初期値設定:
    • ln_rsttr      = .true.   !  start from a restart file (T) or not (F)
一月が終わったらln_rsttrを.true.に変更してあとは何も変えずに./dailyrun.shを実行して完了。

dailyrun.shには新しくreplaceコマンドとarray(列)を取り入れた:


tstep=(744 672 744 720 744 720 744 744) #January to August
for month in 02 03 04 05 06 07
do
replace "${tstep[${month}-2]}" "${tstep[${month}-1]}" -- namelist namelist_top
replace "010`echo "${month}-1" | bc`01" "01${month}01" -- namelist
for it in T U V W
do
ln -fs Lab_${it}_94_m${month}.nc Lab_${it}_94.nc
done
mv LABSEA_*_*T.nc ../MY_SRC/daily94/
cp LABSEA_*_restart_trc.nc ../MY_SRC/daily94/restart_trc_${month}.nc
mv -f LABSEA_*_restart_trc.nc restart_trc.nc
./opa
done


replaceは便利なコマンド。

例: file1とfile2内のabcをedfに書き換える

replace "abc" "edf" -- file1 file2

これにarrayを使って月別のタイムステップを各ループで自動変更させることにした。これで毎月ごとのシミュレーションを手動でせんでよかごとなったけんまぁだいぶ楽にはなったなぁ。

0 件のコメント:

コメントを投稿