- 积分
- 643
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-7-5
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
这是我用来读取wrfout.nc的脚本,time是240,层数有100层,但是每次读数据时40层后他就没数据了,但是我实在看不出哪里错了,请大家帮帮忙
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
f = addfile(“wrfout_d01_0001-01-01_00:00:00.nc","r")
w = wrf_user_getvar(f,"QRAIN",-1)
xlat = wrf_user_getvar(f,"XLAT",-1)
xlong = wrf_user_getvar(f,"XLONG",-1)
times = wrf_user_getvar(f,"times",-1)
ntimes = dimsizes(w(:,0,0,0))
wbt = dimsizes(w(0,:,0,0))
wsn = dimsizes(w(0,0,:,0))
wwe = dimsizes(w(0,0,0,:))
out = new((/wbt,ntimes/),"float",0)
do it = 0,ntimes-1
do bt = 0,wbt-1
chu = w(it,bt,0,0)
yy = 0
xx = 0
do sn = 0,wsn-1
do we = 0,wwe-1
if(w(it,bt,sn,we).gt.chu) then
chu = w(it,bt,sn,we)
yy = sn
xx = we
end if
end do
end do
out(bt,it)= w(it,bt,yy,xx)*1000
print(it)
end do
end do
print(out)
fmtf = ntimes + "f9.6"
opt = True
opt@fout= "qrain101.txt"
write_matrix(out,fmtf,opt)
end
|
|