- 积分
- 3925
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-4-12
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 腐朽的我Zero 于 2014-3-27 10:03 编辑
file:///C:\Program Files\TENCENT\QQ\Users\841719192\Image\~%ZTLJ$DS6HZ]GC}RLL$K_9.jpg
错误显示
不知道哪里错了!先谢了
;*************************************************
; WRF: near surface winds and total precipitation
;************************************************
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/WRF_contributed.ncl"
begin
;************************************************
; open file
; Read U10 and V10, Cumulus (rinc) and Non-cumulus (rainnc) prc
;************************************************
f = addfile ("wrfout_d01_2009-07-02_00:00:00.nc", "r")
o3 = f->o3
o3 = o3*1000
o3@units = "ppb"
o3@description ="o3"
u10 = f->U10 ; (Time, south_north, west_east)
v10 = f->V10
times = chartostring(f->Times) ; convert to type string [plot]
ntim = dimsizes(times) ; # time steps
;************************************************
; create plots: create colormap using named colors
;************************************************
wks = gsn_open_wks("pdf" ,"WRF_lc") ; ps,pdf,x11,ncgm,eps
colors = (/"white","black" \ ; {fore/back}ground
,"white","azure" \
,"green","palegreen","yellowgreen", "greenyellow" \
,"yellow","goldenrod","orange","orangered" \
,"red","deeppinK", "violet","darkviolet" \
,"blueviolet","blue" /)
gsn_define_colormap(wks, colors)
res = True ; plot mods desired
res@gsnMaximize = True ; maximize size
res@gsnSpreadColors = True ; use full range of colormap
res@gsnScalarContour = True ; contours desired
res@gsnLeftString = "Wind Vectors (m/s)"
res@gsnRightString = "so2 ppbv"
res@cnFillOn = True ; color plot desired
res@cnLinesOn = False ; turn off contour lines
res@cnLineLabelsOn = False ; turn off contour labels
res@cnFillMode = "RasterFill" ; raster
res@cnLevelSelectionMode = "ExplicitLevels" ; explicit [unequal] cn levels
res@cnLevels = (/0,0.1,1,2.5,5,7.5,10,15,20,25,37.5,50,75,100,125,150/)
res@vcGlyphStyle = "WindBarb"
res@vcRefLengthF = 0.025 ; ref vec length
res@vcMinDistanceF = 0.025 ; larger means sparser
res@vcWindBarbTickLengthF = 0.4 ; default 0.3
res@vcRefAnnoOn = False
res@mpGeophysicalLineThicknessF = 2.0
res@mpUSStateLineThicknessF = 2.0
;************************************************
; Use WRF_contributed procedure to set map resources
;************************************************
WRF_map_c(f, res, 0) ; reads info from file
;************************************************
; set True for native (direct) mapping (faster plotting)
; set False for non-native mappings
;************************************************
res@tfDoNDCOverlay = True
;************************************************
; associate the 2-dimensional coordinates to the variable for plotting
; only if not a native projection [ res@tfDoNDCOverlay=False ]
;************************************************
if (.not.res@tfDoNDCOverlay) then
lat2d = f->XLAT(0,:,:)
lon2d = f->XLONG(0,:,:)
u10@lat2d = lat2d
u10@lon2d = lon2d
v10@lat2d = lat2d
v10@lon2d = lon2d
o3@lat2d = lat2d
o3@lon2d = lon2d
end if
;****************************************************************************
; Plot one time and level for demo
; . create u and v on a common grid for visualization: nothing fancy
;****************************************************************************
nt = 12
;;do nt=0,ntim-1 ; uncomment to loop
res@tiMainString = times(nt)
plot = gsn_csm_vector_scalar_map(wks,u10(nt,:,:,:),v10(nt,:,:,:),o3(nt,:,:,:),res)
;;end do
end
|
|