[Thread Prev][Thread Next][Index]

Re: [ferret_users] pseudo dataset name



Hi David,
           Good to know that you got a solution to your problem. If it 
is inconvenient, you can drop the quotation marks while defining symbol
and in this case you don't need grave accents while specifying dataset
name. Proceed as follows :

    def sym soda = 
http://apdrc.soest.hawaii.edu:80/dods/public_data/SODA/soda_pop1.4.2

    use another_netcdf_file.nc

    use "($soda)" 

    show grid temp[d=($soda)]


Regards,

Jaison

On Tue, 17 Apr 2007, David Wang wrote:

> 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