[Thread Prev][Thread Next][Index]
Re: How do I get at the dataset title in a script?
On Tue, 10 Feb 2004, Jonathan Callahan wrote:
> I was looking for the dataset title, not the variable title. Here's
> what it looks like in a 'ncdump -h':
>
> // global attributes:
> :title = "MERCATOR PSY2V1R1 SECTION ATL Gulf Cadiz" ;
>
> And I know Ferret knows about it because I see it when I do a SHOW
> DATA/FULL. It appears on standard output plots but I'm not doing a
> standard output plot! However, I'd still like to display the title on
> my non-standard plot.
Hi Jon,
Since v5.52, Ferret has been able return the global title attribute using
`my_variable,RETURN=DSETTITLE`
where "my_variable" is any variable in your dataset. So you can get the
title using something like
define symbol global_title "`my_variable,r=dsettitle`"
or
let global_title = "`my_variable,r=dsettitle`"
Andrew
PS: Ansley, this feature appears to be undocumented at the moment --
could you kindly add this on the "RETURN=DSET, DSETNUM, DSETPATH" line at
the link:
http://ferret.wrc.noaa.gov/Ferret/Documentation/Users_Guide/current/Chapter3_Variables_and_Expressions.htm#_VPINDEXENTRY_543
Some other links in the UG index might help too; there's a link to "title
of a dataset" but that points only to "SET DATA/TITLE"...
+--------------------------------------------------------+
| Dr. Andrew T. Wittenberg | GFDL/NOAA |
| Andrew.Wittenberg@noaa.gov | Princeton, NJ |
+--------------------------------------------------------+
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement