- 积分
- 535
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-10-10
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
相同的计算公式,相同的地图区域,为什么二者画出来的图差异很大,grads应该是对的,那么求教高手为什么ncl出问题了。(还有小问题,参考的别的高手的脚本,不明白#是什么意思,和*一样吗)
Grads脚本:
'reinit'
'open d:\study\data\201607\fnl_20160704_00_00.ctl'
'enable print d:\study\data\201607\fnl_20160704_00_00.gmf'
'set lat 20 55 '
'set lon 85 135'
'set lev 850'
'set grads off'
'set grid off'
'set mpdset cnworld'
#'set map 15 5 1'
#'draw map'
#'set cthick 9'
#'set xlopts 1 4 0.12'
#'set ylopts 1 4 0.12'
#'set cint 0.5'
'define prs=lev'
'define es=6.112*exp(17.67*(TMPprs-273.15)/(TMPprs-29.65))'
'define qs=0.622*es/(lev-0.278*es)'
'define q=RHprs*qs/100'
'define a=mag(UGRDprs,VGRDprs)'
'define g=9.8'
'set gxout shaded'
'set cmin 10'
'd a*q*1000/9.8'
'run cbarn.gs'
'set gxout contour'
'set ccolor 0'
'set cmin 6'
'd a*q*1000/9.8'
'print'
pull dummy
*t=t+1
*endwhile
'disable print'
Ncl脚本:
begin
files=systemfunc("ls *.grib2")
a=addfile(files(3),"r")
time=03
U=a->UGRD_P0_L100_GLL0
V=a->VGRD_P0_L100_GLL0
RH=a->RH_P0_L100_GLL0
TK=a->TMP_P0_L100_GLL0
T=TK-273.15
;lt=a->lv_ISBL0
;lr=a->lv_ISBL4
;print(lt)
;print(lr)
;lat=a->lat_0
;lon=a->lon_0
es=6.112*exp((17.67*T)/(T+243.5))
qs=0.622*es(25,:,:)/(850-0.278*es(25,:,:))
q=RH(25,:,:)*qs/100
v=sqrt(U(25,:,:)^2+V(25,:,:)^2)
Q=v*q*1000/9.8
Q@units="g/kg"
lat=fspan(90,-90,181)
lon=fspan(0,359,360)
lat@units="degrees_north"
lon@units="degrees_east"
RH!0="lat"
;q&lat=lat
RH!1="lon"
;q&lon=lon
wks=gsn_open_wks("x11","Qvapor_flux" + time)
;plot=new(6,graphic)
gsn_define_colormap(wks,"WhiteBlue")
;gsn_define_colormap(wks,"BlueRedGray")
res=True
res@gsnFrame=False
res@gsnDraw=False
;res@PanelPlot=True
res@cnLinesOn=False
res@cnLineLabelsOn=False
res@cnFillOn=True
res@cnLevelSelectionMode="ExplicitLevels"
;res@cnFillColors=(/18,34,50,66,82,98,114,130,146,162,178,194,210,226/)
res@cnLevels=(/6,8,10,12,14,16,18,20,22,24,26/)
res@gsnAddCyclic=False
res@tfDoNDCOverlay= True
res@mpAreaMaskingOn = True
;res@mpMaskAreaSpecifiers = (/"States"/)
res@mpDataBaseVersion = "MediumRes"
res@mpDataSetName = "Earth..4"
res@mpOutlineOn = True
res@mpOutlineSpecifiers = (/"china","jiangsu","anhui","shandong","henan","zhejiang",\
"jiangxi","hubei","fujian","shanxi","guangxi",\
"hunan","shanxi","guizhou","sichuan","gansu"/)
res@mpProvincialLineThicknessF = 1
res@mpProvincialLineColor="grey39"
res@mpGeophysicalLineThicknessF = 1
res@mpGeophysicalLineColor="grey39"
res@mpLimitMode= "Corners"
res@mpLeftCornerLatF = lat(70)
res@mpLeftCornerLonF = lon(85)
res@mpRightCornerLatF = lat(35)
res@mpRightCornerLonF = lon(135)
res@lbLabelBarOn=True
res@tmYROn=False
res@tmXTOn=False
res@tmXBOn=True
res@tmXBLabelsOn=True
res@tmXBMode="Explicit"
res@tmXBValues=(/85,90,95,100,105,110,115,120,125,130,135/)
res@tmXBLabels=(/"85E","90E","95E","100E","105E","110E","115E","120E","125E","130E","135E"/)
res@tmYLOn=True
res@tmYLLabelsOn=True
res@tmYLMode="Explicit"
res@tmYLValues=(/20,25,30,35,40,45,50,55/)
res@tmYLLabels=(/"20N","25N","30N","35N","40N","45N","50N","55N"/)
plot=gsn_csm_contour_map(wks,Q,res)
draw(wks)
frame(wks)
end
附图
|
-
grads
-
ncl
|