您好,登录后才能下订单哦!
密码登录
            
            
            
            
        登录注册
            
            
            
        点击 登录注册 即表示同意《亿速云用户服务条款》
        这篇文章主要介绍“NCL常用统计学函数怎么用”,在日常操作中,相信很多人在NCL常用统计学函数怎么用问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”NCL常用统计学函数怎么用”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
undef("draw_eof_plot")procedure draw_eof_plot(dir_plot,file_plot,type_plot,x,year,neof)begin;--EOF analysisoptEof = Trueeof = eofunc_Wrap( x, neof, optEof)eof_ts = eofunc_ts_Wrap( x, eof, False)lat = x&latlon = x&lon;--Begin plotting section.wks = gsn_open_wks(type_plot,dir_plot+file_plot) ; Opens a ps filegsn_define_colormap(wks,"rainbow")plot = new(neof,graphic)res = True ; plot mods desired;************************************************; original data;************************************************res@gsnDraw = False ; don't draw yetres@gsnFrame = False ; don't advance frame yetres@gsnAddCyclic = False;--map plot resourcesres@mpFillOn = False ; no grey continentsres@mpCenterLonF = 180.res@mpDataBaseVersion = "MediumRes" ; or "Ncarg4_1"res@mpDataSetName="Earth..4"res@mpOutlineSpecifiers=(/"China:states","Taiwan"/)res@mpOutlineBoundarySets = "AllBoundaries"res@mpMinLatF = min(lat) ; range to zoom in onres@mpMaxLatF = max(lat)res@mpMinLonF = min(lon)res@mpMaxLonF = max(lon);--contour resourcesres@cnFillOn = True ; turn on contour fillres@cnLineLabelsOn = False ; turn off contourres@cnLinesOn = False ; add countor or not,True is defaultres@gsnLeftString = " "res@gsnRightString = " ";--tickmark resourcesres@tmXTOn = Falseres@tmYROn = Falseres@tmYLLabelFontHeightF =0.02res@tmXBLabelFontHeightF =0.018res@tmXTOn = Falseres@tmYROn = False;--labelbar resourcesres@lbLabelBarOn = Falseres@lbLabelFontHeightF = 0.02res@lbOrientation = "Vertical" ; vertical label barsymMinMaxPlt(eof, 16, False, res); contributed.ncl; panel plot only resourcesresP = True ; modify the panel plotresP@gsnMaximize = True ; large formatresP@gsnPanelLabelBar = True ; add common colorbarresP@txString = "EOF"do n=0,neof-1res@gsnLeftString = " EOF "+(n+1)res@gsnRightString = sprintf("%5.1f", eof@pcvar(n)) +"%"plot(n) = gsn_csm_contour_map(wks,eof(n,:,:),res)end dogsn_panel(wks,plot,(/neof/1,2/),resP) ; draw all 'neof' as one plot;*******************************************; time series (principal component) plot;*******************************************eof_ts@long_name = "Amplitude"rts = Truerts@gsnDraw = False ; don't draw yetrts@gsnFrame = False ; don't advance frame yet; decide exactly where on the page to draw it.rts@vpHeightF = 0.40 ; Changes the aspect ratiorts@vpWidthF = 0.85rts@vpXF = 0.10 ; change start locationsrts@vpYF = 0.75 ; the plotrts@gsnYRefLine = 0. ; reference linerts@gsnAboveYRefLineColor = "red" ; above ref line fill redrts@gsnBelowYRefLineColor = "blue" ; below ref line fill blue; panel plot only resourcesrtsP = True ; modify the panel plotrtsP@gsnMaximize = True ; large formatrtsP@txString = "EOF"do n=0,neof-1rts@gsnLeftString = " EOF "+(n+1)rts@gsnRightString = sprintf("%5.1f", eof@pcvar(n)) +"%"plot(n) = gsn_csm_xy (wks,year,eof_ts(n,:),rts)end dogsn_panel(wks,plot,(/neof/1,2/),rtsP) ; draw all 'neof' as one plotend
到此,关于“NCL常用统计学函数怎么用”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注亿速云网站,小编会继续努力为大家带来更多实用的文章!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。