[Thread Prev][Thread Next][Index]

[ferret_users] scat2grid_nbin_xy using mode instead of mean



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
(nramesh@xxxxxxxxxxxxxxxxx)

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

Privacy Policy | Disclaimer | Accessibility Statement