Re: about gsn_csm_pres_hgt_vector

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Oct 21 2013 - 09:21:47 MDT

Hi,

I'm using an answer posted by Dave Brown on a similar question:

The problem is that by default NCL maps the vector direction into the underlying coordinate space. This is good when drawing on a map projection, but for vertical plots where the two coordinate axes have different units that have very different numerical spacing between the coordinate values it leads to distortion. There is a simple fix, which is to set the resource vcMapDirection to False.

Let ncl-talk know if this solution doesn't work.

--Mary

On Oct 20, 2013, at 10:49 PM, 刘毓赟 <lyy@mail.iap.ac.cn> wrote:

>
>
> Deal all:
>
> I have a question about gsn_csm_pres_hgt_vector function.
>
> I plot the V wind and OMEGA in the lat_level plane. Here, the omega is magnified -100 times (as FIG.1). The script as this :
>
> ;************************************************
> 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
>
> f2 = addfile("/disk3/data/NCEP-2.5/monthly/pressure/vwnd.mon.mean.nc","r")
> f3 = addfile("/disk3/data/NCEP-2.5/monthly/pressure/omega.mon.mean.nc","r")
>
> vwnd1 = short2flt(f2->vwnd(7,0:11,{0:90},{95:110}))
> vwnd11 = dim_avg_n_Wrap(vwnd1,2)
> ; printVarSummary(vwnd11)
> omega1 = short2flt(f3->omega(7,0:11,{0:90},{95:110})) ;{45:20}
> omega11 = dim_avg_n_Wrap(omega1,2)
> w = -omega11*100.
> ; printVarSummary(omega11)
>
> wks = gsn_open_wks("eps","fig1")
>
> res = True
> res@cnLinesOn = False
> res@cnLineLabelsOn = False
> res@cnInfoLabelOn = False
> res@tmXTOn = False ; and right tickmarks.
> res@tmYROn = False
> res@vcRefMagnitudeF = 5.
> res@vcRefAnnoString1On = True
> res@vcRefAnnoString1 = "5m/s"
> res@vcRefAnnoOrthogonalPosF = -1
> res@vcRefAnnoString2On = False
> res@vcRefLengthF = 0.015
> res@vcGlyphStyle = "LineArrow"
> res@vcMinDistanceF = 0.008
>
> res@vpWidthF = 0.75
> res@vpHeightF = 0.6
> res@tiMainString = "1960-1978 MAM to JJA(1) meridional circulation"
> res@tiMainFontHeightF = 0.02
> res@gsnLeftString = ""
> res@gsnRightString = ""
> res@tiYAxisString = "p/hPa"
> res@tmYRMode = "Automatic"
> res@tmXBMode = "Explicit"
>
> plot = gsn_csm_pres_hgt_vector(wks,vwnd11,vwnd11,w,res)
>
> end
>
> However, I get the difference result by used GRADS.The omega is magnified 100 times (as FIG.2).
>
> We can see the vertical speed much smaller than horizontal velocity in the fig1, Specifically in the 60N-90N, there are scarcely upward and downward.
>
> In FIG2, in the 60-90N, there are downward clearly, and the omega is almost the same with the V-wind.
>
> If I plot the FIG as the omega is magnified -1000 times (as FIG.3), the picture is very similar as F IG2.
>
> My question is :
> 1) fig 1 and fig 2 is different by use the same data, why? which one is correct?
> 2) Did I need to magnified -1000 times in the vertical speed, when I use the gsn_csm_pres_hgt_vector function?
>
> Thanks.
>
>
>
>
>
>
>
>
> <FIG2.pdf><fig1.eps><fig3 .eps>_______________________________________________
> 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 Mon Oct 21 09:21:54 2013

This archive was generated by hypermail 2.1.8 : Tue Oct 22 2013 - 10:35:27 MDT