- 积分
- 1831
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-5-6
- 最后登录
- 1970-1-1
|
GrADS
系统平台: |
linux |
问题截图: |
|
问题概况: |
原本plot,plot_vr可以顺利叠加,后来想加入降水量(降雨随时间变化的折线图),但是出图后原来的plot,plot_vr不再显示,只显示加入的折线图,并且折线图如下图所示,雨量一直上升(正常情况下雨量应该有波动才对)雨量一直上升感觉是把雨量叠加在了一起 |
我看过提问的智慧: |
看过 |
自己思考时长(天): |
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"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
begin
;************************************************
; variable and file handling
;************************************************
in = addfile("/home/zssapr/WRF3.5.1/20110710/data/wrf_data/wrfout_d02_2011-07-10_00:00:00","r")
rain_exp = wrf_user_getvar(in,"RAINNC",-1)
rain_con = wrf_user_getvar(in,"RAINC", -1)
rain_tot = new ( dimsizes(rain_exp), typeof(rain_exp), rain_exp@_FillValue )
dimp = dimsizes( rain_exp )
ntime = dimp(0)
rain_acc = new ( (/ntime/), typeof(rain_exp) )
copy_VarCoords(rain_exp, rain_tot)
rain_tot = rain_exp + rain_con
rain_tot@description = "Total Precipitation (inches)"
rain_acc = dim_sum_n_Wrap(rain_tot(:,:,:),(/1,2/))
resrain = True ; plot mods desired
resrain@tmYRLabelsOn = True ; turn on right axis labels
resrain@tmYUseLeft = False ; don' use any left settings
resrain@tmYRAutoPrecision = False ; no auto precision
resrain@tmYRPrecision = 4 ; set the precision
resrain@vpWidthF = 0.5 ; change aspect ratio of plot
resrain@vpHeightF = 0.3
U =in->U
ua = wrf_user_unstagger(U,U@stagger)
V = in->V
va = wrf_user_unstagger(V,V@stagger)
lat = in->XLAT(0,:,0)
lon = in->XLONG(0,0,:)
scale=1.e05
dv = new ( dimsizes(ua), typeof(ua), ua@_FillValue )
dv@units = "1.e05 1/s"
dv = (uv2dv_cfd (ua,va,lat,lon, 2))*scale
vr = new ( dimsizes(ua), typeof(ua), ua@_FillValue )
vr@long_name = "vorticity&divengence"
vr@units = "1.e05 1/s"
vr = (uv2vr_cfd (ua,va,lat,lon, 2))*scale
copy_VarCoords(ua, dv)
Dv = dim_avg_n_Wrap(dv(:, :, 18 : 36, 18 : 45), (/2, 3/))
copy_VarCoords(ua, vr)
Vr = dim_avg_n_Wrap(vr(:, :, 18 : 36, 18 : 45), (/2, 3/))
res = True
res@cnFillOn = True
res@cnLinesOn = False
res@gsnDraw = False ; do not draw the plot
res@gsnFrame = False ; do not advance the frame
res@vpWidthF = 0.5 ; change aspect ratio of plot
res@vpHeightF = 0.3
resvr = True
resvr@cnFillOn = False
resvr@cnLinesOn = True
resvr@cnLevelSelectionMode ="ExplicitLevels"
resvr@cnLevels =(/-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0/)
resvr@gsnDraw = False ; do not draw the plot
resvr@gsnFrame = False ; do not advance the frame
resvr@vpWidthF = 0.5 ; change aspect ratio of plot
resvr@vpHeightF = 0.3
wks = gsn_open_wks("ps","press_time3")
gsn_define_colormap(wks,"BlueWhiteOrangeRed")
plot = gsn_csm_contour(wks, Vr(bottom_top|:,Time|:),res)
plot_vr = gsn_csm_contour(wks, Dv(bottom_top|:,Time|:),resvr)
plot_rain = gsn_csm_y(wks, rain_acc,resrain)
overlay(plot,plot_vr)
overlay(plot,plot_rain)
draw(plot)
frame(wks)
end
|
|