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
|