- 积分
- 801
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-3-31
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
ncl画出的图没有刻度,不知道哪里错了,请大神指点
;================================================;
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
;=================================================;
; open file and read in data
;=================================================;
fils1=systemfunc("ls /gpfssan1/home/outA_20100114.nc")
f1=addfile(fils1,"r")
region=f1->land
printVarSummary(region)
;===================================================;
;===================================================;
;===================================================;
;===================================================;
;================================================T
region!0="time"
region!1="lev"
region!2="x"
region!3="y"
region@long_name="landcover type"
region@units=" "
;=================================================;
; plot
;=================================================;
level=1
pngoutpath="region"
system("mkdir -p "+pngoutpath)
outname:="region/region_suzhou"
res =True
;------Tperature filled contour plot------------
wks=gsn_open_wks("png",outname)
gsn_define_colormap(wks,"seaice_2")
tf_res = res ; plot mods desired
tf_res@cnFillOn = True ; turn on color
; tf_res@cnFillMode = "RasterFill" ; Smooth raster contours
; tf_res@cnRasterSmoothingOn = True
tf_res@cnLinesOn = False
tf_res@cnLineLabelsOn = False
; tf_res@cnLevelSelectionMode="ExplicitLevels"
; tf_res@cnLevels =(/-0.7,-0.65,-0.6,-0.55,-0.5,-0.45,-0.4/)
tf_res@cnLevelSelectionMode ="ManualLevels"
tf_res@cnMinLevelValF =1
tf_res@cnMaxLevelValF =5
tf_res@cnLevelSpacingF =1
tf_res@gsnMaximize = True
tf_res@gsnBoxMargin = 0.0
tf_res@gsnStringFont ="times-bold"
tf_res@gsnStringFontHeightF =0.025
tf_res@gsnSpreadColors = True ; use full range of colormap
; tf_res@gsnSpreadColorStart = 2+30
; tf_res@gsnSpreadColorEnd = 52-102-2
; tf_res@gsnSpreadColorEnd = 102
tf_res@tmXBLabelFont = "times-bold"
tf_res@tmXBLabelFontHeightF = 0.025
tf_res@tmYLLabelFont = "times-bold"
tf_res@tmYLLabelFontHeightF = 0.025
tf_res@lbLabelFont = "times-bold"
tf_res@lbLabelFontHeightF = 0.02
tf_res@lbPerimOn =False
tf_res@lbOrientation = "Vertical"
;tf_res@lbLabelStride = 4
tf_res@lbBoxLinesOn =False
tf_res@lbLabelPosition = "right"
tf_res@tiXAxisString ="X (km)"
tf_res@tiXAxisFont = "times-bold"
tf_res@tiYAxisString ="Y (km)"
tf_res@tiYAxisFont = "times-bold"
tf_res@gsnDraw = False
tf_res@gsnFrame = False
; tf_res@gsnAddCyclic = False
tf_res@pmTickMarkDisplayMode = "Always"
tf_res@cnFillDrawOrder = "PreDraw"
tf_plot = gsn_csm_contour(wks,region(1,0,:,:),tf_res) ; contour the variable
;-------wind vector plot----------------------------
vec_res = res
vec_res@gsnLeftString =""
vec_res@gsnRightString =""
vec_res@gsnDraw = False
vec_res@gsnFrame = False
;------------------overlay
draw(tf_plot)
frame(wks)
end
|
|