- 积分
- 6467
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-11-6
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
各位前辈,我刚学ncl,想试着画几张图,画的过程中遇到点问题想请教下大家,图如下,x轴的标签longitude和坐标重叠在一起了,y轴的就不会,这是什么原因?应该要怎么设置呢?脚本如下:(ps:填色部分太丑,大家不要见怪哈)
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/csm/shea_util.ncl"
begin
f=addfile("c:/hgt.2003.nc","r")
b=addfile("$NCARG_ROOT/lib/ncarg/data/cdf/landsea.nc","r")
hgt=short2flt(f->hgt(0,5,:,:))
oro=landsea_mask(b->LSMASK,hgt&lat,hgt&lon)
land_only=mask(hgt,oro.eq.0,False)
copy_VarMeta(hgt,land_only)
wks=gsn_open_wks("png","hgt")
gsn_define_colormap(wks,"rainbow")
hgt@units="dgam"
hgt&lon@units="degrees-east"
hgt&lat@units="degrees-north"
res=True
res@gsnAddCyclic=False
res@cnLevelSelectionMode="ManualLevels"
res@gsnMaximize=True
res@mpMinLatF=0
res@mpMaxLatF=90
res@mpMinLonF=40
res@mpMaxLonF=160
res@cnMinLevelValF=5000
res@cnMaxLevelValF=5880
res@cnLevelSpacingF=40
res@gsnSpreadColors=True
res@gsnSpreadColorStart=30
res@cnFillOn=True
res@cnLinesOn=False
res@lbBoxLinesOn=False
res@lbOrientation="Vertical"
res@tiMainString="500hpa"
res@tiXAxisString="longitude"
res@tiYAxisString="latitude"
res@gsnLeftString="hgt"
res@gsnCenterString=" "
res@tmXBLabelFontHeightF = 0.02
res@tmYLLabelFontHeightF = 0.02
plot=gsn_csm_contour_map(wks,land_only,res)
end
|
-
|