- 积分
- 14
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-9-16
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
运行下面的scripts, 出现错误 fatal:syntax error: line -1 before or near 求助该如何解决,新手求帮助
;***********************************************
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"
;***********************************************
begin
;***********************************************
a = addfile("./lustre/home/esechzh/models/WRFV3.7/run/wrfout_d03_2015-04-10_07:00:00","r")
; What times and how many time steps are in the data set?
times = wrf_user_getvar(a,"times",-1) ; get all times in the file
ntimes = dimsizes(times) ; number of times in the file
; The specific height levels that we want the data interpolated to.
height_levels = (/ 500., 2000./) ; height levels to plot - in meter
nlevels = dimsizes(height_levels) ; number of height levels
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; First get the variables we will need
tc = wrf_user_getvar(a,"tc",-1) ; T in C
u = wrf_user_getvar(a,"ua",-1) ; u averaged to mass points
v = wrf_user_getvar(a,"va",-1) ; v averaged to mass points
p = wrf_user_getvar(a, "pressure",-1) ; pressure is our vertical coordinate
rh = wrf_user_getvar(a,"rh",-1) ; relative humidity
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
do level = 0,nlevels-1 ; LOOP OVER LEVELS
height = height_levels(level)
p_plane = wrf_user_intrp3d( p,z,"h",height,0.,False)
tc_plane = wrf_user_intrp3d(tc,z,"h",height,0.,False)
rh_plane = wrf_user_intrp3d(rh,z,"h",height,0.,False)
u_plane = wrf_user_intrp3d( u,z,"h",height,0.,False)
v_plane = wrf_user_intrp3d( v,z,"h",height,0.,False)
end do
; Find the ij location for the point if interest
lat = 31
lon = 121
llres = True
llres@ReturnInt = True ; Return integer values
locij = wrf_user_ll_to_ij(a, lon, lat, llres)
locij = locij - 1 ; array pointers in NCL space
locX = locij(0)
locY = locij(1) |
|