- 积分
- 4843
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2019-10-14
- 最后登录
- 1970-1-1
![[知道祢有多疼我] 粉丝数:74 微博数:21 新浪微博达人勋](source/plugin/sina_login/img/light.png)
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
请问,NCL中哪个选线可以使出的图更加清晰呢?此图是我在官网找的脚本画出来的。官网图片很清晰,我的就是这样。请问怎么调呢。
我的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/wrf/WRFUserARW.ncl"
begin
;---Rain data
f0 = addfile("wrfout_d04_2020-08-01_00:00:00","r")
Times = f0->Times
dims = dimsizes(Times)
RAINC = f0->RAINC(0,:,:)
RAINNC = f0->RAINNC(0,:,:)
RainTotal = RAINC(:,:)
;---Terrain data
fmap = addfile("wrfout_d04_2020-08-01_00:00:00","r")
HGT = fmap->HGT(0,:,:)
HGT =(/HGT/1000./)
;---Start the graphics
wks = gsn_open_wks("png" ,"WRF_pcp")
;---Set resources for terrain plot
res_ter = True ; plot mods desired
res_ter@gsnFrame = False
res_ter@gsnDraw = False
res_ter@cnFillOn = True ; color plot desired
res_ter@cnFillPalette = "gsltod" ; Select grayscale colormap
res_ter@cnLinesOn = False ; turn off contour lines
res_ter@cnLineLabelsOn = False ; turn off contour labels
res_ter@cnFillMode = "RasterFill"
res_ter@cnFillOpacityF = 1.
res_ter@lbLabelBarOn = False
res_ter@gsnRightString = ""
res_ter = wrf_map_resources(fmap, res_ter) ; set map resources to match those on WRF file
res_ter@tfDoNDCOverlay = True
res_ter@mpOutlineBoundarySets = "AllBoundaries"
res_ter@mpDataSetName = "Earth..4" ; Gives us provincial boundaries
res_ter@mpGeophysicalLineThicknessF = 1.5 ; thickness of map outlines
res_ter@mpProvincialLineThicknessF = 2.
res_ter@mpProvincialLineColor = "black"
res_ter@pmTickMarkDisplayMode = "Always" ; turn on nicer tickmarks
res_ter@tmXBLabelFontHeightF = 0.018
res_ter@tmYLLabelFontHeightF = 0.018
res_ter@tmYLLabelStride = 2 ; label every other tickmark
res_ter@tmXBLabelStride = 2
;---Point the tickmarks inward
res_ter@tmYRMajorOutwardLengthF = 0
res_ter@tmYLMajorOutwardLengthF = 0
res_ter@tmXBMajorOutwardLengthF = 0
res_ter@tmXBMinorOutwardLengthF = 0
res_ter@tmXTOn = True
res_ter@tmYROn = True
res_ter@tmYRLabelsOn = False
res_ter@tmXTLabelsOn = False
;---Set resources for rain total contour plot
res_tot = True
res_tot@gsnFrame = False
res_tot@gsnDraw = False
cmap := read_colormap_file("BlAqGrYeOrReVi200")
cmap(0,:) = (/0,0,0,0/) ; make first color fully transparent
res_tot@cnFillOn = True
res_tot@cnFillMode = "RasterFill"
res_tot@cnFillPalette = cmap
res_tot@cnLinesOn = False ; turn off contour lines
res_tot@cnLineLabelsOn = False ; turn off contour labels
res_tot@cnFillOpacityF = 1. ; .85
res_tot@tfDoNDCOverlay = True
res_tot@cnLevelSelectionMode = "ManualLevels"
res_tot@cnMaxLevelValF = 15
res_tot@cnMinLevelValF = 1
res_tot@cnLevelSpacingF = 1
res_tot@pmLabelBarHeightF = 0.08 ; Make labelbar less thick
res_tot@lbLabelFontHeightF = 0.014
res_tot@pmLabelBarOrthogonalPosF = -0.008
res_tot@cnInfoLabelOn = True
res_tot@cnInfoLabelString = "Min= $ZMN$ Max= $ZMX$"
res_tot@cnInfoLabelOrthogonalPosF = -0.104 ; move info label into plot
res_tot@tiMainFont = "Helvetica-bold"
res_tot@tiMainFontHeightF = 0.018
res_tot@gsnRightString = "RAIN, mm"
res_tot@gsnLeftString = ""
do ihour = 7,7 ; 0, dims(0)-2
istart = ihour
iend = ihour+1
RainTotal = (/(f0->RAINC(iend,:,:) + f0->RAINNC(iend,:,:) - \
(f0->RAINC(istart,:,:) + f0->RAINNC(istart,:,:)))/1. /)
res_tot@tiMainString = "hourly RAINC+RAINNC " +chartostring(f0->Times(iend,:))
plot_terrain = gsn_csm_contour_map(wks,HGT,res_ter)
plot_raintot = gsn_csm_contour(wks,RainTotal,res_tot)
overlay(plot_terrain, plot_raintot)
draw(plot_terrain)
frame(wks)
end do ; ihour
end
请各位懂的ncl的大哥大姐多多赐教
|
-
图一
|