- 积分
- 116
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-11-28
- 最后登录
- 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/wrf/WRF_contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
indir1 = "/public/home/changshucheng/emission/htap_emis/res/test/"
indir2 = "/public/home/changshucheng/program/daniel/htap_maps/src/latlon/"
;----------------------------------------------------------------------
;model
;----------------------------------------------------------------------
char_len =(/4,2,2/)
infile1 = "res_1"
infile2 = "latlon.nc"
a = addfile(indir1+infile1+".nc","r")
b = addfile(indir2+infile2+".nc","r")
lat2d=b->LAT(0,0,:,:)
lon2d=b->LON(0,0,:,:)
dimll = dimsizes(lat2d)
nlat = dimll(0)
nlon = dimll(1)
model_data = wrf_user_getvar(a,"BC",0) ;;;;;;;;;;;;;;;;;;;;;
; model_data=model_data*1000000000000
val=model_data(0,:,:)
val!0= "lat"
val!1= "lon"
val@lat2d=lat2d
val@lon2d=lon2d
;----------------------------------------------------------------------
;plot
;----------------------------------------------------------------------
outfile = "NOx_10" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
wks = gsn_open_wks("png",outfile)
gsn_define_colormap(wks,"WhiteBlueGreenYellowRed")
colors = ispan(12,201,9)
;--------------------------------------------------------------
res = True
res@gsnDraw = False
res@gsnFrame = False
res@gsnMaximize = True
res@gsnAddCyclic = False
res@gsnPaperOrientation = "portrait"
;--------------------------------------------------------------
res@pmTickMarkDisplayMode = "Always"
res@mpLimitMode="LatLon"
res@mpCenterLonF=180
res@mpMinLonF=0
res@mpMaxLonF=360
res@mpMinLatF=-90
res@mpMaxLatF=90
res@mpPerimOn=True
res@mpFillOn = True
res@mpDataSetName = "Earth..4"
res@mpDataBaseVersion = "MediumRes" ;Low
res@mpLandFillColor = "Background"
; res@mpOutlineBoundarySets = "NoBoundaries"
; res@mpOutlineBoundarySets = "AllBoundaries" ; state boundaries "National" ;
res@mpOutlineBoundarySets = "National"
res@mpOutlineOn = True
; res@mpOutlineBoundarySets = "China:states"
; res@mpOutlineSpecifiers = (/"China:states","Taiwan"/)
res@mpGridAndLimbOn = False ; turn on lat/lon grid lines
res@mpGridLineDashPattern = 2
res@tmYROn = False
res@tmXTOn = False
;----------------------------------------------------------------------
; plot for Model Data
res@cnFillOn = True
res@cnLinesOn = False
res@cnLineLabelsOn = False
res@cnInfoLabelOn = False
res@cnConstFLabelOn = False
res@cnLevelSelectionMode = "ManualLevels"
res@cnLevelSpacingF = 1 ;;;;;;;;;;;;;;;;;;
res@cnMinLevelValF = 1 ;;;;;;;;;;;;;;;;
res@cnMaxLevelValF = 20 ;;;;;;;;;;;;;;
res@cnFillColors = colors
res@gsnSpreadColors = True
; plot for label
res@pmLabelBarDisplayMode = "Always"
res@pmLabelBarWidthF = 0.7
res@pmLabelBarHeightF = 0.05
res@lbAutoManage = False
; res@lbOrientation = "Vertical"
res@lbOrientation = "horizontal"
res@lbPerimOn = False
res@lbLabelStride = 1
res@lbLabelFontHeightF = 0.01
res@lbTitleOn = False
res@lbLabelPosition = "Bottom"
; res@gsnLeftString = "NMVOC~B~S~N~ (10~S~6~N~ mole/yr)"
res@gsnLeftString = "NO~B~X~N~ (10E-12 kg s-2 m-1)" ;;;;;;;;;;;;;;;;;;;;;;
; res@gsnLeftString = "BC (ton/yr)"
; res@gsnRightString = "ave (2013-2016)"
res@gsnRightStringFontHeightF = 0.
plot= gsn_csm_contour_map(wks,val,res)
;----------------------------------------------------------------------
draw(plot)
frame(wks)
;-------------------------------------------------------------------------------------
end
|
-
|