Vector arrows for primary wave direction
Matthias Fripp
matthias.fripp at ECI.OX.AC.UK
Wed Nov 4 10:53:32 EST 2009
How about this:
set gxout vector
display cos(DIRPWsfc * 3.14159/180); sin(DIRPWsfc * 3.14159/180)
This converts the wave direction from degrees to radians, and then
calculates its u and v components.
Matthias
On Nov 4, 2009, at 2:38 PM, Nathan Cool wrote:
> Thanks, but I'm not trying to display "wind" vector arrows; instead,
> I'm trying to display the primary wave direction.
>
> The vars in the Grib are:
> ------------------------
> DIRPWsfc 0 107,1,1 ** surface Primary wave direction [deg]
> DIRSWsfc 0 109,1,1 ** surface Secondary wave direction [deg]
> HTSGWsfc 0 100,1,1 ** surface Sig height of wind waves and swell [m]
> PERPWsfc 0 108,1,1 ** surface Primary wave mean period [s]
> PERSWsfc 0 110,1,1 ** surface Secondary wave mean period [s]
> UGRDsfc 0 33,1,1 ** surface u wind [m/s]
> VGRDsfc 0 34,1,1 ** surface v wind [m/s]
> WDIRsfc 0 31,1,1 ** surface Wind direction [deg]
> WINDsfc 0 32,1,1 ** surface Wind speed [m/s]
> WVDIRsfc 0 101,1,1 ** surface Direction of wind waves [deg]
> WVPERsfc 0 103,1,1 ** surface Mean period of wind waves [s]
>
> ...and I can see that others have been able to show the primary wave
> direction (DIRPWsfc) using vector arrows, as is the case on the
> FNMOC models like this one:
> https://www.fnmoc.navy.mil/ww3_cgi/dynamic/ww3.w.npac.sig_wav_ht.000.gif
>
> Do you know how this can be done?
>
> Thanks,
>
> -Nathan
>
>
> On Tue, Nov 3, 2009 at 9:58 PM, sushant puranik <sushantpuranik at gmail.com
> > wrote:
> Hi
> I am able to generate wind direction. try his
> 'set arrscl 1 30'
> 'set cthick 5'
> 'set arrowhead 0.10'
> 'set clevs 3 5 10 15 20 25'
> 'set ccols 0 4 1 2 3 5 12'
> 'set gxout vector'
> 'd skip(UGRDsfc,2,2);skip(VGRDsfc,2,2);skip(sqrt(UGRDsfc*UGRDsfc
> +VGRDsfc*VGRDsfc),2,2)'
> 'run cbar.gs'
> 'printim wind(m/s)'
>
> with the help of such script i am able to generate output which is
> attached with this mail.
>
> all the best.
>
>
> On Tue, Nov 3, 2009 at 9:45 PM, Nathan Cool <nathan at nathancool.com>
> wrote:
> Good morning everyone,
>
> I'm generating wave analysis models, but I'm having a tough time
> showing the mean-wave (or primary) wave direction arrows.
>
> The vars in the Grib are:
> -------------------------------------------------
> DIRPWsfc 0 107,1,1 ** surface Primary wave direction [deg]
> DIRSWsfc 0 109,1,1 ** surface Secondary wave direction [deg]
> HTSGWsfc 0 100,1,1 ** surface Sig height of wind waves and swell [m]
> PERPWsfc 0 108,1,1 ** surface Primary wave mean period [s]
> PERSWsfc 0 110,1,1 ** surface Secondary wave mean period [s]
> UGRDsfc 0 33,1,1 ** surface u wind [m/s]
> VGRDsfc 0 34,1,1 ** surface v wind [m/s]
> WDIRsfc 0 31,1,1 ** surface Wind direction [deg]
> WINDsfc 0 32,1,1 ** surface Wind speed [m/s]
> WVDIRsfc 0 101,1,1 ** surface Direction of wind waves [deg]
> WVPERsfc 0 103,1,1 ** surface Mean period of wind waves [s]
>
> For displaying wind vector arrows it's straightforward as there are
> U and V variables (UGRDsfc and VGRDsfc) for the zonal and meridional
> components. Displaying primary wave direction though seems more
> elusive, yet I see it done on many models such as the following:
> https://www.fnmoc.navy.mil/ww3_cgi/dynamic/ww3.w.npac.sig_wav_ht.000.gif
>
> ...which was generated using GrADS by FNMOC.
>
> Any help you can provide would be greatly appreciated, and thank you
> for your time.
>
> --
> Nathan Cool
> nathan at nathancool.com
>
>
>
> --
> Sushant Puranik
> Junior Research Fellow
> Dept. of Atmospheric & Space Sciences,
> University of Pune,
> Pune-07,
> India.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20091104/53dd506a/attachment.html
More information about the gradsusr
mailing list