[Thread Prev][Thread Next][Index]
Re: [ferret_users] pseudo dataset name
- To: David Wang <climater@xxxxxxxxx>
- Subject: Re: [ferret_users] pseudo dataset name
- From: David Wang <climater@xxxxxxxxx>
- Date: Tue, 17 Apr 2007 19:19:37 -0400
- Cc: oar.pmel.ferret_users@xxxxxxxx
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=s2BEgnyJRPk+1WBltSNGaJACjIl8D/l+r4odJSIGSgFI/w9HzJ/dsWB5o+ES6QKu8u/nlEO5wSZqVek07gZBr6sJy84KdkwlyhgEhJbTB1/6rCMsru6upI2MAZd316GQ64nIzsFog3VQpBfDwD/DigtLv0dISwZvix2HORCNjrA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=LH+X7goBjD2rVBBRiOQzVH/2Bq5ZXW+tZhrI4DbkcF2Fkls0cxS953GAUWU+hZTo4JzlCSSyRBRHUdtTFJEgVTwEVyr7p3G6mkMfhhb0hczoYCGlVGdapK7vH+8ybgSzEJZELA6FA4DfwOigns/RTbAWG63n8knF/77bn5XWiJw=
- In-reply-to: <461A7638.3060007@xxxxxxxx>
- References: <8be1369e0704062027j4cf1f7dan1c682940c7e1835d@xxxxxxxxxxxxxx> <461A7638.3060007@xxxxxxxx>
- Sender: owner-ferret_users@xxxxxxxxxxxxx
Hi,
I thank Jaison, Billy and Ansley for pointing out several nice hacks. I now
use the dsetnum approach.
Concerning the suggestion that Ansley brought about below, it didn't work
for me at first since I stored the filename in a symbol:
yes? def sym soda = "
http://apdrc.soest.hawaii.edu:80/dods/public_data/SODA/soda_pop1.4.2"
yes? use ($soda)
yes? use another_netcdf_file.nc
yes? sh g temp[d=($soda)]
!-> sh g temp[d="
http://apdrc.soest.hawaii.edu:80/dods/public_data/SODA/soda_pop1.4.2"]
**ERROR: unknown data set: D="
http://apdrc.soest.hawaii.edu:80/dods/public_data/SODA/soda_pop1.4.2"
However I happened to find that if I enclosed the symbol within a pair of
grave accents, it then works:
yes? sh g temp[d=`($soda)`]
!-> sh g temp[d=
http://apdrc.soest.hawaii.edu:80/dods/public_data/SODA/soda_pop1.4.2
]
GRID GQF1
name axis # pts start end
LON LONGITUDE 720mr 0.25E 0.25W
LAT LATITUDE 330 r 75.25S 89.25N
LEV DEPTH (m) 40 i- 5 5374
TIME TIME 528 i 15-JAN-1958 00:00 15-DEC-2001 00:00
so grave accents remove quotation marks? good to know.
D.
On 4/9/07, Ansley Manke <Ansley.B.Manke@xxxxxxxx> wrote:
Hi David,
You can specify the whole path in your expressions, if you do it in the
same way that you did in your SET DATA command
yes? set data "./sub_dir_1/datfile.nc"
yes? set data "./sub_dir_2/datfile.nc"
yes? shade a[d=./sub_dir_1/datfile.nc] - a[d=./sub_dir_2/datfile.nc]
or
yes? use "/home/porter/ansley/sub1/along.nc"
yes? use "/home/porter/ansley/sub2/along.nc"
yes? plot a[d=/home/porter/ansley/sub1/along.nc] -
a[d=/home/porter/ansley/sub2/along.nc]
The text you specify for the path must match what's given by
yes? say `a,return=dsetpath`
David Wang wrote:
> Hello Ferreters,
>
> I'm not sure this is available or can be made available in FERRET. I
> found that if I have two datasets having the same filename but in two
> different directories, both opened within a FERRET session. Now if I
> want to refer both in square brackets in a single _expression_, I cannot
> use dataset names simply because the two have the same filename (and
> FERRET doesn't accept filenames with a full path in square brackets).
> Of course one can always refer them by their dataset numbers. But
> occasionally that could be confusing (such as you don't know how many
> datasets have already been opened). So my question is, is it possible
> to give a dataset a user-defined pseudo name when opening it, which
> can be used uniquely to identify the dataset later on?
>
> Thanks,
> David
>
--
~> ~> ~> ~> ~> ~> ~> ~> ~> ~> ~>
Ansley Manke, NOAA/PMEL
ansley.b.manke@xxxxxxxx
7600 Sand Point Way NE, Seattle WA
Phone 206-526-6246, FAX 206-526-6744
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement