Re: FW: clmMeanTLL assignment type mismatch error.

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu, 12 Feb 2009 07:33:17 -0700

Always look at your data prior to processing.
The NCEP data you have is of type "short".
It must be unpacked prior to use.

u1=short2flt(uw->uwnd(276:635,5,:,:))

http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml

Good luck
toimoi wrote:
>
>
> ------------------------------------------------------------------------
> From: atoiamoi_at_live.cn
> To: ncl-talk_at_ucar.edu
> Subject: clmMeanTLL assignment type mismatch error.
> Date: Thu, 12 Feb 2009 12:27:36 +0800
>
> hi all!
>
> I use clmMeanTLL function to compute long term mean of uwind
> and vwind from 1971-2000 with ncep reanalysis
> data-uwnd(vwnd).mon.mean.nc ,but get assignment type mismatch error. The
> script is:
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> begin
>
> uw=addfile("/home/zyz/data/uwnd.mon.mean.nc","r")
> ;1000,925,850,700,600,500,400,300,250,200,150,100,70,50,30,20,10
> u1=uw->uwnd(276:635,5,:,:)
> uave=clmMonTLL(u1)
> ;printVarSummary(clmMonTLL(u1))
>
> vw=addfile("/home/zyz/data/vwnd.mon.mean.nc","r")
> ;1000,925,850,700,600,500,400,300,250,200,150,100,70,50,30,20,10
> v1=vw->vwnd(276:635,5,:,:)
> vave = clmMonTLL(v1 )
>
> u 08=uw->uwnd(720:731,5,:,:)
> v08=vw->vwnd(720:731,5,:,:)
> uanom=u08-uave
> vanom=v08-vave
>
> copy_VarCoords(u08,uanom)
> copy_VarCoords(v08,vanom)
> wks = gsn_open_wks("x11","0812_500wnd_anom") ; open an ps plot
> gsn_define_colormap(wks,"BlAqGrYeOrReVi200")
>
> res = True
>
> res_at_lbOrientation <mailto:res_at_lbOrientation> =
> "Vertical" ; vertical label bar
> res_at_lbLabelAutoStride <mailto:res_at_lbLabelAutoStride> =
> True &nb sp; ; optimal label stride
> res_at_gsnSpreadColors <mailto:res_at_gsnSpreadColors> =
> True ; use full range of colors
> res_at_gsnSpreadColorEnd <mailto:res_at_gsnSpreadColorEnd> =
> -3 ; don't use added gray
> ;res_at_cnFillOn = True ; turn on color fill
> res_at_mpFillOn <mailto:res_at_mpFillOn> = False
> ; turn off continent gray
>
> ;res @cnLevelSelectionMode = "ManualLevels"
> ;res_at_cnLevelSpacingF = 2.
>
> ;res_at_vcGlyphStyle = "WindBarb" ; choose wind barbs
> ;res_at_vcMonoWindBarbColor = False ; color barbs by scalar
> ;res_at_vcMinDistanceF = 0.025 ; thin out windbarbs
>
> plot=gsn_csm_vector_map_ce(wks,uanom,vanom,res)
> end
>
> who can give a clue how to solve the problem?
> ; Thanks
>
> ------------------------------------------------------------------------
> 使用新一代 Windows Live Messenger 轻松交流和共享! 立刻下载!
> <http://im.live.cn/messenger.aspx>
> ------------------------------------------------------------------------
> 你和你的爱人都去过哪里?快来微软地图一起绘制爱的地图吧! 立即查看!
> <http://ditu.live.com/?form=MICHAJ >
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 12 2009 - 07:33:17 MST

This archive was generated by hypermail 2.2.0 : Thu Feb 12 2009 - 10:16:44 MST