[Thread Prev][Thread Next][Index]

Re: SCAT2GRIDGAUSS_YZ



Hi Sophie,
Billy gives good arguments for why you might not want to use one of the scat2grid_yz functions at all.  I just want to add that the way you're reading your data is the reason for the result being in i, y, and z (and it shows where we need to clarify the documentation.) Your data are lists of values on an I axis.  If you look at the function details

yes? show function SCAT2GRIDLAPLACE_YZ
SCAT2GRIDLAPLACE_YZ(YPTS,ZPTS,F,YAXPTS,ZAXPTS,CAY,NRNG)
    Use Laplace interpolation to grid scattered data to a YZ grid.
    YPTS: y-coordinates of scattered input triples
    ZPTS: z-coordinates of scattered input triples
    F: F(Y,Z) 3rd component of scattered input triples. May be fcn of X and/or T 
    YAXPTS: Y axis coordinates of a regular output grid
    ZAXPTS: Z axis coordinates of a regular output grid
    CAY: Interpolation parameter: CAY
    NRNG: Interpolation parameter: NRNG


You will see that the third argument "F(Y,Z) may be fcn of X and/or T".  This means that one could use the function to grid a whole set of Y-Z slices, at different values of X.  (or, think of a whole set of x-y planes at different Z levels with one of the scat2grid*xy functions).

If you do this problem with scat2gridgauss_yz, make the lat, depth, temp values be on a Y or Z axis.

let ylat = YSEQUENCE(lat)
let ydepth = YSEQUENCE(depth)
let ysalt = YSEQUENCE(salt)
let salinite
=SCAT2GRIDGAUSS_YZ(ylat,ydepth,ysalt,y[gy=yaxs],z[gz=zaxs],2,2,2,2)

Ansley

Sophie Cravatte wrote:
Dear Ferret users,

I can't figure out how to use the function SCAT2GRIDGAUSS_YZ to grid
scattered data to a YZ grid.
Here is my script:

define axis/y=20S:5S:1/units=degrees yaxs
define axis/z=0:500:1/units=meters/depth zaxs
SET DATA/EZ/var="lat,depth,temp,salt,o1,o2,dens" r165e.dat

let salinite
=SCAT2GRIDGAUSS_YZ(lat,depth,salt,y[gy=yaxs],z[gz=zaxs],2,2,2,2)

And instead of having a 2-D YZ field for salinite, I got a 3-D i,Y,Z
field, and of course with stupid values.
What's wrong in my script? What didn't I understand?

Thanks a lot for your help,

Sophie


  

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement