Author Topic: NOAA style files  (Read 10979 times)

staze

  • Strong Breeze
  • ***
  • Posts: 192
    • CW9669
    • KORSPRIN10
    • Everybody Staze...
  • Station Details: Davis Vantage Vue, Weatherlink Serial, FTDI USB-Serial Adapter, Mac Mini Server (Late 2012), 10.11 Server
Re: NOAA style files
« Reply #15 on: March 31, 2014, 08:11:47 PM »
okay, think I got this working, except that it only seems to pull the first day of the month I give it.

Any thoughts?
"You mean, you'll put down your rock and I'll put down my sword and we'll try and kill each other like civilized people?"

staze

  • Strong Breeze
  • ***
  • Posts: 192
    • CW9669
    • KORSPRIN10
    • Everybody Staze...
  • Station Details: Davis Vantage Vue, Weatherlink Serial, FTDI USB-Serial Adapter, Mac Mini Server (Late 2012), 10.11 Server
Re: NOAA style files
« Reply #16 on: March 31, 2014, 08:54:37 PM »
hmm, so, has something to do with the CONVERT_TZ part of the mysql query... though I'm not sure why yet...
"You mean, you'll put down your rock and I'll put down my sword and we'll try and kill each other like civilized people?"

staze

  • Strong Breeze
  • ***
  • Posts: 192
    • CW9669
    • KORSPRIN10
    • Everybody Staze...
  • Station Details: Davis Vantage Vue, Weatherlink Serial, FTDI USB-Serial Adapter, Mac Mini Server (Late 2012), 10.11 Server
Re: NOAA style files
« Reply #17 on: March 31, 2014, 09:08:36 PM »
Ah ha! So in Mysql 5.5, or Mac OS 10.8.5, when you import the tz data (see here: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_convert-tz), UTC is not just "UTC" it's "Etc/UTC". You need to change that with the date query on line 38.

Hopefully that helps someone. =)
"You mean, you'll put down your rock and I'll put down my sword and we'll try and kill each other like civilized people?"

AstroSteve

  • Gentle Breeze
  • **
  • Posts: 42
    • KJ6IIW
    • KCAACTON3
  • Station Details: Davis Vantage Pro 2 Wireless, iMac 27"
Re: NOAA style files
« Reply #18 on: March 31, 2014, 09:17:54 PM »
Hmmm, must be Mac OS that's doing it because my provider is running MySQL 5.5.32 and it works fine. I imagine another fix would be to use '+00:00' instead of UTC.  The manual also states that "To use named time zones such as 'MET' or 'Europe/Moscow', the time zone tables must be properly set up."  That could be the problem sice you had to prefix it with what looks like the path.

staze

  • Strong Breeze
  • ***
  • Posts: 192
    • CW9669
    • KORSPRIN10
    • Everybody Staze...
  • Station Details: Davis Vantage Vue, Weatherlink Serial, FTDI USB-Serial Adapter, Mac Mini Server (Late 2012), 10.11 Server
Re: NOAA style files
« Reply #19 on: March 31, 2014, 09:43:56 PM »
yeah, guessing that's it.

anyway, thanks! still need to do some work, but seems to be working. Any tip on where the "NAME: Saratoga-weather.org" is set?
"You mean, you'll put down your rock and I'll put down my sword and we'll try and kill each other like civilized people?"

staze

  • Strong Breeze
  • ***
  • Posts: 192
    • CW9669
    • KORSPRIN10
    • Everybody Staze...
  • Station Details: Davis Vantage Vue, Weatherlink Serial, FTDI USB-Serial Adapter, Mac Mini Server (Late 2012), 10.11 Server
Re: NOAA style files
« Reply #20 on: March 31, 2014, 10:08:44 PM »
It's also not pulling the lat/long/elevation (which I'm guessing are in Settings.php). Though, I don't see those variables in createnoaa being set anywhere...

was this based on the V2 Saratoga-Weather stuff, and V3 changed enough that things are broken?
"You mean, you'll put down your rock and I'll put down my sword and we'll try and kill each other like civilized people?"

AstroSteve

  • Gentle Breeze
  • **
  • Posts: 42
    • KJ6IIW
    • KCAACTON3
  • Station Details: Davis Vantage Pro 2 Wireless, iMac 27"
Re: NOAA style files
« Reply #21 on: March 31, 2014, 11:41:20 PM »
That actually comes fro the WCTtags.php file.  I must have had it hard coded when I ran it and forgot to add the include line when I changed it and posted it here.  Oops! None of the variables in the header will not populate without that file.

Add include("WCTtags.php"); after require_once("../common.php"); at the top of both the createnoaa.php and createclimate.php files. You may have to adjust the path to point to wherever your WCTtags.php file is.

staze

  • Strong Breeze
  • ***
  • Posts: 192
    • CW9669
    • KORSPRIN10
    • Everybody Staze...
  • Station Details: Davis Vantage Vue, Weatherlink Serial, FTDI USB-Serial Adapter, Mac Mini Server (Late 2012), 10.11 Server
Re: NOAA style files
« Reply #22 on: April 01, 2014, 12:03:33 AM »
okay, have that... still being weird about it.

It pulled the name, but not the Elevation, lat, long, which is odd.
"You mean, you'll put down your rock and I'll put down my sword and we'll try and kill each other like civilized people?"

AstroSteve

  • Gentle Breeze
  • **
  • Posts: 42
    • KJ6IIW
    • KCAACTON3
  • Station Details: Davis Vantage Pro 2 Wireless, iMac 27"
Re: NOAA style files
« Reply #23 on: April 01, 2014, 12:19:08 AM »
Have a look at your WCTtags.php file and make sure all the variables are being save to it.  Search for them without the WX and brackets, i.e Llat or Llong.  They get put in the $WX array when the WCTtags.php file is read.  If they aren't in the file, you will have to edit the file on your computer that creates and uploads that file to your server. in my case it's in the /Applications/WeatherCat/Web Templates/Saratoga/templates dir.  You can find it under Preferences, On-Line, Custom Web tab.

staze

  • Strong Breeze
  • ***
  • Posts: 192
    • CW9669
    • KORSPRIN10
    • Everybody Staze...
  • Station Details: Davis Vantage Vue, Weatherlink Serial, FTDI USB-Serial Adapter, Mac Mini Server (Late 2012), 10.11 Server
Re: NOAA style files
« Reply #24 on: April 15, 2014, 12:23:48 AM »
Got that all working.

So, how do the NOAA files/renderings work at this point? I got the script to generate the climate and noaa data going, but I'm unsure how the rendering files work... looks like they need data from another set of scripts? Then cron should be running some generation script routinely?

Thanks!
"You mean, you'll put down your rock and I'll put down my sword and we'll try and kill each other like civilized people?"

JosBaz

  • Strong Breeze
  • ***
  • Posts: 173
    • INBRSON2
    • Weatherstation Son en Breugel, The Netherlands
  • Station Details: Davis Vantage Pro2 Wireless, WeatherCat on Mac OS X 10.9
Re: NOAA style files
« Reply #25 on: April 15, 2014, 04:16:31 PM »
Although I admire what some people manage to achieve, this thread shows it is a bit cumbersome (for me at least) to get a simple NOAA style text file generated.

For this reason, and this reason only (getting simple NOAA monthly reports), I switch on my old Weatherlink PC with Windows every couple of weeks.

Stu - what are the chances of getting this functionality in the next release?   [bounce]

Thanks,

Jos

staze

  • Strong Breeze
  • ***
  • Posts: 192
    • CW9669
    • KORSPRIN10
    • Everybody Staze...
  • Station Details: Davis Vantage Vue, Weatherlink Serial, FTDI USB-Serial Adapter, Mac Mini Server (Late 2012), 10.11 Server
Re: NOAA style files
« Reply #26 on: April 15, 2014, 04:18:14 PM »
Totally agree, and really makes me consider switching to weewx. :(
"You mean, you'll put down your rock and I'll put down my sword and we'll try and kill each other like civilized people?"

AstroSteve

  • Gentle Breeze
  • **
  • Posts: 42
    • KJ6IIW
    • KCAACTON3
  • Station Details: Davis Vantage Pro 2 Wireless, iMac 27"
Re: NOAA style files
« Reply #27 on: April 16, 2014, 02:34:45 PM »
To generate the daily NOAA files, you need a cron job that runs the createnoaa.php and createclimate.php.  I run it hourly at 5 minutes before the hour.

As to how they work, that's up to you.  The pages on my website use the scripts from http://weather.wildwoodnaturist.com/downloads.php.


AstroSteve

  • Gentle Breeze
  • **
  • Posts: 42
    • KJ6IIW
    • KCAACTON3
  • Station Details: Davis Vantage Pro 2 Wireless, iMac 27"
Re: NOAA style files
« Reply #28 on: October 19, 2014, 04:57:05 PM »
I posted this information in a new thread, but figured I better post it here too in case any one coes here looking for help.

When V2 of WeatherCat came out, I noticed that my wind data has been reporting incorrectly.  With the option to report Snow added in this version, the format of the WCTtags file changed, everything after Rain in the STMONTHLY section was shifted over one column to make room for the Snow data.  If you have been using my script to create the NOAA files, you need to replace it with this updated one. Here is the new script.

If, like me, you didn't notice this change till after the end of last month, you need to recreate Septembers files from your database using the files in the first post of this thread.

staze

  • Strong Breeze
  • ***
  • Posts: 192
    • CW9669
    • KORSPRIN10
    • Everybody Staze...
  • Station Details: Davis Vantage Vue, Weatherlink Serial, FTDI USB-Serial Adapter, Mac Mini Server (Late 2012), 10.11 Server
Re: NOAA style files
« Reply #29 on: October 23, 2014, 09:29:50 PM »
AstroSteve,

See my post here (http://athena.trixology.com/index.php?topic=1422.msg12067#msg12067). Any thoughts?
"You mean, you'll put down your rock and I'll put down my sword and we'll try and kill each other like civilized people?"