comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » strange results from webget
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: strange results from webget [message #85058 is a reply to message #82509] Thu, 27 June 2013 07:56 Go to previous message
fquintero is currently offline  fquintero
Messages: 1
Registered: June 2013
Junior Member
On Wednesday, December 19, 2012 4:10:28 PM UTC-6, JP wrote:
> G'day all,
>
>
>
> I am using the webget function from astrolib http://idlastro.gsfc.nasa.gov/ and i am finding some weird things.
>
> This is my example:
>
> If I call webget to retrieve the information from an url like this:
>
> http://thredds0.nci.org.au/thredds/dodsC/u39/modis/lpdaac-mo saics-cmar/v1-hdf4/aust/MOD09A1.005/2004.12.10/MOD09A1.2004. 345.aust.005.b01.500m_0620_0670nm_refl.hdf.gz.ascii?500m_062 0_0670nm_refl[5109:1:5343][7451:1:7472]
>
> If you try that in a browser you'll see it returns meaningful data. (for thos interested that's a small subset of a MODIS reflectance product for Australia).
>
>
>
> I try that with webget doing:
>
>
>
> url = ' http://thredds0.nci.org.au/thredds/dodsC/u39/modis/lpdaac-mo saics-cmar/v1-hdf4/aust/MOD09A1.005/2004.12.10/MOD09A1.2004. 345.aust.005.b01.500m_0620_0670nm_refl.hdf.gz.ascii?500m_062 0_0670nm_refl[5109:1:5343][7451:1:7472]'
>
>
>
> a = webget(url)
>
>
>
> so far so good.
>
> However, when i explore the contents of a.text, in a few cases the result doesnt match what you get in your browser. For example:
>
>
>
> for i=68, 71 do print, a.text[i]
>
>
>
> I get:
>
>
>
> [56], 1921, 1980, 1785, 1954, 2078, 2072, 1822, 1822, 1401, 1494, 1494, 1840
>
> 2000
>
> , 2218, 2050, 2050, 1798, 1719, 1683, 1808, 1652, 1940, 1703
>
> [57], 1945, 1980, 1921, 1927, 1865, 1865, 1944, 1678, 1290, 1255, 1477, 1901, 1840, 1996, 1916, 1631, 1762, 1756, 1756, 1652, 1652, 1641
>
>
>
> that's different from what i expect , looking at the result in my browser which looks:
>
>
>
> [56], 1921, 1980, 1785, 1954, 2078, 2072, 1822, 1822, 1401, 1494, 1494, 1840, 2218, 2050, 2050, 1798, 1719, 1683, 1808, 1652, 1940, 1703
>
> [57], 1945, 1980, 1921, 1927, 1865, 1865, 1944, 1678, 1290, 1255, 1477, 1901, 1840, 1996, 1916, 1631, 1762, 1756, 1756, 1652, 1652, 1641
>
>
>
> the problem is repeated a few other times.
>
>
I had the same problem
Its a problem with the chunks of data as wlandsman said.
I tried the IDLnetURL solution and it worked
ourl = obj_new('IDLnetURL')
myurl = 'anyurl'
text = ourl->get(/string_array,url=myurl)


> Any ideas? I know webget uses SOCKET and other things like that, I didn't go that far in exploring where the problem could be in.
>
>
>
> Thanks
>
>
>
> JP
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: coyote graphics /iso command
Next Topic: Find shift and rotation between two images.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 23:24:00 PDT 2025

Total time taken to generate the page: 0.14944 seconds