default site support for vso_get ...

42 views
Skip to first unread message

Joe Hourcle

unread,
Sep 19, 2011, 5:54:09 PM9/19/11
to vso...@googlegroups.com

A while back, I had started trying to set up a more complex system to
allow an default to be set through environmental variables (and try to do
it in a consistent way so that other programmers could use it), but it had
issues, and I never worked all of the bugs out.

I have, however, just added support for the environmental variable
'VSO_DEFAULT_SITE'. It'll only be read if 'site' isn't passed in, or is
blank, so you can still override it:


$ export VSO_DEFAULT_SITE=SDAC
$ ~/bin/ssw
...
IDL> a = vso_search( inst='hmi', /latest )
Records Returned : JSOC : 1/1
Records Returned : JSOC : 1/1
Records Returned : JSOC : 1/1
IDL> b = vso_get( a, /nodownload )
IDL> print, b.url
http://sdo4.nascom.nasa.gov/cgi-bin/drms_export.cgi?series=hmi__M_45s;record=13116151-13116151
http://sdo4.nascom.nasa.gov/cgi-bin/drms_export.cgi?series=hmi__V_45s;record=13116151-13116151
http://sdo4.nascom.nasa.gov/cgi-bin/drms_export.cgi?series=hmi__Ic_45s;record=13116151-13116151
IDL> b = vso_get( a, /nodownload, site='rob' )
IDL> print, b.url
http://sdodata.oma.be/vsoprovider/drms_export.cgi?series=hmi__M_45s;record=13116151-13116151
http://sdodata.oma.be/vsoprovider/drms_export.cgi?series=hmi__V_45s;record=13116151-13116151
http://sdodata.oma.be/vsoprovider/drms_export.cgi?series=hmi__Ic_45s;record=13116151-13116151
IDL> setenv, 'VSO_DEFAULT_SITE=SAO'
IDL> b = vso_get( a, /nodownload )
IDL> print, b.url
http://kurasuta.cfa.harvard.edu/cgi-bin/VSO/prod/drms_export.cgi?series=hmi__M_45s;record=13116151-13116151
http://kurasuta.cfa.harvard.edu/cgi-bin/VSO/prod/drms_export.cgi?series=hmi__V_45s;record=13116151-13116151
http://kurasuta.cfa.harvard.edu/cgi-bin/VSO/prod/drms_export.cgi?series=hmi__Ic_45s;record=13116151-13116151

...

Let me know if there are any problems. (and yes, yes, I know, this isn't
specifically 'new data provider' work ... unless you count making sure
that we're exposing the remote DRMS sites as 'new data providers')

The only strange thing is -- because I *did not* put this into vso_get,
but put it deeper down, it'll also affect anyone using the VSO object
directly, which I don't think is anyone, but I never know for sure. This
means that it'll be seen by the /URLS flag to vso_search() :

IDL> setenv, 'VSO_DEFAULT_SITE=UCLAN'
IDL> a = vso_search( inst='hmi', /latest, /urls )
Records Returned : JSOC : 1/1
Records Returned : JSOC : 1/1
Records Returned : JSOC : 1/1
IDL> print, a.url
http://vso.sdo.uclan.ac.uk/cgi-bin/drms_export.cgi?series=hmi__Ic_45s;record=13116151-13116151
http://vso.sdo.uclan.ac.uk/cgi-bin/drms_export.cgi?series=hmi__M_45s;record=13116151-13116151
http://vso.sdo.uclan.ac.uk/cgi-bin/drms_export.cgi?series=hmi__V_45s;record=13116151-13116151


If no one has problems with the new code by Thursday, I'll get it pushed
out to SolarSoft. I don't think it'll adversely affect anyone, but I
thought I'd give people a window to raise a warning just in case.

...

You only really need the attached file 'vso__define.pro' for this to work;
I've only updated the 'vso_get.pro' file so there's documentation of the
change.


-Joe

vso_get.pro
vso__define.pro

Joe Hourcle

unread,
Sep 20, 2011, 11:00:26 AM9/20/11
to vso...@googlegroups.com

Some people have reported that they didn't get this message ...
I'm guessing spam filters either choked on the attachments, or that there
were so many URLs in the message.

So, here it is again, with most of the URLs removed, and instead of
attaching the files, I've placed them at:

http://sdo1.nascom.nasa.gov/drms/idl/

(files 'vso__define.pro' and 'vso_get.pro')


On Mon, 19 Sep 2011, Joe Hourcle wrote:

> A while back, I had started trying to set up a more complex system to
> allow an default to be set through environmental variables (and try to do
> it in a consistent way so that other programmers could use it), but it had
> issues, and I never worked all of the bugs out.
>
> I have, however, just added support for the environmental variable
> 'VSO_DEFAULT_SITE'. It'll only be read if 'site' isn't passed in, or is
> blank, so you can still override it:
>
>
> $ export VSO_DEFAULT_SITE=SDAC
> $ ~/bin/ssw
> ...
> IDL> a = vso_search( inst='hmi', /latest )
> Records Returned : JSOC : 1/1
> Records Returned : JSOC : 1/1
> Records Returned : JSOC : 1/1
> IDL> b = vso_get( a, /nodownload )
> IDL> print, b.url

...


> IDL> b = vso_get( a, /nodownload, site='rob' )
> IDL> print, b.url

...


> IDL> setenv, 'VSO_DEFAULT_SITE=SAO'
> IDL> b = vso_get( a, /nodownload )
> IDL> print, b.url

...


>
> ...
>
> Let me know if there are any problems. (and yes, yes, I know, this isn't
> specifically 'new data provider' work ... unless you count making sure
> that we're exposing the remote DRMS sites as 'new data providers')
>
> The only strange thing is -- because I *did not* put this into vso_get,
> but put it deeper down, it'll also affect anyone using the VSO object
> directly, which I don't think is anyone, but I never know for sure. This
> means that it'll be seen by the /URLS flag to vso_search() :
>
> IDL> setenv, 'VSO_DEFAULT_SITE=UCLAN'
> IDL> a = vso_search( inst='hmi', /latest, /urls )
> Records Returned : JSOC : 1/1
> Records Returned : JSOC : 1/1
> Records Returned : JSOC : 1/1
> IDL> print, a.url

...

Reply all
Reply to author
Forward
0 new messages