[Thread Prev][Thread Next][Index]
Re: function 'xsequence' = unravel = huh? (fwd)
Oops, forgot to mail it to the group...
This was my take on what Elizabeth was trying to accomplish. I take it she
wants to run the fortran externally.
Forwarded message:
> From oxilia Fri Jun 4 13:36 PDT 1999
> From: David Oxilia <oxilia>
> Subject: Re: function 'xsequence' = unravel = huh?
> To: dobbins@pmel.noaa.gov
> Date: Fri, 4 Jun 1999 13:36:18 -0800 (PDT)
> Cc: oxilia
> In-Reply-To: <Pine.OSF.4.10.9906041210240.8581-100000@goofy.pmel.noaa.gov> from "Elizabeth Dobbins" at Jun 4, 99 12:28:05 pm
> X-Mailer: ELM [version 2.4 PL21]
>
> Hi Elizabeth,
>
> I'm not sure that you need to go through all that trouble. If you simply
> want to generate an ASCII file with columnar data (one record) use the
> format option of list. Here's a simple example:
>
> yes? use coads_climatology
> yes? let matrix = slp[i=50:60,j=40:50,l=1]
> yes? list matrix ! This gives you the 2D matrix
> yes? list/nohead/form=(f10.2) matrix ! This gives you the 1D vector
>
> To write it to file and or switch the ordering of the matrix (ie for
> Fortran or C) do
>
> yes? alias stream list/nohead/file=filename.dat/order=xy/form=(f10.2)
> yes? stream matrix
>
> See page 173 of the manual (v4.4) for more info. Hope this helps,
>
> David.
>
> > 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?
> >
> > Thanks,
> > Liz
> >
> > *********************
> > Elizabeth L. Dobbins
> > Research Scientist
> > JISAO/PMEL
> > phone: (206) 526-4581
> >
> > Fine words butter no parsnips.
> >
> >
>
>
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement