- 积分
- 4284
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-11-14
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
刚学NCL,想用它做一个垂直剖面图,数据为WRFOUT数据。但是美好的事情一旦遇到了但是就不美好了,我垂直方向差值出现了问题,模式是35层,可我插值chu了100层。另外我想把垂直方向设为高度NCL,可以如何操作呢?希望大神指教!!!感激涕零脚本如下:
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
f = addfile("/nuist/scratch/Zl623/wrf31/WRFV3/test/em_real/wrfout_d04_2014-05-23_18:00:00.nc","r")
wks = gsn_open_wks("eps","weiwen")
times = wrf_user_getvar(f,"times",-1) ; get all times in the file
printVarSummary(times)
ntimes = dimsizes(times) ; number of times in the file
; Get variables
theta=wrf_user_getvar(f,"theta",37)
printVarSummary(theta)
z=wrf_user_getvar(f,"z",37)
printVarSummary(z)
lon=wrf_user_getvar(f,"XLONG",0)
lat=wrf_user_getvar(f,"XLAT",0)
;-------------------------------chazhi---------------------------------------
lat1 = 19.1
lon1 = 108.2
llres = True
llres@ReturnInt = True ; Return integer values
loc1ij = wrf_user_ll_to_ij(f, lon1, lat1, llres)
loc1ij = loc1ij-1 ; array pointers in NCL space
loc1X = loc1ij(0)
loc1Y = loc1ij(1)
delete(llres)
angle= 90
plane=(/loc1Y,loc1X/)
printVarSummary(plane)
opts=False
theta_plane=wrf_user_intrp3d(theta,z,"v",plane,angle,opts)
theta_plane!0="high"
;high@units="m"
theta_plane!1="lon"
;theta_plane&lon=lon
printVarSummary(theta_plane)
;print(theta_plane)
delete(opts)
;Set some basic resources
res = True
res@MainTitle = "REAL-TIME WRF"
res@TimeLabel = times(37)
res@Footer = False
pltres = True
;options for theta
opts= res
opts@cnLinesOn=True
opts@cnLineThicknessF=0.5
;-----------------------huatu-----------------------------------
contour=wrf_contour(f,wks,theta_plane,opts)
plot = wrf_overlays(f,wks,contour,pltres)
end
|
-
|