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

Home » Public Forums » archive » Temperature records
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: Temperature records [message #92090 is a reply to message #92089] Fri, 09 October 2015 12:22 Go to previous messageGo to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
On Friday, 9 October 2015 09:33:35 UTC-7, dave poreh wrote:
> Folks,
> Hi,
> I am looking for a specific area's temperature records. I mean per day records of temperature.
> Will you please help me?
> Thanks for any kind of help in advance,
> Cheers,
> Dave

I've found this to be helpful, if you know an airport code or other identifier that Weather Underground knows... It looks like it was a nice day in Boulder yesterday:

http://www.wunderground.com/history/airport/WBU/2015/10/8/Da ilyHistory.html
or in more machine-readable form:
http://www.wunderground.com/history/airport/WBU/2015/10/8/Da ilyHistory.html?&format=1

With IDL 8.5, it's as easy as this:

IDL> s = WGet(' http://www.wunderground.com/history/airport/WBU/2015/10/8/Da ilyHistory.html?&format=1', /STRING_ARRAY)

IDL> help, s
S STRING = Array[74]
IDL> s[0:2]

TimeMDT,TemperatureC,Dew PointC,Humidity,Sea Level PressurehPa,VisibilityKm,Wind Direction,Wind SpeedKm/h,Gust SpeedKm/h,Precipitationmm,Events,Conditions,WindDirDegrees,D ateUTC <br />
12:15 AM,15.0,5.0,51,1021.9,16.1,Calm,Calm,-,N/A,,Clear,0,2015-10- 08 06:15:00<br />

IDL> parts = StRegEx(s[2:*], '(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*) ,(.*),(.*)', /EXTRACT, /SUBEXPR)
IDL> times = DblArr(72)
IDL> ReadS, parts[14, *], FORMAT='(C(CYI4,X,CMOI2,X,CDI2,X,CHI2,X,CMI2,X,CSI2))', times
IDL> tempC = Float((parts[2,*])[*])
IDL> p=plot(times, tempC, xtickunits='Hours',xtitle='Hour (UTC)',ytitle='Temp. (C)')

There are other ways to get the "parts", like having WGET save to a file, then using READ_ASCII to read and separate on the commas.

Hope this helps!

Cheers,
-Dick

Dick Jackson Software Consulting Inc.
Victoria, BC, Canada --- http://www.d-jackson.com
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Geometric mismatch using cgImage and cgDrawShapes
Next Topic: mysqlquery to insert data into MySQL

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

Current Time: Wed Oct 08 15:49:49 PDT 2025

Total time taken to generate the page: 0.00466 seconds