[Thread Prev][Thread Next][Index]

Re: GDS Datasets in Ferret - update



Hi Jennifer,
You can see the dataset title with
yes? SHOW DATA/FULL

If you want, you could also use string functions to manipulate
this title.  You can work with it as a string once it's loaded as
a label, that is, once you have done a plot.  Say you want to
extract this part of the string:    _exprcache_10499826058336

yes? use "http://   ...
yes? plot/i=1:100/j=1/l=1 result
yes? show symbols   ! See tha lab7 is the dataset title

yes? let shorthand = "($lab7)"
 !-> DEFINE VARIABLE shorthand = "shorthand: /_exprcache_10499826058336 expression: ave((slp.1+slp.2+slp.3+slp.4+"
yes? let pos1 = strindex(shorthand, "/")
yes? list pos1
             VARIABLE : STRINDEX(SHORTHAND, "/")
          12.00
yes? let pos2 = strindex(shorthand," expression")
yes? list pos2
             VARIABLE : STRINDEX(SHORTHAND," expression")
          39.00
yes? list substring(shorthand,pos1+1,`pos2-pos1`)
 !-> list substring(shorthand,pos1+1,27)
             VARIABLE : SUBSTRING(SHORTHAND,POS1+1,27)
        "_exprcache_10499826058336  "

"Jennifer M. Adams" wrote:

> "Jennifer M. Adams" wrote:
>
> > Once I do successfully open a GDS server-side analysis
> > request, there is a shorthand name for the data set that is
> > something like "_exprcache_104992113430013". The shorthand
> > name is useful if you want to include the results of your
> > first server-side analysis request in yet another
> > server-side analysis request. This shorthand name is
> > included in the output of 'query file' (a GrADS command
> > similar to "show data"), but I don't know how to retrieve it
> > with Ferret. "show data" gives me this (once again, sorry
> > about the unsightly line wrapping):
> >
> >      currently SET data sets:
> >     1>
> >
> > http://dataportal.ucar.edu:9191/dods/_expr_{C20C/C20C_A,C20C/C20C_B,C20C/C20C_C,C20C/C20C_D,C20C/C20C_E,C20C/C20C_F,C20C/C20C_G}{ave((slp.1+slp.2+slp.3+slp.4+slp.5+slp.6+slp.7)/7.0,t+0,t=601,12)}{0:358.125,-30:30,1000:1000,00z01jan1949:00z01dec1949}
> > (default)
> >  name    title                 I      J     K    L
> >  RESULT  result of expression  1:192  1:34  ...  1:12
> >
> >
> > I'm not exactly sure how GrADS knows the shorthand name, but
> > I'm assuming it's part of the metadata that comes back from
> > the GDS. Is there any way to recover the shorthand name with
> > Ferret?
>
> Since I wrote this, I have learned that the shorthand name
> is part of the global attribute :title. In this case, the
> title is (lines will wrap):
>
> "shorthand: /_exprcache_10499826058336 expression:
> ave((slp.1+slp.2+slp.3+slp.4+slp.5+slp.6+slp.7)/7.0,t+0,t=601,12)
> source datasets: /C20C/C20C_A /C20C/C20C_B /C20C/C20C_C
> /C20C/C20C_D /C20C/C20C_E /C20C/C20C_F /C20C/C20C_G"
>
> If I draw a shaded plot of 'result' the whole title appears
> above my plot, so that string becomes a ppl label that I can
> see using "ppl list labels". Is there a more direct way to
> access the netcdf attributes without having to draw a plot?
>
> Thanks again,
> Jennifer
>
> --
> ----------------------------------------
> Jennifer Miletta Adams
> Center for Ocean-Land-Atmosphere Studies
> 4041 Powder Mill Road, Suite 302
> Calverton, MD 20705-3106
> Phone: (301)902-1278 or (301)595-7000
> Fax:   (301)595-9793
> Email: jma@cola.iges.org

--
Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement