[Thread Prev][Thread Next][Index]

Re: function 'xsequence' = unravel = huh?



Actually Elizabeth, the answer can be found in version 4.9 also, although I find
it a little kludgy (sorry, Steve). Version 4.9 introduced the UNRAVEL function
which is designed to do exactly what you want.

So, in your example you would do something like the following in v4.9:

If your u matrix was 20x20

LIST/ORDER=x/NOHEAD/FORMAT=(400f10.5) UNRAVEL(u[i=1:20,j=1:20])

Now, it would seem reasonable that if you are outputting the entire matrix that
you wouldn't have to specify the region (e.g., UNRAVEL(u)) - but this doesn't
seem to work for some reason.

So, maybe this is the same problem you are experiencing with the xsequence, try
using a COMPLETELY explicit region inside of the function.


Mark

On Jun 4, 12:28pm, Elizabeth Dobbins wrote:
> Subject: function 'xsequence' = unravel = huh?
> Hi ferreters;
>
> Maybe I have the honor of posting the first question about a function in
> version 5.0 that's not in version 4.4.
>
> Anyway, to provide input for a pre-existing FORTRAN routine, I am trying to
> write a 2-D field out of ferret as a single line of ASCII data.  For
> instance, I've got an X by Y matrix that looks like:
>
> u = [ u(1,1)  u(1,2)  u(1,3)
>       u(2,1)  u(2,2)  etc     ]
>
> which I'd like to write as a single line that's X*Y long:
>
> u =  u(1,1)  u(1,2)  u(1,3)  u(2,1)  u(2,2) etc.
>
> Ferret's LIST command won't do it.  I end up with Y lines that are each X
> numbers long.  I thought I'd found the solution with ferret's new
> 'xsequence' function, which I thought would rearrange a entire matrix into
> a single line of data - that's what its description of unravel means to
> me.  However, its output seems to be some subset of the matrix, not the
> whole thing.
>
> Could someone please explain what 'xsequence' is doing?  And if it isn't
> doing what I need, could someone suggest another way beside writing
> another FORTRAN routine?
>-- End of excerpt from Elizabeth Dobbins




-- 
 Mark Verschell                     NASA/Goddard Space Flight Center
 verschell@neptune.gsfc.nasa.gov    Code 970/Lab. for Hydrospheric Proc.
 301-614-5669  Fax: 301-614-5666    Greenbelt, MD 20771


		     Better Living Through Denial
               ** USQC Certified: 100% Microsoft Free **


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement