Re: Got Trouble in Vector map

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Wed Mar 21 2012 - 13:25:25 MDT

Hi Yikun,
Amending my previous email: It is possible to do calculations on short
arrays in NCL, but it is highly recommended that you unpack the data by
using short2flt before you perform any calculations. Adam

On 03/21/2012 01:15 PM, Adam Phillips wrote:
> Hi Yikun,
> You need to convert the u/v data arrays from type short to type float
> to be able to plot the arrays (or to perform calculations on them) in
> NCL.
>
> So change this:
> u = f1->uwnd(10,0,:,:)
> v = f2->vwnd(10,0,:,:)
> to this:
> u = short2flt(f1->uwnd(10,0,:,:) )
> v = short2flt(f2->vwnd(10,0,:,:))
>
> http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml
>
> Hope that helps. If not, or if you have further questions, please
> respond to ncl-talk..
> Adam
>
> On 03/21/2012 04:49 AM, yikun liu wrote:
>> Hi,
>>
>> I want to draw a vector map of wind. I read u-wind and v-wind from
>> two files separately, and use gsn_csm_vector to draw them. But the
>> graphic turned out to be only have one direction. How can I draw
>> vector map that uses u, v from different files?
>>
>> Thanks!
>>
>> Yikun
>>
>>
>> PS: the data I used is from NCEP-DOE Reanalysis 2 Pressures-Level
>> uwnd and vwnd
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> --
> ______________________________________________________________
> Adam Phillipsasphilli@ucar.edu
> NCAR/Climate and Global Dynamics Division (303) 497-1726
> P.O. Box 3000
> Boulder, CO 80307-3000http://www.cgd.ucar.edu/cas/asphilli
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 21 13:25:38 2012

This archive was generated by hypermail 2.1.8 : Tue Mar 27 2012 - 08:50:24 MDT