Re: Contouring from a staggered grid.

From: Dave Kennison (kennison@XXXXXX)
Date: Fri Apr 26 1996 - 10:10:42 MDT


> From: alec@crg.bpb.wits.ac.za
> Subject: Re: Contouring from a staggered grid.
>
> Dear Dave
>
> Thanks very much for the code. I follow at least the gist of what the program
> does. One problem and one query...
> Problem - in the CPMPXY subroutine, my version of NG does not seem to find
> either MAPTRI or ICFELL, and so cannot deal with EZMAP data as it stands
> in the code. I commented them out to get the staggered grid working. Are there
> alternatives?
> Question - can I treat no-gridded data as a staggered grid or do I need other
> interpolation routines?
>
> Thanks again for the help.
>
> Alec
        
Ah, yes, I forgot ... Neither ICFELL nor MAPTRI existed in 3.1.1. ICFELL
is a new function (the name stands for "I Check For Error at Lower Level")
in the new error-handling code in the utilities. MAPTRI is the EZMAP
routine that does inverse map transformations. Commenting out the code
that uses these is the appropriate thing to do for your purposes, but if
you get a more recent version of NCAR Graphics and use the CPMPXY I sent
you, you should uncomment the code again.

In general, un-gridded data cannot be handled in the same way. It is
possible to handle a grid that looks like this:

   * * * * * * * * * *
                                       *
               * *
    * * * * * * * * *

                * * *
   * * * * * * * *

    * * * * *
                    * * * * * *

(basically, a deformed rectangular grid; in this case, with a sort of random
perturbation in the positions of the points). The grid shown above can be
handled by giving CONPACK an 11x4 array of data and using a version of CPMPXY
that maps the regular grid into the perturbed grid; that version of CPMPXY
would have available to it two 11x4 arrays, call them XPOS and YPOS; for a
pair of subscripts I and J, the mapped position of the grid point identified
by "(I,J)" is given by "(XPOS(I,J),YPOS(I,J))"; simple bilinear interpolation
is used to map intermediate positions of the grid. If this would be of any
value to you, I can send you an example, but generally, the use of such a
grid is a natural outgrowth of certain kinds of models (most likely, one
that simulates some sort of plastic deformation) and is of no use for really
scattered data.

For really scattered data, you would need some other routine (like BIVAR).

Dave Kennison



This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:45:36 MDT