[ncl-talk] Wind direction variable

isakhar sakhar isakhar isakhar.inside13 at gmail.com
Fri Sep 18 23:31:37 MDT 2015


Dear Mr.Alan and all

I just follow your link but I still get the error.
I use the script below inside my ncl_script;

              ; Wind direction at 10 Meters
               r2d = 45.0/atan(1.0)
               dir = atan2(u_plane,v_plane) * r2d + 180
               dir0 = dir(x,y)

And to print out I use the variable below but I get a strange output;

             +sprintf("%dir0", dir0) +"  " \


I will appreciate for any help or suggestion

Soares


On Sat, Sep 19, 2015 at 12:23 AM, Alan Brammer <abrammer at albany.edu> wrote:

> This isn't really an NCL question.  The answer depends entirely on your
> dataset.
>
> If you need to calc meteorological wind direction:
>
> https://www.ncl.ucar.edu/Document/Functions/Contributed/wind_direction.shtml
>
>
> Alan.
>
> On Fri, Sep 18, 2015 at 4:52 AM, isakhar sakhar isakhar <
> isakhar.inside13 at gmail.com> wrote:
>
>> Dear All
>>
>> So far I use a ncl script to print out variable for temperature,pressure,
>> humidity and wind speed in ASCII file.
>>
>>   print (sprintf("%5.0f",it)    +" " \
>>   +sprintf("%21.2f", T0(it)) +"  " \                ; for temperature
>>   +sprintf("%19.2f", P(it)) +"  " \                  ; for pressure
>>   +sprintf("%31.2f", rh0(it)) +"  " \               ; for humidity
>>   +sprintf("%23.2f", windspd0(it)) +"  " )      ; for wind speed
>>
>>
>> What variable should I use or add above to print out output for wind
>> direction ?
>>
>> Thank you in advance,
>>
>> Soares
>>
>> _______________________________________________
>> 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/20150919/1f202231/attachment.html 


More information about the ncl-talk mailing list