[Thread Prev][Thread Next][Index]

Re: [ferret_users] scat2grid_nbin_xy using mode instead of mean



Hi Kamoru, 

The scat2grid_bin_xy function is described in the documentation here:
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/appendix-a-external-functions/scat2grid_bin_xy/?searchterm=scat2grid_bin_xy

As a side note, if you have a question, please start a separate thread so that the original question stays open. Also, check the documentation before posting.

To reiterate the question that I had:

I have scattered data that I want to interpolate to an XY grid, and I have done this using scat2grid_bin_xy which takes the mean of the values that lie within a grid cell. I need instead to use the most frequently-occuring value (i.e. the mode) within each grid cell instead. Is there a straightforward way to do this in ferret?

Thanks,
Nandini

Nandini Ramesh
PhD Candidate, 
Lamont-Doherty Earth Observatory
(nramesh@xxxxxxxxxxxxxxxxx)

On Fri, Feb 5, 2016 at 2:06 AM, Dr Kamoru Abiodun Lawal <lawal_ka@xxxxxxxxxxx> wrote:

Hi Nandini,

Can you please help me with your scat2grid_bin_xy script. I have been trying to grid some scattered data that needs to be interpolated onto an xy grid.

Thanks!

On 4 Feb 2016 21:25, Nandini Ramesh <the.nandini@xxxxxxxxx> wrote:
Hi, 

I have some scattered data that needs to be interpolated onto an xy grid. The simplest way to do this is to use scat2grid_bin_xy, which calculates the average of all of the values that fall within a particular gridbox. What I need is a very similar function that instead of calculating the mean, calculates the mode from my scattered data; i.e., I need the function to choose the most-repeated value that appears in each gridbox rather than the mean of all values that appear in each gridbox. This is because in this case, I am considering the most-repeated value at a particular location to be the best estimate, and all other values to be incorrect. I looked at the documentation, but wasn't able to figure out how to do this. Does anybody here know of a function that does this, or how to manipulate one of the scat2grid functions to get this result?

Thank you for your help!

Cheers,
Nandini

Nandini Ramesh
PhD Candidate, 
Lamont-Doherty Earth Observatory


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement