- 积分
- 362
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-2-25
- 最后登录
- 1970-1-1
|

楼主 |
发表于 2014-12-8 12:49:23
|
显示全部楼层
这是NCL的脚本
;----------------------------------------------------------------------
; NOTE: The second frame of this example will only work with
; NCL V6.1.0 and later.
;----------------------------------------------------------------------
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 in zonal winds
nlon = 91 ; YDEF
nlev = 19 ; XDEF
ntim = 1 ; time
;>==================================================================<
time =ispan(0,ntim-1,1) ; generate time
time!0 = "time"
time@long_name = "time"
time@units = "month"
;>==================================================================<
lev = ispan(0,nlev-1,1)*(-50.0) + 1000.0 ; generate lat/lon
lev!0 = "lon"
lev@long_name = "level"
lev@units ="hPa"
;>==================================================================<
lon = ispan(0,nlon-1,1)*2.0 - 90.0
lon!0 = "lon"
lon@long_name = "latitude"
lon@units ="degrees-north"
;>==============read the zonnal wind==================<
UNDEF = -1.0e+30 ; UNDEF
uw = new ( (/ntim,nlev,nlon/), float, UNDEF)
uw!0 = "time"
uw!1 = "lev"
uw!2 = "lon"
uw&time= time
uw&lev = lev
uw&lon = lon
uw@long_name = " " ; VARS
uw@units = " "
;>===================================================<
vw = new ( dimsizes(uw), typeof(uw), uw@_FillValue )
u1 = new ( dimsizes(uw), typeof(uw), uw@_FillValue )
ut = new ( dimsizes(uw), typeof(uw), uw@_FillValue )
wv = new ( dimsizes(uw), typeof(uw), uw@_FillValue )
vv = new ( dimsizes(uw), typeof(uw), uw@_FillValue )
copy_VarCoords(uw, wv )
copy_VarCoords(uw, vv )
;>===================================================================<
do nt=0,ntim-1
vv(nt,:,:) = fbindirread("D:\u.dat", nt, (/nlev,nlon/), "float")
wv(nt,:,:) = fbindirread("D:\w.dat", nt, (/nlev,nlon/), "float")
end do
wv = wv*(100)
;>===================================================================<
; Create plot
;>===================================================================<
wks = gsn_open_wks("png","/cygdrive/d/paper/20130911/figure/vertical-circulation-1")
;>==========Plot the First figure===============<
res = True
res@gsnDraw = False
res@gsnFrame = False
res@pmTickMarkDisplayMode = "Always" ; Turn on map tickmarks
res@cnLinesOn = False
res@cnLineLabelsOn = False
res@cnFillOn = True
res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
res@cnMinLevelValF = -1 ; set min contour level
res@cnMaxLevelValF = 1 ; set max contour level
res@cnLevelSpacingF = 0.2 ; set contour spacing
res@vcRefMagnitudeF = 2
res@vcRefLengthF = 0.05
res@vcRefAnnoOrthogonalPosF = -1.06
res@cnLinesOn = False
res@cnLineLabelsOn = False
res@cnFillOn = False
res@cnInfoLabelOn = False ; turn off contour label
;==========================================================================================
plot = gsn_csm_pres_hgt_vector(wks,wv(0,:,{0:60}),vv(0,:,{0:60}),wv(0,:,{0:60}),res)
draw(plot)
frame(wks)
end
|
|