[Thread Prev][Thread Next][Index]

Re: [ferret_users] Question about selecting specific data to plot in a histogram



Hi Anthony,

what you need to do is to make a new variable where the correct months are masked:

let evap_l=l[gt=evap]
let evap_djf=if mod(evap_l,12) le 2 then evap

the variable evap_djf should contain the evaporation only in the months that you need.
The histogram can then be plotted for the variable evap_djf.

For a specific location, you could use:

let evap_loc=evap_djf[x=74W,y=40N]

and make the histogram for this variable.

histograms for a part of your dataset could be done as follows with a REPEAT:

repeat/range=1:1198/name=cnt (let evap_part=evap[l=`cnt`:`cnt +2`@sum] ; .. [plot histogram] .. )

although I guess that you need to average the values (@ave instead of @sum), otherwise the values are 3 times larger. Or leave out the @-operator to get the histogram for three separate months plotted together.

Cheers,
John


On 31 May 2007, at 22:44, toine379@xxxxxxxxxxxxxxxx wrote:

My name: Anthony DeAngelis
Ferret version: 5.81
Accessing Ferret: Linux(g77) 2.4.21-32 - 07/13/05

I am a college student working with a professor this summer on a research project, and part of our research requires plotting histograms with a very specific data set. How do I select specific data points to include in a
histogram?

For example, I am using a data set which includes the variable evap, the surface evaporation rate, which depends on i, j, and l, where i: [1:144],
j: [1:90], and l: [1:1200].

I know how to make a simple histogram, but I do not know how to get the exact one I want from specific points along the l axis data. I want to make a histogram where I specify x and y by specific points, such as 74W and 40N, and for l, only plot points where l= 1,2,12,13,14,24,25,26, and so on up to 1200, following that pattern. Additionally, how would I plot
a histogram where I group parts of l together, such as l= 1:3@sum,
2:4@sum, 3:6@sum, etc up to 1200. I have attempted to do this by typing in a similar syntax but it does not work. I have tried to do this through
the repeat function, if/then statements, and other methods and I still
can't seem to get it.  I have searched the user's guide to find
information about this but still failed. Please show me how to do this or direct me to a specific place in the user's guide where this material is
covered.

Thank you for you help.





[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement