- 积分
- 625
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-9-18
- 最后登录
- 1970-1-1
|
发表于 2015-4-1 19:46:13
|
显示全部楼层
- 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"
- load "/gfs3/wutw/sunyue/ncl/cnmap/cnmap.ncl"
- ;===========================================================================================
- begin
-
- modelname = (/"Obs","MIROC4h","BCC-CSM1-1-m","EC-EARTH","MRI-CGCM3","HadGEM2-ES","IPSL-CM5A-MR",\
- "CNRM-CM5","MIROC5","INMCM4","FGOALS-s2","NorESM1-M","IPSL-CM5A-LR","GFDL-ESM2G",\
- "GFDL-ESM2M","GFDL-CM3","GISS-E2-R","BCC-CSM1-1","MIROC-ESM","MIROC-ESM-CHEM"/)
- nplot = dimsizes(modelname)
- wks = gsn_open_wks("eps","obs_model_annualpre_perday")
- plot = new(nplot,graphic)
- do i = 0, nplot-1
- modelfilepath = "/gfs3/wutw/sunyue/ncl/model/cmip5/" + modelname(i) +"_00-05_annual_pre_perday.nc"
- modelfile = addfile(modelfilepath,"r")
- prep = modelfile->pre
-
- gsn_define_colormap(wks,"WhiteBlueGreenYellowRed")
-
- res = True
- res@gsnDraw = False
- res@gsnFrame = False
-
- res@cnFillOn = True ; turn on color
- res@cnLinesOn = False ; no contour lines
- res@cnLineLabelsOn = False
- res@gsnSpreadColors = True ; use full color map
- res@gsnLeftString = modelname(i)
- res@gsnLeftStringFontHeightF = 0.03
- res@gsnAddCyclic = False
-
- res@cnInfoLabelOn = False ; Turn off info label.
- res@lbLabelBarOn = False
-
- res@cnLevelSelectionMode = "ManualLevels" ; manual levels
- res@cnMinLevelValF = 1
- res@cnMaxLevelValF = 12
- ; res@cnLevelSpacingF = 1
-
- res@tmXBLabelsOn = False ; no bottom labels
- res@tmXBOn = False ; no bottom tickmarks
- res@tmYRLabelsOn = False ; no right labels
- res@tmYROn = False ; no right tickmarks
- res@tmYLLabelsOn = False ; do not draw left labels
- res@tmYLOn = False ; no left tickmarks
- res@tmXTLabelsOn = False ; do not draw top labels
- res@tmXTOn = False ; no top tickmarks
- res@tmXBTickSpacingF = 10
- res@tmYLTickSpacingF = 10
- if(i%4.eq.0)
- res@tmYLOn = True
- res@tmYLLabelsOn = True
- res@tmYLLabelFontHeightF = 0.023
- else
- res@tmYLOn = False
- res@tmYLLabelsOn = False
- end if
- if(i.ge.16)
- res@tmXBLabelsOn = True
- res@tmXBOn = True
- res@tmXBLabelFontHeightF = 0.023
- else
- res@tmXBLabelsOn = False
- res@tmXBOn = False
- end if
- res@mpOutlineSpecifiers = (/"China","Taiwan"/)
- res@mpNationalLineColor = "Black"
- res@mpNationalLineThicknessF = 1
-
- res@mpMinLatF = 15 ; range to zoom in on
- res@mpMaxLatF = 50
- res@mpMinLonF = 70
- res@mpMaxLonF = 130
-
- cnres =True
- cnres@china =False
- cnres@river =True
- cnres@province =False
- cnres@nanhai =False
- cnres@diqu =False
-
-
-
- plot(i) = gsn_csm_contour_map_ce(wks,prep,res)
- chinamap = add_china_map(wks,plot(i),cnres)
- delete(prep)
- end do
- resp = True
- resp@gsnMaximize = True
- resp@gsnPanelLabelBar = True
- resp@lbLabelAutoStride = True ; optimal labels
- resp@lbLabelFontHeightF = 0.010
- resp@gsnPanelRowSpec = True
- resp@gsnAttachBorderOn = False
- resp@gsnPanelXWhiteSpacePercent = 0.25
- resp@gsnPanelYWhiteSpacePercent = 3
- resp@gsnPanelRight = 0.98
-
- gsn_panel(wks,plot,(/4,4,4,4,4/),resp)
- end
复制代码 |
|