- 积分
- 1796
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-12-11
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我通过插值函数把它插出各个高度,然后我想把各个高度的温度数值度出来,但写出来后缺测值那都是********** 不知道怎么弄
想向大家请教下
下面是我的代码
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/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
a = addfile("wrfout_d03_2012-11-04_07:00:00","r")
time = -1
y1=0
y2=185
y3=186
x1=0
x2=254
x3=255
tc = wrf_user_getvar(a,"tc",time) ; T [C]
p = wrf_user_getvar(a,"pressure",time) ; total pressure
; The specific pressure levels that we want the data interpolated to.
pressure_levels = (/900.,875.,850.,825.,800.,775.,750.,700.,650.,600.,550.,500.,450.,400.,350.,300.,250.,200.,150.,100./) ; pressure levels to plot
nlevels = dimsizes(pressure_levels) ; number of pressure levels
do level = 0,nlevels-1 ; LOOP OVER LEVELS
pressure = pressure_levels(level)
tc_plane = wrf_user_intrp3d(tc,p,"h",pressure,0.,False)
if ( pressure .eq. 900) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-900.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 875 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-875.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 850 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-850.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 825 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-825.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 800 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-800.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 775 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-775.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 750 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-750.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 700 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-700.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 650 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-650.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 600 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-600.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 550 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-550.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 500 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-500.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 450 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-450.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 400 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-400.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 350 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-350.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 300 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-300.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 250 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-250.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 200 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-200.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 150 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-150.txt"
write_matrix (f2, fmtf, opt)
end if
if ( pressure .eq. 100 ) then
f=tc_plane(:,y1:y2,x1:x2)
f2=onedtond(f,(/y3,x3/))
fmtf = "255f7.2"
opt=True
opt@fout = "D02-100.txt"
write_matrix (f2, fmtf, opt)
end if
end do
end
|
|