Page 1 of 1

get-UV-forecast-inc.php

Posted: Mon Jan 22, 2018 5:35 am
by HRVistaWeather
Hi Ken,
I appreciate this is the wrong thread to post the following, however I thought for relevance I would.
Not sure if this is just a script issue (or rather more likely Global Internet issue).
However I just applied Simon's work around to my "uv-forecast.php" script as it has also become intermittent in downloading from temis.
In addition, even if I do get it to download, it only downloads 3 not 5 days.
I have looked at Simon's and Your site Ken and both are only displaying 3 days, where in past I'm sure it was 5.
I'm not that concerned about the 5 days, (which does display when accessing temis direct url. But I use the DU/Ozone on my index page, which I only refer to current day.
using:

Code: Select all

get-UV-forecast-inc.php V1.08 - 11-Nov-2017

Kind regards,

Re: WU-forecast.php

Posted: Mon Jan 22, 2018 9:15 am
by Toxic17
HRVistaWeather wrote:Hi Ken,
I appreciate this is the wrong thread to post the following, however I thought for relevance I would.
Not sure if this is just a script issue (or rather more likely Global Internet issue).
However I just applied Simon's work around to my "uv-forecast.php" script as it has also become intermittent in downloading from temis.
In addition, even if I do get it to download, it only downloads 3 not 5 days.
I have looked at Simon's and Your site Ken and both are only displaying 3 days, where in past I'm sure it was 5.
I'm not that concerned about the 5 days, (which does display when accessing temis direct url. But I use the DU/Ozone on my index page, which I only refer to current day.
using:

Code: Select all

get-UV-forecast-inc.php V1.08 - 11-Nov-2017

Kind regards,


Tony, not sure whats going on, but the script was for WU since their API is flakey and I either got 0 byte file, 6-7kb file(incomplete) or the full file (about 23-27kb).

I added the script at the top of the WU-forecast.php not the get-uv-forecast since I dont seem to have an issue with that.

perhaps temis api has changed slightly? Ken?

the uv-forecast.txt is a copy of their page. I made a html page here with its content.

https://www.conligwx.org/test1.html

should we open a new topic to discuss the uv-forecast ?

Re: WU-forecast.php

Posted: Mon Jan 22, 2018 9:38 am
by Toxic17
Tony just seen that TEMIS give 6 days of UV data, but the first day is NOT todays date. its the 19th, I guess thats why you only see 3 days worth perhaps?

Re: get-UV-forecast-inc.php

Posted: Mon Jan 22, 2018 5:06 pm
by saratogaWX
Hi Tony,
I did split these posts to a new topic.

Looks like temis.nl has some stale data
<!-- get-UV-forecast-inc.php V1.08 - 11-Nov-2017 -->
<!-- UV forecast courtesy of and Copyright &copy; KNMI/ESA (http://www.temis.nl/). Used with permission. -->
<!-- UV data load from from cache ./cache/uv-forecast.txt -->
<!-- Date='19-Jan-2018', UV='1.9' DOW='Friday' YMD='20180119' -->
<!-- Date='20-Jan-2018', UV='1.7' DOW='Saturday' YMD='20180120' -->
<!-- Date='21-Jan-2018', UV='1.9' DOW='Sunday' YMD='20180121' -->
<!-- Date='22-Jan-2018', UV='2.0' DOW='Monday' YMD='20180122' -->
<!-- Date='23-Jan-2018', UV='2.0' DOW='Tuesday' YMD='20180123' -->
<!-- Date='24-Jan-2018', UV='2.0' DOW='Wednesday' YMD='20180124' -->
<!-- after date=20180122 processing, shifted 3 entries -->
<!-- Date='22-Jan-2018', UV='2.0' DOW='Monday' YMD='20180122' -->
<!-- Date='23-Jan-2018', UV='2.0' DOW='Tuesday' YMD='20180123' -->
<!-- Date='24-Jan-2018', UV='2.0' DOW='Wednesday' YMD='20180124' -->
so the script automatically discards old data to keep only the today-forward dates for display.

When I look at their site for my lat/lon, it shows:


Date UV
index ozone
column
19 Jan 2018 1.9 335.8 DU
20 Jan 2018 1.7 374.1 DU
21 Jan 2018 1.9 350.9 DU
22 Jan 2018 2.0 331.3 DU
23 Jan 2018 2.0 336.4 DU
24 Jan 2018 2.0 350.0 DU


grid cell centre data:
lon, lat = -122.125, 37.375
elevation = 213 (± -2) m
which confirms the 'stale data'. So the script is working correctly AFAIK. Temis just needs to generate a more current forecast than 19-Jan.

Re: get-UV-forecast-inc.php

Posted: Mon Jan 22, 2018 9:50 pm
by HRVistaWeather
Hi Ken,
Thanks, it seems to have updated overnight.
I should have added more detail/context to my initial post.
The only reason I picked up on this was that my DU/Ozone (for current Day) on my index page was displaying None (No Data).
Upon checking I found that the cached uv-forecast.txt file was (0) zero size.
I logged onto server and after numerous attempts of deleting it to force a new download, it finally downloaded (that's when I noticed it only had from 19th data.
Back in normal mode it did the same zero size on 3 occasions so I then applied the same work around that Simon used for the WU forecast,unlink if below x size and force new download. it's worked fine since. Maybe they just had a server glitch who knows.
Kind regards,