Page 1 of 1

Monthly dom wind dir web tag

Posted: Thu 02 Jan 2014 7:30 am
by muppet77
Hi all.
Happy New Year.

Is there a web tag that gives this months dominant wind direction please?
I know the monthly log file has it but I'd like to "get at it" for use with php.

Any ideas?
Regards.

Re: Monthly dom wind dir web tag

Posted: Thu 02 Jan 2014 9:20 am
by steve
There's no web tag. It's in the NOAA-style reports as a compass point.

Re: Monthly dom wind dir web tag

Posted: Thu 02 Jan 2014 9:29 am
by muppet77
Thanks Steve. I guessed that would be the case as I had a good search.
Any ideas on getting to php? (Words or bearing?)

Re: Monthly dom wind dir web tag

Posted: Thu 02 Jan 2014 9:36 am
by steve
Didn't someone write a PHP parser for the NOAA reports? And I tried to keep them 'standard' so that any existing tools could be used. I had rather assumed/hoped that in providing the NOAA reports, that they could be used for the summary information that isn't available elsewhere in Cumulus. Perhaps this was a forlorn hope.

Re: Monthly dom wind dir web tag

Posted: Thu 02 Jan 2014 9:45 am
by steve
Kevin did a parser for the NOAA monthly reports (i.e. the ones with the daily summaries) produced by WD: http://www.tnetweather.com/nb-0005.php

I used Weatherlink as the basis for the Cumulus ones, but I imagine that his code could be adapted if necessary, and also used as the basis for a parser for the annual reports (i.e. the ones with the monthly summaries).

Re: Monthly dom wind dir web tag

Posted: Fri 03 Jan 2014 5:49 pm
by muppet77
Thanks both.
I do have this set up but can't seem to find the bit I need.
http://www.maidenerleghweather.com/cumu ... e/noaa.php

Re: Monthly dom wind dir web tag

Posted: Fri 03 Jan 2014 6:18 pm
by steve
If you select a year, it will show you the dominant direction for each month, e.g.
2014-01-03 18_15_12-www.maidenerleghweather.com_cumulus_website_noaa.php.png
But your display box is cut off, so you can't see any months after April, so if you select 2013 you can't see the months that you actually have data for:
2014-01-03 18_15_40-www.maidenerleghweather.com_cumulus_website_noaa.php.png

Re: Monthly dom wind dir web tag

Posted: Mon 06 Jan 2014 4:58 pm
by muppet77
Thanks Steve. I meant I don't know how to access that monthly dominant direction so I can use it in php.
Which variable of the script do I need to look for? Thanks.

Re: Monthly dom wind dir web tag

Posted: Mon 06 Jan 2014 5:06 pm
by steve
In Kevin's script? It looks like $value[12] to me. But that's the daily dominant direction, that script doesn't parse the annual report with the monthly direction.

Re: Monthly dom wind dir web tag

Posted: Mon 06 Jan 2014 5:26 pm
by muppet77
It's the monthly dom dir reported in the monthly summary that I am after. The one in the bottom right corner under the line.

Re: Monthly dom wind dir web tag

Posted: Mon 06 Jan 2014 5:42 pm
by steve
I don't think this script handles that line. I'm sorry if I gave the impression that this script would do what you wanted, unaltered; I was suggesting it as a possible basis for a script to parse the report to extract the information you want.