- 积分
- 325
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-9-22
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我用fortran计算了回归系数和f检验的值,用grads和ncl 画图,grads画的是对,等值线是通过显著性检验的区域,而ncl画出来就不对,所有区域均通过显著性检验(打点部分),但是我用ncl将f检验的值单独画也是对的,但是一叠加就不对了这是怎么回事
grads画的
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/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
;
;************************************************
begin
;读入全球slp数据,grd格式
hg = fbindirread("E:/kaiti/circulation/coldwave_huigui_NCEPsst_NCL/hg_annual54.grd",0,-1,"float")
fcheck = fbindirread("E:/kaiti/circulation/coldwave_huigui_NCEPsst_NCL/fcheck_annual54.grd",0,-1,"float")
hgg=onedtond(hg,(/180,360/))
fcheckk=onedtond(fcheck,(/180,360/))
;---------读入任意一个原始的nc文件(144*73格点的)-----------
indata2= addfile("E:/kaiti/circulation/coldwave_huigui_NCEPsst_NCL/sst.mon.mean.nc","r")
slpp= indata2->sst(0,::-1,:)
printVarSummary(slpp)
;--------把原始nc数据里的坐标变量信息给grd里面的变量(slp)-------
; hgg!0 = "lat"
; hgg&lat =slpp&lat
; hgg!1 = "lon"
; hgg&lon = slpp&lon
; hgg@_FillValue =-9.96921e+36
; hgg&lat@units="degrees_north"
; hgg&lon@units="degrees_east"
; printVarSummary(hgg)
copy_VarCoords(slpp,hgg)
; fcheckk!0 = "lat"
; fcheckk&lat =slpp&lat
; fcheckk!1 = "lon"
; fcheckk&lon = slpp&lon
; fcheckk@_FillValue =-9.96921e+36
; fcheckk&lat@units="degrees_north"
; fcheckk&lon@units="degrees_east"
printVarSummary(fcheckk)
copy_VarCoords(slpp,fcheckk)
;------------------------------画图(通过显著性区域的打点)-----------------------
res = True
res@mpMaxLatF = 80. ; specify the plot domain
res@mpMinLatF = -40. ;
res@mpMinLonF = 60 ;
res@mpMaxLonF = 300. ;
res@mpCenterLonF = 180. ;
wks = gsn_open_wks("ps","E:/kaiti/circulation/coldwave_huigui_NCEPsst_NCL/coldwave_huigui_sst")
;gsn_define_colormap(wks,"10colors(2)") ;用调色板输出色标
gsn_define_colormap(wks,"rainbow");默认的彩虹
;-----------回归系数画填色图--------
;-------------------底图填色(该设置一样要放在画图设置的最前面)----------------
res@mpFillOn = True
res@mpLandFillColor = "White"
res@cnMissingValFillColor = "White"
res@mpFillDrawOrder="PostDraw"
;-----------------------------------------------------------
res@mpOutlineOn = True ; turn the map outline on
res@gsnDraw = False ; do not draw the plot
res@gsnFrame = False ; do not advance the frame
;res@mpFillOn = True ;给底图填色,新版默认为灰色
;res@mpFillColor = "gray"
;res@cnLevelSelectionMode = "ExplicitLevels" ; set explicit contour levels
;res@cnLevels =(/-3.6,-3.2,-2.8,-2.4,-2,-1.6,-1.2,-0.8,-0.4,0,0.4,0.6,0.8,1.2,1.6,2/)
res@cnLevelSelectionMode = "Manuallevels"
res@cnMinLevelValF=-0.6
res@cnMaxLevelValF=0.8
res@cnLevelSpacingF=0.2
res@cnLineLabelsOn = False ; do not use line labels
res@cnFillOn = True ; color fill
res@cnLinesOn = False ; do not draw contour lines
;res@cnLevelSpacingF = 0.1
;res@cnFillPalette = "BlueDarkRed18"
res@tiMainString = "" ; 设置主标题
res@gsnLeftString = "" ; 设置左副标题
res@gsnRightString = "" ; 设置右副标题
plot1=gsn_csm_contour_map(wks,hgg,res) ; create the temperature plot
;------------通过检验的打点-----------------------------------
sres = True ; set up a second resource list
sres@gsnDraw = False ; do not draw the plot
sres@gsnFrame = False ; do not advance the frame
sres@cnLineLabelsOn = False ; do not use line labels
sres@cnFillOn =False ; color fill
sres@cnLinesOn = False ; do not draw contour lines
plot2=gsn_csm_contour(wks,fcheckk,sres)
plot2=ShadeGtContour(plot2,4.02,17); fillpattern=17 是打点的形状
; draw the temperature plot (with the U-wind plot overlaid)
overlay(plot1,plot2)
draw(plot1)
frame(wks)
end
|
|