Hi Jagadish, Welcome to Ferret! Your commands for ZAXREPLACE look correct. I have just a few comments: In the DEFINE AXIS command we normally use /Z=lo:hi:delta The /DEPTH qualifier is the element of the command that tells Ferret that the axis is positive downwards. Ferret will take the arguments /Z=1000:0:25 and use them as if you had said /Z=0:1000:25. The expression tk*0.0 is a variable with the same grid as tk but with value 0. So adding the term tk*0.0 in the definition of variable pk forces pk to have the same shape and size as tk. This topic is discussed in the Users Guide in Chapter 3, section 2.2 "Multi-dimensional Expressions" which you can find by looking up "conformability" in the index. I don't know quite what you mean in your question about the averaging. Do you want to take a collection of x-y locations and find the average of a variable at those points? (If so then the term would be points rather than grids.) You can use the SAMPLEXY function to find the value of a variable at a set of points: ! First define the x and y locations as lists of values (constant arrays) ! Variable xpts is all of the x coordinates, ypts is the y coordinates yes? let xpts = {37, 37, 38, 38} yes? let ypts = {36, 37, 35, 36} ! SAMPLEXY the variable "var" at the locations defined by xpts and ypts ! The output of SAMPLEXY is a list on an abstract X axis, one for ! each element of xpts and ypts. You can average this result in X to ! get the average over the list of points. yes? let varpts = SAMPLEXY(var, xpts, ypts) yes? let var_avg = varpts[x=@ave] var_avg will have the same grid in Z and T as the input variable var. Ansley Manke jagadish karmacharya wrote:
|