Vector arrows for primary wave direction
Arlindo da Silva
arlindo.dasilva at GMAIL.COM
Wed Nov 4 16:11:45 EST 2009
On Tue, Nov 3, 2009 at 11:15 AM, 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.
>
>
Given the direction you should be able to construct a vector of magnitude 1
pointing the direction of the wave, say
ga-> display cos(0.01745*WVDIRsfc);sin(0.01745*WVDIRsfc)
The factor 0.01745 is the conversion of deg to radians. (This assumes that
when the wave direction is 90 deg, the wave is going north).
Arlindo
--
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20091104/44d4746b/attachment.html
More information about the gradsusr
mailing list