Hi all, Billy suggested a set of functions which return the number of scattered points that will fall in each grid cell of the output grid, if they are interpolated onto that grid with one of the SCAT2GRID functions. I've gone ahead and put together this set of functions. They'll be relased with future Ferret releases, but they're available as external functions which you can download now. A tar file containing these functions is linked to the "objective analysis" demo web page, at http://www.ferret.noaa.gov/Ferret/Demos/objective_analysis_demo/objective_analysis_demo.html#gridding_nobs_functions The functions are SCATGRID_NOBS_XY, SCATGRID_NOBS_YZ, etc. Briefly, they are called as follows: yes? LET a = SCATGRID_NOBS_XY(xpts, ypts, xout, yout) where xpts and ypts are the coordinates of the scattered points to be gridded, and xout and yout are variables which have the X and Y axes of the output grid. The result is on the xout, yout grid and at each x,y contains a count of the scattered points in that output grid cell. This count is independent of the gridding function that may be called in a separate step (Gaussian or Laplace method); it relates the set of scattered locations to the grid we will interpolate them onto. Ansley Hello Yogesh - First, I'm not exactly sure what you mean by "radius" in your example, since there is no such argument to the SCAT2GRIDGAUSS* functions. But I assume that you mean the arguments XSCALE and YSCALE, which control the width of the Gaussian function used to do the mapping. However, there is no direct way to implement your rule: SCAT2GRIDGAUSS will fill any gridbox that has the weight function W_n(x_n,y_n) = exp{-[(x_n-x_0)/XSCALE]^2 - [(y_n-y_0)/YSCALE]^2} greater than exp{-CUTOFF^2}. (See note re CUTOFF at bottom). In general, this will "spread" the observations over gridpoints that had no obs to begin with. We are implementing an additional external function that will count the number of obs/gridbox. If you need to get your answer today, then you could think about how to make a mask for your grid based on the number of obs in each gridbox, and use that to blank out gridpoints you don't want. Note re CUTOFF: CUTOFF should be a single number, not separate numbers for the x and y axes. This was a mistake when the fortran code was implemented as an external function. It will be fixed in a future release. IN the meantime, please use the same value for XCUTOFF and YCUTOFF. A good value is 2, which means that data points far enough away from the gridpoints so that the value of the weight function is less than exp{-4} = 0.018 will not be used in the calculation for that gridpoint. This will exclude data values more than twice the scale distances from each gridpoint. Billy KDate: Mon, 07 Feb 2005 12:44:10 +0100 From: "Yogesh K. Tiwari" <ktiwari@bgc-jena.mpg.de> To: ferret_users <oar.pmel.ferret_users@noaa.gov> Subject: radius and cutoff values in scat2gridgauss_xy command Hello Ferret Users, I could not understand exactly the meaning of cutoff and radius values in the scat2gridgauss* ferret command. I want to make a rule while griding my scattered data as, I required that there are at least 10 observations in a grid box 1x1 while using the scat2gridgauss_xy command. Whether my following radius and cutoff values are right for my above rule (10 obs in a grid). define symbol radius = 0.25 define symbol cutoff = 2.0 Many many thanks in advance for your help. Regards, Yogesh -- =========================================== Yogesh K. Tiwari, Max-Planck Institute for Biogeochemistry, Beutenberg Campus, Hans-Knoell-Strasse 10, D-07745 Jena, Germany Office : 0049 3641 576376 Home : 0049 3641 223163 Fax : 0049 3641 577300 Handy : 0049 173 698 8789 e-mail : yogesh.tiwari@bgc-jena.mpg.de =========================================== |