#! /usr/bin/ruby
# -*- coding: euc-jp -*-

# 同期回転惑星計算用描画スクリプト
# == 説明
# * このスクリプトは同期回転惑星設定実験の結果の図を作成するものである.
# * このスクリプトでは, gpview, fig_heatflux-lat-dependence.rb などの
#   スクリプトが使われる.
# * 使用する場合には, fig_heatflux-lat-dependence.rb などを格納した
#   ディレクトリを指定する必要がある.
#   そのために, script_dir を適宜書き換えねばならない.
#
# == オプション
# --time_start 開始時刻
# --time_end   終了時刻
# --wsn        出力先. ps だったら --wsn=2
# --prefix     生成する画像ファイルに付ける接頭詞
#
# == USAGE
#   % fig_SeasonalMean.rb --wsn=2 --prefix=EXPNAME_
#
# == 履歴
# * 2013-07-14 石渡正樹 作成


require "getoptlong"        # for option_parse
require "numru/ggraph"
include NumRu

script_dir = "/GFD_Dennou_Work3/momoko/SyncRotEarthRad/script"

## オプション解析
parser = GetoptLong.new
parser.set_options(
                   ###    global option   ###
                   ['--wsn',                      GetoptLong::REQUIRED_ARGUMENT],
                   ['--prefix',                      GetoptLong::REQUIRED_ARGUMENT]
                   )
parser.each_option do |name, arg|
    eval "$OPT_#{name.sub(/^--/, '').gsub(/-/, '_')} = '#{arg}'"  # strage option value to $OPT_val
end

wsn = ($OPT_wsn||4)

execution=false

#if (execution)




# 土壌データ
system("gpview SoilTemp.nc@SoilTemp,ssz=-0.88,time=700:789 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SoilTemp.ps && convert #{$OPT_prefix}SoilTemp.ps #{$OPT_prefix}SoilTemp_DJF.png")

system("gpview SoilTemp.nc@SoilTemp,ssz=-0.88,time=790:881 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SoilTemp.ps && convert #{$OPT_prefix}SoilTemp.ps #{$OPT_prefix}SoilTemp_MMA.png")

system("gpview SoilTemp.nc@SoilTemp,ssz=-0.88,time=882:973 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SoilTemp.ps && convert #{$OPT_prefix}SoilTemp.ps #{$OPT_prefix}SoilTemp_JJA.png")

system("gpview SoilTemp.nc@SoilTemp,ssz=-0.88,time=974:1064 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SoilTemp.ps && convert #{$OPT_prefix}SoilTemp.ps #{$OPT_prefix}SoilTemp_SON.png")

system("gpview SoilMoist.nc@SoilMoist,time=700:789 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SoilMoist.ps && convert #{$OPT_prefix}SoilMoist.ps #{$OPT_prefix}SoilMoist_DJF.png")

system("gpview SoilMoist.nc@SoilMoist,time=790:881 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SoilMoist.ps && convert #{$OPT_prefix}SoilMoist.ps #{$OPT_prefix}SoilMoist_MMA.png")

system("gpview SoilMoist.nc@SoilMoist,time=882:973 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SoilMoist.ps && convert #{$OPT_prefix}SoilMoist.ps #{$OPT_prefix}SoilMoist_JJA.png")

system("gpview SoilMoist.nc@SoilMoist,time=974:1064 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SoilMoist.ps && convert #{$OPT_prefix}SoilMoist.ps #{$OPT_prefix}SoilMoist_SON.png")

# 2 次元データ

system("gpview SurfTemp.nc@SurfTemp,time=700:789 --mean time --range=150:400 --wsn=#{wsn} --int=15 --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SurfTemp.ps && convert #{$OPT_prefix}SurfTemp.ps #{$OPT_prefix}SurfTemp_DJF.png")

system("gpview SurfTemp.nc@SurfTemp,time=790:881 --mean time --range=150:400 --wsn=#{wsn} --int=15 --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SurfTemp.ps && convert #{$OPT_prefix}SurfTemp.ps #{$OPT_prefix}SurfTemp_MMA.png")

system("gpview SurfTemp.nc@SurfTemp,time=882:973 --mean time --range=150:400 --wsn=#{wsn} --int=15 --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SurfTemp.ps && convert #{$OPT_prefix}SurfTemp.ps #{$OPT_prefix}SurfTemp_JJA.png")

system("gpview SurfTemp.nc@SurfTemp,time=974:1064 --mean time --range=150:400 --wsn=#{wsn} --int=15 --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SurfTemp.ps && convert #{$OPT_prefix}SurfTemp.ps #{$OPT_prefix}SurfTemp_SON.png")



#end



system("gpview OLRA.nc@OLRA,time=700:789 --mean time --wsn=#{wsn} --noannotate --sint=10 --range=110:320 && dclpsrot dcl.ps > #{$OPT_prefix}OLR.ps && convert #{$OPT_prefix}OLR.ps #{$OPT_prefix}OLRA_DJF.png")

system("gpview OLRA.nc@OLRA,time=790:881 --mean time --wsn=#{wsn} --noannotate --sint=10 --range=110:320 && dclpsrot dcl.ps > #{$OPT_prefix}OLR.ps && convert #{$OPT_prefix}OLR.ps #{$OPT_prefix}OLRA_MMA.png")

system("gpview OLRA.nc@OLRA,time=882:973 --mean time --wsn=#{wsn} --noannotate --sint=10 --range=110:320 && dclpsrot dcl.ps > #{$OPT_prefix}OLR.ps && convert #{$OPT_prefix}OLR.ps #{$OPT_prefix}OLRA_JJA.png")

system("gpview OLRA.nc@OLRA,time=974:1064 --mean time --wsn=#{wsn} --noannotate --sint=10 --range=110:320 && dclpsrot dcl.ps > #{$OPT_prefix}OLR.ps && convert #{$OPT_prefix}OLR.ps #{$OPT_prefix}OLRA_SON.png")


system("gpview PRCP.nc@PRCP,time=700:789 --mean time --range=0:1e-6 --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}PRCP.ps && convert #{$OPT_prefix}PRCP.ps #{$OPT_prefix}PRCP_DJF.png")

system("gpview PRCP.nc@PRCP,time=790:881 --mean time --range=0:1e-6 --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}PRCP.ps && convert #{$OPT_prefix}PRCP.ps #{$OPT_prefix}PRCP_MMA.png")

system("gpview PRCP.nc@PRCP,time=882:973 --mean time --range=0:1e-6 --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}PRCP.ps && convert #{$OPT_prefix}PRCP.ps #{$OPT_prefix}PRCP_JJA.png")

system("gpview PRCP.nc@PRCP,time=974:1064 --mean time --range=0:1e-6 --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}PRCP.ps && convert #{$OPT_prefix}PRCP.ps #{$OPT_prefix}PRCP_SON.png")


system("gpview SurfH2OVapFluxU.nc@SurfH2OVapFluxU,time=700:789 --mean time --range=0:1e-4 --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SurfH2OVapFluxU.ps && convert #{$OPT_prefix}SurfH2OVapFluxU.ps #{$OPT_prefix}SurfH2OVapFluxU_DJF.png")

system("gpview SurfH2OVapFluxU.nc@SurfH2OVapFluxU,time=790:881 --mean time --range=0:1e-4 --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SurfH2OVapFluxU.ps && convert #{$OPT_prefix}SurfH2OVapFluxU.ps #{$OPT_prefix}SurfH2OVapFluxU_MMA.png")

system("gpview SurfH2OVapFluxU.nc@SurfH2OVapFluxU,time=882:973 --mean time --range=0:1e-4 --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SurfH2OVapFluxU.ps && convert #{$OPT_prefix}SurfH2OVapFluxU.ps #{$OPT_prefix}SurfH2OVapFluxU_JJA.png")

system("gpview SurfH2OVapFluxU.nc@SurfH2OVapFluxU,time=974:1064 --mean time --range=0:1e-4 --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SurfH2OVapFluxU.ps && convert #{$OPT_prefix}SurfH2OVapFluxU.ps #{$OPT_prefix}SurfH2OVapFluxU_SON.png")


system("gpview EvapU.nc@EvapU,time=700:789 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}EvapU.ps && convert #{$OPT_prefix}EvapU.ps #{$OPT_prefix}EvapU_DJF.png")

system("gpview EvapU.nc@EvapU,time=790:881 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}EvapU.ps && convert #{$OPT_prefix}EvapU.ps #{$OPT_prefix}EvapU_MMA.png")

system("gpview EvapU.nc@EvapU,time=882:973 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}EvapU.ps && convert #{$OPT_prefix}EvapU.ps #{$OPT_prefix}EvapU_JJA.png")

system("gpview EvapU.nc@EvapU,time=974:1064 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}EvapU.ps && convert #{$OPT_prefix}EvapU.ps #{$OPT_prefix}EvapU_SON.png")


system("gpview SensA.nc@SensA,time=700:789 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SensA.ps && convert #{$OPT_prefix}SensA.ps #{$OPT_prefix}SensA_DJF.png")

system("gpview SensA.nc@SensA,time=790:881 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SensA.ps && convert #{$OPT_prefix}SensA.ps #{$OPT_prefix}SensA_MMA.png")

system("gpview SensA.nc@SensA,time=882:973 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SensA.ps && convert #{$OPT_prefix}SensA.ps #{$OPT_prefix}SensA_JJA.png")

system("gpview SensA.nc@SensA,time=974:1064 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SensA.ps && convert #{$OPT_prefix}SensA.ps #{$OPT_prefix}SensA_SON.png")


system("gpview OSRA.nc@OSRA,time=700:789 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}OSRA.ps && convert #{$OPT_prefix}OSRA.ps #{$OPT_prefix}OSRA_DJF.png")

system("gpview OSRA.nc@OSRA,time=790:881 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}OSRA.ps && convert #{$OPT_prefix}OSRA.ps #{$OPT_prefix}OSRA_MMA.png")

system("gpview OSRA.nc@OSRA,time=882:973 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}OSRA.ps && convert #{$OPT_prefix}OSRA.ps #{$OPT_prefix}OSRA_JJA.png")

system("gpview OSRA.nc@OSRA,time=974:1064 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}OSRA.ps && convert #{$OPT_prefix}OSRA.ps #{$OPT_prefix}OSRA_SON.png")


system("gpview SSRA.nc@SSRA,time=700:789 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SSRA.ps && convert #{$OPT_prefix}SSRA.ps #{$OPT_prefix}SSRA_DJF.png")

system("gpview SSRA.nc@SSRA,time=790:881 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SSRA.ps && convert #{$OPT_prefix}SSRA.ps #{$OPT_prefix}SSRA_MMA.png")

system("gpview SSRA.nc@SSRA,time=882:973 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SSRA.ps && convert #{$OPT_prefix}SSRA.ps #{$OPT_prefix}SSRA_JJA.png")

system("gpview SSRA.nc@SSRA,time=974:1064 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}SSRA.ps && convert #{$OPT_prefix}SSRA.ps #{$OPT_prefix}SSRA_SON.png")


system("gpview Ps.nc@Ps,time=700:789 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}Ps.ps && convert #{$OPT_prefix}Ps.ps #{$OPT_prefix}Ps_DJF.png")

system("gpview Ps.nc@Ps,time=790:881 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}Ps.ps && convert #{$OPT_prefix}Ps.ps #{$OPT_prefix}Ps_MMA.png")

system("gpview Ps.nc@Ps,time=882:973 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}Ps.ps && convert #{$OPT_prefix}Ps.ps #{$OPT_prefix}Ps_JJA.png")

system("gpview Ps.nc@Ps,time=974:1064 --mean time --wsn=#{wsn} --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}Ps.ps && convert #{$OPT_prefix}Ps.ps #{$OPT_prefix}Ps_SON.png")


# 温度
system("gpview Temp.nc@Temp,time=700:789 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_mean0-360.ps && convert #{$OPT_prefix}Temp_mean0-360.ps #{$OPT_prefix}Temp_mean0-360_DJF.png")

system("gpview Temp.nc@Temp,time=790:881 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_mean0-360.ps && convert #{$OPT_prefix}Temp_mean0-360.ps #{$OPT_prefix}Temp_mean0-360_MMA.png")

system("gpview Temp.nc@Temp,time=882:973 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_mean0-360.ps && convert #{$OPT_prefix}Temp_mean0-360.ps #{$OPT_prefix}Temp_mean0-360_JJA.png")

system("gpview Temp.nc@Temp,time=974:1064 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_mean0-360.ps && convert #{$OPT_prefix}Temp_mean0-360.ps #{$OPT_prefix}Temp_mean0-360_SON.png")

system("gpview Temp.nc@Temp,sig=0.1,time=700:789 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_sig0.1.ps && convert #{$OPT_prefix}Temp_sig0.1.ps #{$OPT_prefix}Temp_sig0.1_DJF.png")

system("gpview Temp.nc@Temp,sig=0.1,time=790:881 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_sig0.1.ps && convert #{$OPT_prefix}Temp_sig0.1.ps #{$OPT_prefix}Temp_sig0.1_MMA.png")

system("gpview Temp.nc@Temp,sig=0.1,time=882:973 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_sig0.1.ps && convert #{$OPT_prefix}Temp_sig0.1.ps #{$OPT_prefix}Temp_sig0.1_JJA.png")

system("gpview Temp.nc@Temp,sig=0.1,time=974:1064 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_sig0.1.ps && convert #{$OPT_prefix}Temp_sig0.1.ps #{$OPT_prefix}Temp_sig0.1_SON.png")


system("gpview Temp.nc@Temp,sig=0.077,time=700:789 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_sig0.077.ps && convert #{$OPT_prefix}Temp_sig0.077.ps #{$OPT_prefix}Temp_sig0.077_DJF.png")

system("gpview Temp.nc@Temp,sig=0.077,time=790:881 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_sig0.077.ps && convert #{$OPT_prefix}Temp_sig0.077.ps #{$OPT_prefix}Temp_sig0.077_MMA.png")

system("gpview Temp.nc@Temp,sig=0.077,time=882:973 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_sig0.077.ps && convert #{$OPT_prefix}Temp_sig0.077.ps #{$OPT_prefix}Temp_sig0.077_JJA.png")

system("gpview Temp.nc@Temp,sig=0.077,time=974:1064 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_sig0.077.ps && convert #{$OPT_prefix}Temp_sig0.077.ps #{$OPT_prefix}Temp_sig0.077_SON.png")


system("gpview Temp.nc@Temp,lat=0,time=700:789 --mean time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_lat0.ps && convert #{$OPT_prefix}Temp_lat0.ps #{$OPT_prefix}Temp_lat0_DJF.png")

system("gpview Temp.nc@Temp,lat=0,time=790:881 --mean time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_lat0.ps && convert #{$OPT_prefix}Temp_lat0.ps #{$OPT_prefix}Temp_lat0_MMA.png")

system("gpview Temp.nc@Temp,lat=0,time=882:973 --mean time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_lat0.ps && convert #{$OPT_prefix}Temp_lat0.ps #{$OPT_prefix}Temp_lat0_JJA.png")

system("gpview Temp.nc@Temp,lat=0,time=974:1064 --mean time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=140:300 && dclpsrot dcl.ps > #{$OPT_prefix}Temp_lat0.ps && convert #{$OPT_prefix}Temp_lat0.ps #{$OPT_prefix}Temp_lat0_SON.png")


# 東西風
system("gpview U.nc@U,time=700:789 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_mean0-360.ps && convert #{$OPT_prefix}U_mean0-360.ps #{$OPT_prefix}U_mean0-360_DJF.png")

system("gpview U.nc@U,time=790:881 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_mean0-360.ps && convert #{$OPT_prefix}U_mean0-360.ps #{$OPT_prefix}U_mean0-360_MMA.png")

system("gpview U.nc@U,time=882:973 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_mean0-360.ps && convert #{$OPT_prefix}U_mean0-360.ps #{$OPT_prefix}U_mean0-360_JJA.png")

system("gpview U.nc@U,time=974:1064 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_mean0-360.ps && convert #{$OPT_prefix}U_mean0-360.ps #{$OPT_prefix}U_mean0-360_SON.png")

system("gpview U.nc@U,sig=0.1,time=700:789 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_sig0.1.ps && convert #{$OPT_prefix}U_sig0.1.ps #{$OPT_prefix}U_sig0.1_DJF.png")

system("gpview U.nc@U,sig=0.1,time=790:881 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_sig0.1.ps && convert #{$OPT_prefix}U_sig0.1.ps #{$OPT_prefix}U_sig0.1_MMA.png")

system("gpview U.nc@U,sig=0.1,time=882:973 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_sig0.1.ps && convert #{$OPT_prefix}U_sig0.1.ps #{$OPT_prefix}U_sig0.1_JJA.png")

system("gpview U.nc@U,sig=0.1,time=974:1064 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_sig0.1.ps && convert #{$OPT_prefix}U_sig0.1.ps #{$OPT_prefix}U_sig0.1_SON.png")


system("gpview U.nc@U,sig=0.077,time=700:789 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_sig0.077.ps && convert #{$OPT_prefix}U_sig0.077.ps #{$OPT_prefix}U_sig0.077_DJF.png")

system("gpview U.nc@U,sig=0.077,time=790:881 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_sig0.077.ps && convert #{$OPT_prefix}U_sig0.077.ps #{$OPT_prefix}U_sig0.077_MMA.png")

system("gpview U.nc@U,sig=0.077,time=882:973 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_sig0.077.ps && convert #{$OPT_prefix}U_sig0.077.ps #{$OPT_prefix}U_sig0.077_JJA.png")

system("gpview U.nc@U,sig=0.077,time=974:1064 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_sig0.077.ps && convert #{$OPT_prefix}U_sig0.077.ps #{$OPT_prefix}U_sig0.077_SON.png")


system("gpview U.nc@U,lat=0,time=700:789 --mean time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_lat0.ps && convert #{$OPT_prefix}U_lat0.ps #{$OPT_prefix}U_lat0_DJF.png")

system("gpview U.nc@U,lat=0,time=790:881 --mean time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_lat0.ps && convert #{$OPT_prefix}U_lat0.ps #{$OPT_prefix}U_lat0_MMA.png")

system("gpview U.nc@U,lat=0,time=882:973 --mean time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_lat0.ps && convert #{$OPT_prefix}U_lat0.ps #{$OPT_prefix}U_lat0_JJA.png")

system("gpview U.nc@U,lat=0,time=974:1064 --mean time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=-60:100 && dclpsrot dcl.ps > #{$OPT_prefix}U_lat0.ps && convert #{$OPT_prefix}U_lat0.ps #{$OPT_prefix}U_lat0_SON.png")


# 南北風
system("gpview V.nc@V,time=700:789 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=-50:50 && dclpsrot dcl.ps > #{$OPT_prefix}V_mean0-360.ps && convert #{$OPT_prefix}V_mean0-360.ps #{$OPT_prefix}V_mean0-360_DJF.png")

system("gpview V.nc@V,time=790:881 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=-50:50 && dclpsrot dcl.ps > #{$OPT_prefix}V_mean0-360.ps && convert #{$OPT_prefix}V_mean0-360.ps #{$OPT_prefix}V_mean0-360_MMA.png")

system("gpview V.nc@V,time=882:973 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=-50:50 && dclpsrot dcl.ps > #{$OPT_prefix}V_mean0-360.ps && convert #{$OPT_prefix}V_mean0-360.ps #{$OPT_prefix}V_mean0-360_JJA.png")

system("gpview V.nc@V,time=974:1064 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --sint=10 --range=-50:50 && dclpsrot dcl.ps > #{$OPT_prefix}V_mean0-360.ps && convert #{$OPT_prefix}V_mean0-360.ps #{$OPT_prefix}V_mean0-360_SON.png")


system("gpview V.nc@V,sig=0.1,time=700:789 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-50:50 && dclpsrot dcl.ps > #{$OPT_prefix}V_sig0.1.ps && convert #{$OPT_prefix}V_sig0.1.ps #{$OPT_prefix}V_sig0.1_DJF.png")

system("gpview V.nc@V,sig=0.1,time=790:881 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-50:50 && dclpsrot dcl.ps > #{$OPT_prefix}V_sig0.1.ps && convert #{$OPT_prefix}V_sig0.1.ps #{$OPT_prefix}V_sig0.1_MMA.png")

system("gpview V.nc@V,sig=0.1,time=882:973 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-50:50 && dclpsrot dcl.ps > #{$OPT_prefix}V_sig0.1.ps && convert #{$OPT_prefix}V_sig0.1.ps #{$OPT_prefix}V_sig0.1_JJA.png")

system("gpview V.nc@V,sig=0.1,time=974:1064 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-50:50 && dclpsrot dcl.ps > #{$OPT_prefix}V_sig0.1.ps && convert #{$OPT_prefix}V_sig0.1.ps #{$OPT_prefix}V_sig0.1_SON.png")


system("gpview V.nc@V,sig=0.077,time=700:789 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-50:50 && dclpsrot dcl.ps > #{$OPT_prefix}V_sig0.077.ps && convert #{$OPT_prefix}V_sig0.077.ps #{$OPT_prefix}V_sig0.077_DJF.png")

system("gpview V.nc@V,sig=0.077,time=790:881 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-50:50 && dclpsrot dcl.ps > #{$OPT_prefix}V_sig0.077.ps && convert #{$OPT_prefix}V_sig0.077.ps #{$OPT_prefix}V_sig0.077_MMA.png")

system("gpview V.nc@V,sig=0.077,time=882:973 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-50:50 && dclpsrot dcl.ps > #{$OPT_prefix}V_sig0.077.ps && convert #{$OPT_prefix}V_sig0.077.ps #{$OPT_prefix}V_sig0.077_JJA.png")

system("gpview V.nc@V,sig=0.077,time=974:1064 --mean time --wsn=#{wsn}  --noannotate --sint=10 --range=-50:50 && dclpsrot dcl.ps > #{$OPT_prefix}V_sig0.077.ps && convert #{$OPT_prefix}V_sig0.077.ps #{$OPT_prefix}V_sig0.077_SON.png")

# 鉛直風
system("gpview SigDot.nc@SigDot,time=700:789,sigm=1:0.0118 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --range=-1e-6:1e-6 && dclpsrot dcl.ps > #{$OPT_prefix}SigDot_mean0-360.ps && convert #{$OPT_prefix}SigDot_mean0-360.ps #{$OPT_prefix}SigDot_mean0-360_DJF.png")

system("gpview SigDot.nc@SigDot,time=790:881,sigm=1:0.0118 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --range=-1e-6:1e-6 && dclpsrot dcl.ps > #{$OPT_prefix}SigDot_mean0-360.ps && convert #{$OPT_prefix}SigDot_mean0-360.ps #{$OPT_prefix}SigDot_mean0-360_MMA.png")

system("gpview SigDot.nc@SigDot,time=882:973,sigm=1:0.0118 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --range=-1e-6:1e-6 && dclpsrot dcl.ps > #{$OPT_prefix}SigDot_mean0-360.ps && convert #{$OPT_prefix}SigDot_mean0-360.ps #{$OPT_prefix}SigDot_mean0-360_JJA.png")

system("gpview SigDot.nc@SigDot,time=974:1064,sigm=1:0.0118 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --range=-1e-6:1e-6 && dclpsrot dcl.ps > #{$OPT_prefix}SigDot_mean0-360.ps && convert #{$OPT_prefix}SigDot_mean0-360.ps #{$OPT_prefix}SigDot_mean0-360_SON.png")


system("gpview SigDot.nc@SigDot,sigm=0.1,time=700:789 --mean time --wsn=#{wsn}  --noannotate --range=-1e-6:1e-6 && dclpsrot dcl.ps > #{$OPT_prefix}SigDot_sig0.1.ps && convert #{$OPT_prefix}SigDot_sig0.1.ps #{$OPT_prefix}SigDot_sig0.1_DJF.png")

system("gpview SigDot.nc@SigDot,sigm=0.1,time=790:881 --mean time --wsn=#{wsn}  --noannotate --range=-1e-6:1e-6 && dclpsrot dcl.ps > #{$OPT_prefix}SigDot_sig0.1.ps && convert #{$OPT_prefix}SigDot_sig0.1.ps #{$OPT_prefix}SigDot_sig0.1_MMA.png")

system("gpview SigDot.nc@SigDot,sigm=0.1,time=882:973 --mean time --wsn=#{wsn}  --noannotate --range=-1e-6:1e-6 && dclpsrot dcl.ps > #{$OPT_prefix}SigDot_sig0.1.ps && convert #{$OPT_prefix}SigDot_sig0.1.ps #{$OPT_prefix}SigDot_sig0.1_JJA.png")

system("gpview SigDot.nc@SigDot,sigm=0.1,time=974:1064 --mean time --wsn=#{wsn}  --noannotate --range=-1e-6:1e-6 && dclpsrot dcl.ps > #{$OPT_prefix}SigDot_sig0.1.ps && convert #{$OPT_prefix}SigDot_sig0.1.ps #{$OPT_prefix}SigDot_sig0.1_SON.png")


system("gpview SigDot.nc@SigDot,sigm=0.077,time=700:789 --mean time --wsn=#{wsn}  --noannotate --range=-1e-6:1e-6 && dclpsrot dcl.ps > #{$OPT_prefix}SigDot_sig0.077.ps && convert #{$OPT_prefix}SigDot_sig0.077.ps #{$OPT_prefix}SigDot_sig0.077_DJF.png")

system("gpview SigDot.nc@SigDot,sigm=0.077,time=790:881 --mean time --wsn=#{wsn}  --noannotate --range=-1e-6:1e-6 && dclpsrot dcl.ps > #{$OPT_prefix}SigDot_sig0.077.ps && convert #{$OPT_prefix}SigDot_sig0.077.ps #{$OPT_prefix}SigDot_sig0.077_MMA.png")

system("gpview SigDot.nc@SigDot,sigm=0.077,time=882:973 --mean time --wsn=#{wsn}  --noannotate --range=-1e-6:1e-6 && dclpsrot dcl.ps > #{$OPT_prefix}SigDot_sig0.077.ps && convert #{$OPT_prefix}SigDot_sig0.077.ps #{$OPT_prefix}SigDot_sig0.077_JJA.png")

system("gpview SigDot.nc@SigDot,sigm=0.077,time=974:1064 --mean time --wsn=#{wsn}  --noannotate --range=-1e-6:1e-6 && dclpsrot dcl.ps > #{$OPT_prefix}SigDot_sig0.077.ps && convert #{$OPT_prefix}SigDot_sig0.077.ps #{$OPT_prefix}SigDot_sig0.077_SON.png")


# 比湿
system("gpview QVap.nc@QVap,time=700:789 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --range=1e-19:1e-2 && dclpsrot dcl.ps > #{$OPT_prefix}QVap_mean0-360.ps && convert #{$OPT_prefix}QVap_mean0-360.ps #{$OPT_prefix}QVap_mean0-360_DJF.png")

system("gpview QVap.nc@QVap,time=790:881 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --range=1e-19:1e-2 && dclpsrot dcl.ps > #{$OPT_prefix}QVap_mean0-360.ps && convert #{$OPT_prefix}QVap_mean0-360.ps #{$OPT_prefix}QVap_mean0-360_MMA.png")

system("gpview QVap.nc@QVap,time=882:973 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --range=1e-19:1e-2 && dclpsrot dcl.ps > #{$OPT_prefix}QVap_mean0-360.ps && convert #{$OPT_prefix}QVap_mean0-360.ps #{$OPT_prefix}QVap_mean0-360_JJA.png")

system("gpview QVap.nc@QVap,time=974:1064 --mean lon,time --wsn=#{wsn} --itr=2 --noannotate --range=1e-19:1e-2 && dclpsrot dcl.ps > #{$OPT_prefix}QVap_mean0-360.ps && convert #{$OPT_prefix}QVap_mean0-360.ps #{$OPT_prefix}QVap_mean0-360_SON.png")


system("gpview QVap.nc@QVap,sig=0.1,time=700:789 --mean time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}QVap_sig0.1.ps && convert #{$OPT_prefix}QVap_sig0.1.ps #{$OPT_prefix}QVap_sig0.1_DJF.png")

system("gpview QVap.nc@QVap,sig=0.1,time=790:881 --mean time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}QVap_sig0.1.ps && convert #{$OPT_prefix}QVap_sig0.1.ps #{$OPT_prefix}QVap_sig0.1_MMA.png")

system("gpview QVap.nc@QVap,sig=0.1,time=882:973 --mean time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}QVap_sig0.1.ps && convert #{$OPT_prefix}QVap_sig0.1.ps #{$OPT_prefix}QVap_sig0.1_JJA.png")

system("gpview QVap.nc@QVap,sig=0.1,time=974:1064 --mean time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}QVap_sig0.1.ps && convert #{$OPT_prefix}QVap_sig0.1.ps #{$OPT_prefix}QVap_sig0.1_SON.png")


system("gpview QVap.nc@QVap,sig=0.077,time=700:789 --mean time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}QVap_sig0.077.ps && convert #{$OPT_prefix}QVap_sig0.077.ps #{$OPT_prefix}QVap_sig0.077_DJF.png")

system("gpview QVap.nc@QVap,sig=0.077,time=790:881 --mean time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}QVap_sig0.077.ps && convert #{$OPT_prefix}QVap_sig0.077.ps #{$OPT_prefix}QVap_sig0.077_MMA.png")

system("gpview QVap.nc@QVap,sig=0.077,time=882:973 --mean time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}QVap_sig0.077.ps && convert #{$OPT_prefix}QVap_sig0.077.ps #{$OPT_prefix}QVap_sig0.077_JJA.png")

system("gpview QVap.nc@QVap,sig=0.077,time=974:1064 --mean time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}QVap_sig0.077.ps && convert #{$OPT_prefix}QVap_sig0.077.ps #{$OPT_prefix}QVap_sig0.077_SON.png")


system("gpview QVap.nc@QVap,lat=0,time=700:789 --mean time --wsn=#{wsn} --itr=2 --noannotate --range=1e-19:1e-2 && dclpsrot dcl.ps > #{$OPT_prefix}QVap_lat0.ps && convert #{$OPT_prefix}QVap_lat0.ps #{$OPT_prefix}QVap_lat0_DJF.png")

system("gpview QVap.nc@QVap,lat=0,time=790:881 --mean time --wsn=#{wsn} --itr=2 --noannotate --range=1e-19:1e-2 && dclpsrot dcl.ps > #{$OPT_prefix}QVap_lat0.ps && convert #{$OPT_prefix}QVap_lat0.ps #{$OPT_prefix}QVap_lat0_MMA.png")

system("gpview QVap.nc@QVap,lat=0,time=882:973 --mean time --wsn=#{wsn} --itr=2 --noannotate --range=1e-19:1e-2 && dclpsrot dcl.ps > #{$OPT_prefix}QVap_lat0.ps && convert #{$OPT_prefix}QVap_lat0.ps #{$OPT_prefix}QVap_lat0_JJA.png")

system("gpview QVap.nc@QVap,lat=0,time=974:1064 --mean time --wsn=#{wsn} --itr=2 --noannotate --range=1e-19:1e-2 && dclpsrot dcl.ps > #{$OPT_prefix}QVap_lat0.ps && convert #{$OPT_prefix}QVap_lat0.ps #{$OPT_prefix}QVap_lat0_SON.png")


# 雲水
system("gpview H2OLiq.nc@H2OLiq,time=700:789 --mean sig,time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}H2OLiq_sigmean.ps && convert #{$OPT_prefix}H2OLiq_sigmean.ps #{$OPT_prefix}H2OLiq_sigmean_DJF.png")

system("gpview H2OLiq.nc@H2OLiq,time=790:881 --mean sig,time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}H2OLiq_sigmean.ps && convert #{$OPT_prefix}H2OLiq_sigmean.ps #{$OPT_prefix}H2OLiq_sigmean_MMA.png")

system("gpview H2OLiq.nc@H2OLiq,time=882:973 --mean sig,time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}H2OLiq_sigmean.ps && convert #{$OPT_prefix}H2OLiq_sigmean.ps #{$OPT_prefix}H2OLiq_sigmean_JJA.png")

system("gpview H2OLiq.nc@H2OLiq,time=974:1064 --mean sig,time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}H2OLiq_sigmean.ps && convert #{$OPT_prefix}H2OLiq_sigmean.ps #{$OPT_prefix}H2OLiq_sigmean_SON.png")


system("gpview H2OLiq.nc@H2OLiq,time=700:789,lat=0 --mean time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}H2OLiq_lat0.ps && convert #{$OPT_prefix}H2OLiq_lat0.ps #{$OPT_prefix}H2OLiq_lat0_DJF.png")

system("gpview H2OLiq.nc@H2OLiq,time=790:881,lat=0 --mean time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}H2OLiq_lat0.ps && convert #{$OPT_prefix}H2OLiq_lat0.ps #{$OPT_prefix}H2OLiq_lat0_MMA.png")

system("gpview H2OLiq.nc@H2OLiq,time=882:973,lat=0 --mean time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}H2OLiq_lat0.ps && convert #{$OPT_prefix}H2OLiq_lat0.ps #{$OPT_prefix}H2OLiq_lat0_JJA.png")

system("gpview H2OLiq.nc@H2OLiq,time=974:1064,lat=0 --mean time --wsn=#{wsn}  --noannotate && dclpsrot dcl.ps > #{$OPT_prefix}H2OLiq_lat0.ps && convert #{$OPT_prefix}H2OLiq_lat0.ps #{$OPT_prefix}H2OLiq_lat0_SON.png")

# フラックス (緯度分布)
system("#{script_dir}/fig_heatfluxA-lat-dependence.rb --time_start=700 --time_end=789 --range=0:800 --lon=mean --wsn=#{wsn} && dclpsrot dcl.ps > #{$OPT_prefix}fluxes_lonmean.ps && convert #{$OPT_prefix}fluxes_lonmean.ps #{$OPT_prefix}fluxesA_lonmean_DJF.png")

system("#{script_dir}/fig_heatfluxA-lat-dependence.rb --time_start=790 --time_end=881 --range=0:800 --lon=mean --wsn=#{wsn} && dclpsrot dcl.ps > #{$OPT_prefix}fluxes_lonmean.ps && convert #{$OPT_prefix}fluxes_lonmean.ps #{$OPT_prefix}fluxesA_lonmean_MMA.png")

system("#{script_dir}/fig_heatfluxA-lat-dependence.rb --time_start=882 --time_end=973 --range=0:800 --lon=mean --wsn=#{wsn} && dclpsrot dcl.ps > #{$OPT_prefix}fluxes_lonmean.ps && convert #{$OPT_prefix}fluxes_lonmean.ps #{$OPT_prefix}fluxesA_lonmean_JJA.png")

system("#{script_dir}/fig_heatfluxA-lat-dependence.rb --time_start=974 --time_end=1064 --range=0:800 --lon=mean --wsn=#{wsn} && dclpsrot dcl.ps > #{$OPT_prefix}fluxes_lonmean.ps && convert #{$OPT_prefix}fluxes_lonmean.ps #{$OPT_prefix}fluxesA_lonmean_SON.png")


# 質量流線関数
system("#{script_dir}/mass_stream_func.rb V.nc V Ps.nc Ps --time_start=700 --time_end=789 --lon_start=0 --lon_end=360 --wsn=#{wsn} && dclpsrot dcl.ps > #{$OPT_prefix}StreamFunc0-360.ps && convert #{$OPT_prefix}StreamFunc0-360.ps #{$OPT_prefix}StreamFunc0-360_DJF.png")

system("#{script_dir}/mass_stream_func.rb V.nc V Ps.nc Ps --time_start=790 --time_end=881 --lon_start=0 --lon_end=360 --wsn=#{wsn} && dclpsrot dcl.ps > #{$OPT_prefix}StreamFunc0-360.ps && convert #{$OPT_prefix}StreamFunc0-360.ps #{$OPT_prefix}StreamFunc0-360_MMA.png")

system("#{script_dir}/mass_stream_func.rb V.nc V Ps.nc Ps --time_start=882 --time_end=973 --lon_start=0 --lon_end=360 --wsn=#{wsn} && dclpsrot dcl.ps > #{$OPT_prefix}StreamFunc0-360.ps && convert #{$OPT_prefix}StreamFunc0-360.ps #{$OPT_prefix}StreamFunc0-360_JJA.png")

system("#{script_dir}/mass_stream_func.rb V.nc V Ps.nc Ps --time_start=974 --time_end=1064 --lon_start=0 --lon_end=360 --wsn=#{wsn} && dclpsrot dcl.ps > #{$OPT_prefix}StreamFunc0-360.ps && convert #{$OPT_prefix}StreamFunc0-360.ps #{$OPT_prefix}StreamFunc0-360_SON.png")


