[ncl-talk] Wrong with overlaying wind vectors on contour plots (X-axis is Longtitude and Y-axis is Pressue(Height))
Mary Haley
haley at ucar.edu
Mon Jul 31 11:46:59 MDT 2017
I'm going through old emails and noticed I hadn't responded to this one.
I think what you're doing is okay. You generally want to set vcMapDirection
to False if you are not generating vectors over a map.
--Mary
On Tue, Jul 18, 2017 at 9:23 PM, Zhu CE <lovingzhuce at 163.com> wrote:
> Yes, I meant to plot UGRD and WGRD in *gsn_csm_vector* call.
>
> The reason why I multiplied the return value of omega_to_w by 10 is the W
> is so small and I wanted to make W equaled to U so the wind vectors looked
> normally.
>
> However, when I try to set *res at vcMapDirection = False*, everthing seems
> OK.
>
> *Are there any mistakes I had done in those attemps? Please tell me,
> thanks a lot.*
>
>
>
>
>
> At 2017-07-10 21:05:51, "Mary Haley" <haley at ucar.edu> wrote:
>
> Did you mean to plot UGRD and WGRD in your gsn_csm_vector call? If so,
> the issue may be either with your data or "omega_to_w".
>
> Why are you multiplying the return value of omega_to_w by 10?
>
> WGRD = omega_to_w(VVEL_P0,pres,TMP_P0(10:30,:,:))*10
>
> Please read the documentation for omega_to_w closely to make sure you are
> inputting the correct parameters with the correct expected units:
>
> http://www.ncl.ucar.edu/Document/Functions/Contributed/omega_to_w.shtml
>
> If you look the code for "omega_to_w", which is in $NCARG_ROOT/lib/ncarg/
> nclscripts/csm/contributed.ncl, the calculation is simply:
>
> RGAS = 287.058 ; J/(kg-K) => m2/(s2 K) GRAV
> = 9.80665 ; m/s2 rho =
> p/(RGAS*t) ; density => kg/m3 w =
> -omega/(rho*GRAV) ; array operation
>
> If you continue to have problems, please back to ncl-talk.
>
> Thank you,
>
> --Mary
>
>
> On Fri, Jul 7, 2017 at 11:16 PM, Zhu CE <lovingzhuce at 163.com> wrote:
>
>> Hi everyone,
>>
>> I am trying to draw plots which overlay wind vectors on contour plots.
>>
>> Here, the X-axis is Longtitude and Y-axis is Pressue(Height).
>>
>> When I used* wplot1 =
>> gsn_csm_vector(wks,UGRD(:,232,:),WGRD(:,232,:),resV)* and
>> *overlay(plot1,wplot1)* to draw plot, a wrong figure I have gotten, only
>> U-wind was drawn and no W-wind was drawn.
>>
>> What did I do wrong? Could you help me? Thanks a lot.
>>
>> P.S. Attachments are NCL script and the wrong figure.
>>
>> Zhu
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170731/d0698ea3/attachment.html
More information about the ncl-talk
mailing list