Author Topic: WXSIM 3in1 Forecast Script  (Read 22056 times)

0 Members and 1 Guest are viewing this topic.

Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: WXSIM 3in1 Forecast Script
« Reply #25 on: January 07, 2015, 03:46:36 PM »
It is now showing winddir in degrees but, it is showing everything 11 past the hour.

wxsim is set to 7 mins past the hour

wxsimate is set to 5 mins past the hour as show by the link.

If I set it to 0 then it shows 55 mins PRIOR to the hour it suppose to run.

What should the time have anything to do with it though when it work previously with how I had my time set.

The lastret.txt in the root is not the one I use with the previous version of the 3-1 script.


Offline SteveFitz1

  • Forecaster
  • *****
  • Posts: 521
    • Tyler Texas Weather
Re: WXSIM 3in1 Forecast Script
« Reply #26 on: January 07, 2015, 04:28:42 PM »
I know I'm a little late to this rodeo, but when looking at your output, something caught my eye. In the graph section that is blank, the current time you show for Updated is 3:01PM. What confuses me is that you stated WxSim is run at 7 minutes past the hour. I run my WxSimate at 6 past the hour, then WxSim at 15 past the hour. Because it takes a few minutes for WxSim to run, it finishes at about 21 minutes past the hour. When I look at my WxSim graph, it shows as updated at 21 minutes past the hour.

I'm wondering why your Updated time is 1 minute after the hour, even though you don't run WxSim until 7 minutes after the hour. I would expect the Updated time to be somewhere between 10 and 15 minutes after the hour.

Steve

Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: WXSIM 3in1 Forecast Script
« Reply #27 on: January 07, 2015, 04:40:10 PM »
Steve, I did notice that to be rather strange too that it shows it updated 1 min past the hour even though the lastret.txt is showing 55 mins past the hour.

The only reason I have it set at what it is set now is because that is what the suggested based on a link from another post a few posts back. So I decided to try that.

Now I was running it like you where WxSimate was ran 5 mins past the hour and WxSim 12 mins past the hour but it was suggested that was probably the cause of my issue, so I changed it. It is rather strange it shows it was updated 1 min past the hour. I have no idea why it is showing that. I really don't think it has anything to do with the time it was ran to be honest as it worked fine on previous versions of the 3-1 script and if yours is working and you're not running it at the top of the hour then that debunks that theory of it needing to be on top of the hour.

I really think it has something to do with the output of WxSim and not so much as what time it outputs but I can't put my finger on what exactly.

Offline SteveFitz1

  • Forecaster
  • *****
  • Posts: 521
    • Tyler Texas Weather
Re: WXSIM 3in1 Forecast Script
« Reply #28 on: January 07, 2015, 05:36:02 PM »
I just looked at your 4PM run and am more confused. Like the previous run, it shows last update at 1 minute past the hour. However, when I look at lastret.txt, it still shows 12:55PM as the last time it was updated. It doesn't appear WxSimate is being run each time prior to WxSim.

If you don't mind, could you either post or PM me the following:
1) Image of WRET screen
2) Image of WxSim Scheduler
3) Image of WxSimate Scheduler
4) Source of wxall.settings.php

I'll take a look at these later this evening.

Thanks,

Steve

Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: WXSIM 3in1 Forecast Script
« Reply #29 on: January 07, 2015, 08:28:01 PM »
Thanks Steve, that is one of the things I have been noticing too. It seems like everything is two hours behind. I think it may be WD not uploading it on time. All the requested information you can see on this post.

http://www.wxforum.net/index.php?topic=24584.msg238969#msg238969


Offline SteveFitz1

  • Forecaster
  • *****
  • Posts: 521
    • Tyler Texas Weather
Re: WXSIM 3in1 Forecast Script
« Reply #30 on: January 08, 2015, 12:04:40 AM »
I took a look at your data and saw a couple of items, plus I have a couple of questions.

1) The 7 minutes between WxSimate's download start time and WxSim's start time should be enough for WxSimate to finish. Have you watched it just to validate WxSimate is finished before WxSim starts?
2) I just looked at your latest WxSim run and it appears to be at 7:55PM tonight. However, according to the schedules in both WxSimate and WxSim, there should be 2 additional runs since then. Do you keep them up and running all the time? Just wondering why there's nothing later than 7:55PM.
3) I noticed in the scheduled times for WxSimate, you have have a download for 11PM. I think you want this to be 10PM to match the WxSim schedule.
4) One item I'd suggest you change is the $uploadupdate parameter in wxall.settings.php. You currently have it set to 7. I'd recommend you change it to 00 and see if that changes the times for each forecast in lastret.txt.

Also, when you get a chance, could you post the opening screen for both WxSim and WxSimate?

Thanks,

Steve

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: WXSIM 3in1 Forecast Script
« Reply #31 on: January 08, 2015, 03:00:40 AM »
Steve, I did notice that to be rather strange too that it shows it updated 1 min past the hour even though the lastret.txt is showing 55 mins past the hour.
 . . shortened . .
Well the rest of the data seems OK, so i added one line to the wxall.lastret.php file and loaded your lastret.txt again.  All output is shown when sivu2.php is run.
===
Please make a copy of your wxsim/wxall.lastret.php , unzip the attachement and replace the wxsim/wxall.lastret.php with this version. As there are multiple versions around we need that backup if something else fails in your version of the scripts.
===
You should find the reason for the other problems but at least you get the output you want from this script.
===
The added line 10 does not interfere with your lastret.txt once the dates are correctly delivered by wxsim. All dates ending on  :00 :30 :25 :55 can be used.

Wim

Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: WXSIM 3in1 Forecast Script
« Reply #32 on: January 08, 2015, 11:42:53 AM »
1) The 7 minutes between WxSimate's download start time and WxSim's start time should be enough for WxSimate to finish. Have you watched it just to validate WxSimate is finished before WxSim starts?

Yes I have, I have 8 monitors so I see it run all the time and it does finish without errors.

2) I just looked at your latest WxSim run and it appears to be at 7:55PM tonight. However, according to the schedules in both WxSimate and WxSim, there should be 2 additional runs since then. Do you keep them up and running all the time? Just wondering why there's nothing later than 7:55PM.

Yes, they stay up and running 24/7 and that is the one thing I can't figure out myself and has me wondering why it is skipping 1-2 runs before it. What is strange is once the next run hits, then the missing one shows as the current and so on down the line. I even went into WD and double checked my upload settings but, that shouldn't have to much bearing for why wxsim is showing 55 mins.

3) I noticed in the scheduled times for WxSimate, you have have a download for 11PM. I think you want this to be 10PM to match the WxSim schedule.

Yes I do, thanks for that catch. I made that change. I may change both to 11 PM for the compare script since I think it needs to be ran as close to midnight as possible but that is something I will address at that time.

4) One item I'd suggest you change is the $uploadupdate parameter in wxall.settings.php. You currently have it set to 7. I'd recommend you change it to 00 and see if that changes the times for each forecast in lastret.txt.

I have tried it many different ways both at 7 and at 0 and others but, not at 00 so I will give that a shot.

Also, when you get a chance, could you post the opening screen for both WxSim and WxSimate?

Here you go. One thing I have noticed is in Wxsim for example. It always shows the last run 5 mins before the time set to run. I.E. for the 10 AM run it was 9:55 AM. Currently it shows 10:34 because I closed it and reopened it prior to taking the screen shot but, the trend is it is always 55 past the hour or 5 mins before the run is suppose to run. I am not sure where that needs to be set to change it on the hour or if this is something in the BIOS of my computer. I think that may be where my problem is and I might need to email Tom. As Wim Pointed out from an old lastret.txt at one point it did work at the top of the hour. Not sure what changed before then and now though.


Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: WXSIM 3in1 Forecast Script
« Reply #33 on: January 08, 2015, 11:46:51 AM »
You should find the reason for the other problems but at least you get the output you want from this script.

I completely agree and plan to get to the bottom of it as I would like it to run correctly.

The fix you implement is currently working at the moment and I have made a copy of the original file.

The only small issue on the graph is the extra characters after the temp.

Offline SteveFitz1

  • Forecaster
  • *****
  • Posts: 521
    • Tyler Texas Weather
Re: WXSIM 3in1 Forecast Script
« Reply #34 on: January 08, 2015, 12:04:00 PM »
The only small issue on the graph is the extra characters after the temp.

Look at line 41 in your wxall.settings.php. That character string is what you've defined for your degree symbol. Replace it with either ° or the degree symbol itself by holding the ALT key and keying 248 on the numbers keypad.

Steve

Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: WXSIM 3in1 Forecast Script
« Reply #35 on: January 08, 2015, 12:19:56 PM »
Look at line 41 in your wxall.settings.php. That character string is what you've defined for your degree symbol. Replace it with either ° or the degree symbol itself by holding the ALT key and keying 248 on the numbers keypad.

That did the trick. I had the correct units un-commented but for some reason for degrees these weird '吏퇒 characters had replaced it. All is good now for that. Thanks!

Offline SteveFitz1

  • Forecaster
  • *****
  • Posts: 521
    • Tyler Texas Weather
Re: WXSIM 3in1 Forecast Script
« Reply #36 on: January 08, 2015, 01:25:18 PM »
I had another thought about the "55 minutes after the hour" issue. I went out to the WxSim forum and performed a search on "Effective Time". I found a couple of older items where the "Effective Time" was something other than "00". From what I gathered, their issue was caused by corrupted WD logfiles. Not being a WD user, I'm not exactly sure what that means. But I thought it might give you a place to start lookiing.

Steve

Offline kocher

  • Senior Member
  • **
  • Posts: 85
    • San Sebastian (Spain)
Re: WXSIM 3in1 Forecast Script
« Reply #37 on: January 08, 2015, 03:25:20 PM »
To get the exact time, the most important thing is to set the minute delay in WXSIMATE.
This is what I propose:
If your weather station data download every 5 minutes, a good value for WXSIMATE be 7 or 8
Windows 7 Pr
Davis Vantage Pro Plus f.a.
WeatherLink 6.0.2
Meteotemplate 15.0 Black Currant
CumulusMX
GraphWeather Version 3.0.15


Offline MesquiteWx

  • Forecaster
  • *****
  • Posts: 610
    • Mesquite Weather
Re: WXSIM 3in1 Forecast Script
« Reply #38 on: January 08, 2015, 04:34:05 PM »
Well I think I found my culprit.

I set my times based off of recommendations from Tom and other scripts that use Wxsim like the Forecast Compare script. So now this is making more sense as to why it was set the way it was.

The 5 mins before the hour is best for us in the U.S. but for others outside of the U.S. top of the hour is better. So the script should be altered to handled the two settings which Wim did alter with that last fix.

« Last Edit: January 08, 2015, 04:36:26 PM by MesquiteWx »

Offline kocher

  • Senior Member
  • **
  • Posts: 85
    • San Sebastian (Spain)
Re: WXSIM 3in1 Forecast Script
« Reply #39 on: January 08, 2015, 04:49:40 PM »
Do I Fix?

! Congratulations!     :lol:
Windows 7 Pr
Davis Vantage Pro Plus f.a.
WeatherLink 6.0.2
Meteotemplate 15.0 Black Currant
CumulusMX
GraphWeather Version 3.0.15


Offline SteveFitz1

  • Forecaster
  • *****
  • Posts: 521
    • Tyler Texas Weather
Re: WXSIM 3in1 Forecast Script
« Reply #40 on: January 08, 2015, 05:29:50 PM »
Well I think I found my culprit.

Congratulations!!! I don't know that I've ever gotten into that part of WxSimate. The interesting thing is that when I look on my system, the "Use 0 Minutes" is checked. This is how it's been since I received the customization from Tom when I purchased a couple of years ago.

Steve

Offline tnwxman

  • Forecaster
  • *****
  • Posts: 423
  • KK4QXH
    • Weather for Lebanon, TN 37087
Re: WXSIM 3in1 Forecast Script
« Reply #41 on: January 15, 2015, 07:45:54 PM »
Hi,

I have given this a try and this is what I get. My data files are uploaded. Let me know what I have overlooked.

http://lebanontnwx.org/sivu2.php

Thanks.

Bob
Bob
KK4QXH

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: WXSIM 3in1 Forecast Script
« Reply #42 on: January 15, 2015, 10:22:13 PM »
I also tried to get this work but having issues with the graph not showing up.  Ideas?

http://www.harpersferry-weather.com/wxsim_wxall/sivu2.php

Settings:
$wxallmainfolder = '';                     
# Full paths
$wxallmainfolderfull = '/home1/harpersf/public_html/wxsim_wxall/';
$plaintextfolderfull = '/home1/harpersf/public_html/wxsim_wxall/';
$lastretfile = '/home1/harpersf/public_html/wxsim_wxall/lastret.txt';
$plaintextfile = '/home1/harpersf/public_html/wxsim_wxall/plaintext.txt';


Update: Using Chrome I can see the following 2 errors
1) Uncaught SyntaxError: Unexpected token  sivu2.php:81    On line 81 I have jstart:
2) Uncaught ReferenceError: wxsimconf is not defined   wxsim.js:24    On line 24 I have lang: {weekdays: wxsimconf.days,thousandsSep: ""},
« Last Edit: January 16, 2015, 07:52:32 AM by tstorm »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: WXSIM 3in1 Forecast Script
« Reply #43 on: January 16, 2015, 10:50:27 AM »
I also tried to get this work but having issues with the graph not showing up.  Ideas?

http://www.harpersferry-weather.com/wxsim_wxall/sivu2.php

. . . shortened . . .
@tstorm and @future readers

The data on the sivu2.php page comes from
plaintext.txt  => icons and first tab
lastret.txt => other tabs and graphs.

1. Open your lastret.txt  http://www.harpersferry-weather.com/wxsim_wxall/lastret.txt and check the date (UTC) at the end of each data line.
Code: [Select]
0 2015-01-16_09:52_UTC
 0 2015-01-16_10:22_UTC
0 2015-01-16_10:52_UTC
At least one of these date-time should be exactly on the hour. In this case they should be
Code: [Select]
0 2015-01-16_09:30_UTC
 0 2015-01-16_10:00_UTC
0 2015-01-16_10:30_UTC

Lines without :00_UTC are ignored,. With this lastret.txt here will be no graphs and no other tabs besides the first one as there are no  VALID data linesfor the script to process.

Solution:
Modify line 10 of the attached script to match your minute settings
Code: [Select]
$from = array (':22_UTC',':52_UTC'); $to = array (':00_UTC',':30_UTC'); $csv = str_replace($from,$to,$csv);
In this example it is already correct for @tstorm :  :22_UTC will be transformed to :00_UTC and so on.

Succes, Wim
« Last Edit: January 16, 2015, 10:57:59 AM by wvdkuil »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: WXSIM 3in1 Forecast Script
« Reply #44 on: January 16, 2015, 11:15:44 AM »
Hi,
I have given this a try and this is what I get. My data files are uploaded. Let me know what I have overlooked.
http://lebanontnwx.org/sivu2.php

Thanks.
Bob
If the settings are correct sivu2.php should at least display some data, more then the time lines.

There is no way we can now see what is wrong, so we have to enable the error display .
Depending of your version search for the first <?php in the sivu2.php script, you will find that near:
Code: [Select]
<!-- HEAD START -->
<!-- Put this part inside <head> and </head>-tags, needed on ALL pages using 3in1 -->
<?php 
Change that line to
Code: [Select]
<?php    ini_set('display_errors''On');  error_reporting(E_ERROR );  $lang='en';
Now a large amount of notices, warnings and hopefully one or two  errors should be displayed.

We need the error messages from sivu2.php, if none then we have to switch error display on in the next script and so on.

It will probably help is you make a copy of wxall.settings.php as wxall.settings.txt and add that as an attachement to your next post.

=== Times in lastret.txt
Check my posts about this item, last one at @tstorm.
Also change the wxall.lastret.php as your date times are also of with 25 minutes.
Code: [Select]
0 2015-01-16_12:55_UTC
0 2015-01-16_13:25_UTC
Line 10should be added in wxall.lastret.php   with:
Code: [Select]
$from = array (':25_UTC',':55_UTC'); $to = array (':00_UTC',':30_UTC'); $csv = str_replace($from,$to,$csv);

===

Wim

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: WXSIM 3in1 Forecast Script
« Reply #45 on: January 16, 2015, 11:37:51 AM »
Thanks Wim.  The graphic now shows.  Not sure why but there's timing issue.  The sun shows in the night and the moon during the daytime on the graph.

http://www.harpersferry-weather.com/wxsim_wxall/sivu2.php

Thanks,

John

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: WXSIM 3in1 Forecast Script
« Reply #46 on: January 16, 2015, 11:45:56 AM »
Thanks Wim.  The graphic now shows.  Not sure why but there's timing issue.  The sun shows in the night and the moon during the daytime on the graph.
http://www.harpersferry-weather.com/wxsim_wxall/sivu2.php
Thanks,
John
You should check your wxall.settings.php Maybe a typing error with the time zone or a positive value for $long where it should be negative (east of London = negative). If that not solves it => copy wxall.settings.php => wxall.settings.txt and attache it to your next post. There is a lot of knowledge on this forum how these settings should be set.

Wim

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: WXSIM 3in1 Forecast Script
« Reply #47 on: January 16, 2015, 11:50:54 AM »
]You should check your wxall.settings.php Maybe a typing error with the time zone or a positive value for $long where it should be negative (east of London = negative). If that not solves it => copy wxall.settings.php => wxall.settings.txt and attache it to your next post. There is a lot of knowledge on this forum how these settings should be set.

Wim

Thanks!  I forgot to set the $long to be negative. 

John
« Last Edit: January 16, 2015, 11:52:39 AM by tstorm »

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: WXSIM 3in1 Forecast Script
« Reply #48 on: January 16, 2015, 02:37:27 PM »
Ok.  So I have everything working fine with the test page, but now I'm having a bear of a time figuring out how to get it into the template.  I've attached my wxsim.php file.

http://www.harpersferry-weather.com/wxsim.php

John
« Last Edit: January 16, 2015, 02:41:20 PM by tstorm »

Offline tnwxman

  • Forecaster
  • *****
  • Posts: 423
  • KK4QXH
    • Weather for Lebanon, TN 37087
Re: WXSIM 3in1 Forecast Script
« Reply #49 on: January 16, 2015, 04:52:43 PM »
Wim,

I think it has to do with paths. I have all the separate files in your zip (excerpt the ones you said to exclude) in my root directory of lebanontnwx.org. I created the img, css and js folders and copied the appropriate files there. Lastret and plaintext files are in the root also.

Attached are my file.

Let me know.

Thanks.

Bob
Bob
KK4QXH