- 积分
- 169
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-12-13
- 最后登录
- 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/csm/contributed.ncl"
begin
;read data from four files
diri = "/home/liuzhe/fnl_data/"
fils = systemfunc("ls "+diri +"fnl_20110411*.grib2")
f = addfiles(fils ,"r")
ListSetType(f ,"join")
; u is U-component of wind
u = f[:]->UGRD_P0_L100_GLL0
;v is V-component of wind
v = f[:]->VGRD_P0_L100_GLL0
;r is rain
r = f[:]->PWAT_P0_L200_GLL0
; u is four demenion array, 1st is the number of the file in files , 2st is pa ,3st is lat ,4st is lo
u!1 = "lv"
u&lv = f[0]->UGRD_P0_L100_GLL0&lv_ISBL0
u!2 = "lat"
u&lat = f[0]->UGRD_P0_L100_GLL0&lat_0
u!3 = "lon"
u&lon =f[0]->UGRD_P0_L100_GLL0&lon_0
v!1 = "lv"
v&lv = f[0]->VGRD_P0_L100_GLL0&lv_ISBL0
v!2 = "lat"
v&lat = f[0]->VGRD_P0_L100_GLL0&lat_0
v!3 ="lon"
v&lon = f[0]->VGRD_P0_L100_GLL0&lon_0
r!1 ="lat"
r&lat = f[0]->PWAT_P0_L200_GLL0&lat_0
r!2 = "lon"
r&lon = f[0]->PWAT_P0_L200_GLL0&lon_0
u1 = dim_avg_n_Wrap(u(:,{72500},:,:),0) ; the average u-compont of wind in a day
v1 = dim_avg_n_Wrap(v(:,{72500},:,:),0) ; the average v-compont of wind in a day
r1 = dim_sum_n_Wrap(r(:,:,:), 0) ; the sum pridate of a day
; open workstation
wks = gsn_open_wks("ps","rainAndwind820")
gsn_define_colormap(wks,"gui_default")
res = True
res@mpLimitMode = "LatLon"
res@mpMinLatF = 35
res@mpMaxLatF = 38
res@mpMinLon = 138
res@mpMaxLon = 142
res@pmTickMarkDisplayMode = "always"
res@mpFillOn = False
res@mpOutlineDrawOrder = "PostDraw"
res@tfDoNDCOverlay = True
res@gsnAddCyclic =False
res@vcRefMagnitudeF = 0.0
res@vcRefLengthF = 0.45
res@vcGlyphStyle = "WindBarb"
res@vcMinDistanceF = 0.0
res@vcRefAnnoOrthogonalPosF = 1
res@gsnScalarContour = True
res@cnFillOn =True
res@cnLinesOn = False
plot = gsn_csm_vector_scalar_map(wks,u1,v1,r1 ,res)
end
|
-
绘出的图
|