The 2018 drought and heatwave continues. There was a brief respite over the past few days and that maybe partly my fault. The lack of rain prompted me to do some work on the Borth & Ynyslas weather station website pages by adding a ‘rainfall’ data page. For some reason I never added this when I built the website pages back in 2005. The fact that we had gone 25 days without rain meant that I’d quite like to see such data on the site so set to building it in.That of course prompted the end of the dry streak.

It took a while as I had of course completely forgotten how I had built the site – the need for extensive documentation of coding when you build such things should not be overlooked. I worked it out in the end. The weather station software on my PC uses a file full of custom tags to generate a second file that is uploaded to the server. As it does so it replaces the custom tags with the appropriate weather data. Once on the server I use a php script to take this textual data (which is delimited by the pipe character [|]) and insert each piece of data into an array. I can then address any location within this array and print it to screen within a PHP script. I don’t do this, I actually turn each item in the array into a php variable using a script in another file as it makes it easier to know what each item refers to rather than simply using array locations. I then have several templates stored in a MySQL database that are queried and used to generate the web-page… Easy when you know how, but remembering quite how I had done it took a while.

All done now, and subscribers can see the Borth & Ynyslas rainfall data page here.

Borth Rain Data

Borth Rain Data

However by the time I had done it we had actually had some rain. Not a huge amount, only 0.8mm on Monday to be exact but that was enough to break the spell of consecutive days without rain which had run from June 20th through to July 15th inclusive. That was 25 days without rain – almost unheard of in Wales! The counter has now been reset and we are now back to a more usual zero consecutive days without rain.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Alan Cole

Alan is a Freelance Website Designer, Sports & Exercise Science Lab Technician and full time Dad & husband with far too many hobbies: Triathlete, Swimming, Cycling, Running, MTBing, Surfing, Windsurfing, SUPing, Gardening, Photography.... The list goes on.

You may also like...