[Thread Prev][Thread Next][Index]
Re: [ferret_users]wind frequency from zonal, meridional wind
It seems to me that you are trying to draw a windrose
If you google "ferret wind rose" you get the following thread
from the help archives.
http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2004/msg00770.html
Sincerely
Halldŕo
----- Original Message -----
From: "Peter Szabo" <szabpet83@xxxxxxxxx>
To: "ferret users" <ferret_users@xxxxxxxx>
Sent: Tuesday, 12 August, 2008 7:48:29 AM GMT +00:00 Casablanca / Monrovia
Subject: [ferret_users]wind frequency from zonal, meridional wind
Dear Ferreters,
I have daily data set. I want to visualize the most frequent wind direction for a region. I have u and v variables.
1. First i count the number of days belonging to (16) directions with "tan" function (N, NNE, NE, ENE...)
let ENE=if (u lt 0 and v lt 0) and (tan(u/v) le 0.6682) and (tan(u/v) gt 0.1989) then 1
let enedir=ene[l=@sum]
and so on...
2. Then i try to write out for every (lon-lat) point the frequency of the direction (actually the number of the most frequent direction):
repeat/j=1:61:1 (repeat/i=1:97:1 (let freq={`ndir`,`nnedir`,`nedir`,`enedir`,`edir`,`esedir`,`sedir`,`ssedir`,`sdir`,`sswdir`,`swdir`,`wswdir`,`wdir`,`wnwdir`,`nwdir`,`nnwdir`} ;\
let winddirmax=freq[x=@max]; let wind=freq[x=@loc:`winddirmax`];\
save/file="./ winddir.6190.nc "/ilimits=1:97/jlimits=1:61/i=`i`/j=`j`/clobber wind))
It works, it says:
!-> REPEAT: I=63
!-> DEFINE VARIABLE freq={28,12,16,28,165,78,75,47,29,10,21,38,221,82,83,67}
!-> DEFINE VARIABLE wind=freq[x=@loc:221]
!-> LIST/FORMAT=CDF/file="..."/ilimits=1:97/jlimits=1:61/i=63/j=1/append/clobber wind
listing to file ...
But as for the output file, it seems, it didnt work:
yes? use ...
name title I J K L
WIND FREQ[X=@LOC:221] ... ... ... ...
yes? list wind
VARIABLE : FREQ[X=@LOC:221]
FILENAME : winddir.6190.nc
FILEPATH : /home/szabop/aladin_arpege/
13.00
Any suggestion will be appreciated (either in solving the technical problem). Thanks a lot,
Peter szabo
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement