[Thread Prev][Thread Next][Index]
RE: Looping through varables in a data set
Hi,
Just tought I'd let the mail list know how I solved the problem for now.
I made use of the LAS Perl modules and wrote a little perl script
to generate a go script which then Ferret runs. The script is somewhat
customized for my data, but if you have a similar need I'm willing to
share it.
-Mike
> -----Original Message-----
> From: Steve Hankin [mailto:hankin@pmel.noaa.gov]
> Sent: Friday, August 24, 2001 6:45 PM
> To: McCann, Mike
> Cc: ferret_users@ferret.wrc.noaa.gov
> Subject: Re: Looping through varables in a data set
>
>
> Hi Mike,
>
> There's nothing to automate that in V5.22. In the V5.33 beta
> (available for
> download) we get half way there -- see the example below.
> Support for strings
> in Ferret is still under development. One of the future
> syntaxes will be
> various metadata available through "dot" notation. For example:
> <my_data_set>.variables
> will be an array of strings that will behave much like
> "names" in the example
> below.
>
> - steve
>
> =======
> > ferret_v533
> NOAA/PMEL TMAP
> Program FERRET (beta)
> Version 5.33 - 06/19/01
> 24-Aug-01 18:42
>
> yes? let names = {"a","b","c"}
> yes? list names
> {"a","b","c"}
> 1 / 1:"a"
> 2 / 2:"b"
> 3 / 3:"c"
> yes? repeat/i=1:`names,return=isize` (let a = names[i=`i`]; say `a`)
> !-> repeat/i=1:3 (let a = names[i=`i`]; say `a`)
> !-> REPEAT: I=1
> !-> DEFINE VARIABLE a = names[i=1]
> !-> MESSAGE/CONTINUE a
> a
> !-> REPEAT: I=2
> !-> DEFINE VARIABLE a = names[i=2]
> !-> MESSAGE/CONTINUE b
> b
> !-> REPEAT: I=3
> !-> DEFINE VARIABLE a = names[i=3]
> !-> MESSAGE/CONTINUE c
> c
>
> ================================================
>
> "McCann, Mike" wrote:
>
> > Hi,
> >
> > I wish to write a go script that will take any number of variables
> > in my netCDF time series data file, loop through the variables and
> > create representative graphics for each of the variables.
> >
> > Is there a way to get the list of variables so that the go script
> > can us them in a REPEAT-like loop to create the output I desire?
> >
> > Thanks in advance,
> > Mike
> >
> > --
> > Mike McCann (mccann@mbari.org)
> > Monterey Bay Aquarium Research Institute
> > 7700 Sandholdt Road
> > Moss Landing, CA 95039-9644
> > Voice: (831) 775-1769 Fax: (831) 775-1646
http://www.mbari.org/rd/iag.htm
--
| NOAA/PMEL | ph. (206) 526-6080
Steve Hankin | 7600 Sand Point Way NE | FAX (206) 526-6744
| Seattle, WA 98115-0070 | hankin@pmel.noaa.gov
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement