Author Topic: NOAA-style Reports never auto updating  (Read 1080 times)

0 Members and 1 Guest are viewing this topic.

Offline pimohdaimaoh

  • Forecaster
  • *****
  • Posts: 300
  • "Be aware to our nature"
    • PIMOHWEATHER
NOAA-style Reports never auto updating
« on: April 01, 2018, 09:36:38 AM »
Hello ken,

Im start to wondering how to fix this, I forgot to tell you about this NOAA-style Reports not auto updating on the web, I follow every instructions from you regarding this but unfortunately untill now I still cant make the html auto converts to NOAA2018-01 to NOAA2018-03.txt. According from your sripts at the end of the month, the html files for NOAANNNN-NN.html for example should auto converted to text, but still never happened.

pls. tell me where I missed the part of the script to edit. Thanks and more power to your ajax script talent.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA-style Reports never auto updating
« Reply #1 on: April 01, 2018, 05:27:04 PM »
The wxnoaareports script I wrote only handles WeatherLink, Cumulus (1.x) and VWS reports -- they all use .txt files.

You are using Weather-Display, which doesn't do a .txt report, but a .htm report -- my script doesn't handle that.  Perhaps you got a modified script from somewhere else??

BTW.. the auto-update for WeatherLink relied on uploading NOAAMO.TXT, NOAAYR.TXT, NOAAPRMO.TXT and NOAAPRYR.TXT files computed by WeatherLink and uploaded by WeatherLink.  Then when the month rolls-over, the NOAAPRMO.TXT becomes the NOAAYYYY-MM.TXT for last month, and NOAAPRYR.TXT becomes the NOAAYYYY.TXT (for last year).   For Cumulus1.x and VWS, no auto-rollover is needed (or done).

It's likely that your Weather-Display is not configured to upload the daily NOAA reports to the web .. it should do so after midnight (local time) each day.
« Last Edit: April 02, 2018, 02:06:25 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline pimohdaimaoh

  • Forecaster
  • *****
  • Posts: 300
  • "Be aware to our nature"
    • PIMOHWEATHER
Re: NOAA-style Reports never auto updating
« Reply #2 on: April 02, 2018, 09:02:33 AM »
Hello Ken,

Thanks for the clarification regarding this, therefore. I should not posting this scripts on my web since it is not supported to WD, I guess I have to find something similar to this scripts but supported to WD. So sad to hear that since this will be important to recall post weather recording throughout the year, now I realized its not gonna work with this scripts. Regarding the configuration, it is configured actually I set to auto upload dailynoaa.html etc. to my web root, thats why you can viewed it but includes the html scripts since it is produced automatically by WD in which I thought it can also be converted to .txt file needid by this scripts you made.
« Last Edit: April 02, 2018, 09:06:14 AM by pimohdaimaoh »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA-style Reports never auto updating
« Reply #3 on: April 02, 2018, 07:22:56 PM »
I just took a look at the NOAA style reports WD makes  (dailynoaareportMYYYY.htm and noaareportyearYYYY.htm) and did some mods to the V2.06 Cumulus script to work with WD (V2.07).

You'll need to add to Settings-weather.php a new variable:

$SITE['NOAAdir'] = './'; // point to directory containing the dailynoaareport*.htm and noaareportyear*.htm files

Then this should work with WD .. give it a try :)

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline spweather

  • Contributor
  • ***
  • Posts: 130
    • Sand Point Weather
Re: NOAA-style Reports never auto updating
« Reply #4 on: April 03, 2018, 11:01:11 AM »
Hi,

My site's reports seldom update automatically, but do sometimes? I just manually copied the March report.

Because my site is using Ken's Saratoga Template set configured for WD (Settings & Settings-weather) but I chose to use the NOAA Reports created by WL.

So I thought the standalone version of NOAA-reports "NOAA-reports-test.php" configured for WL was best for me.

Does this sound right?

Dennis
Regards,
Dennis

- Davis Wireless Vantage Pro2 Plus w/24hr FARS
- Davis (Ultra)Sonic Anemometer
- Boltek/MicroLDN TOA Lightening Detection
- Porcupine Labs LR4/Fluke 414D Laser Rangefinder snow depth measuring sensor


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA-style Reports never auto updating
« Reply #5 on: April 03, 2018, 11:41:48 AM »
If your WD is uploading the dailynoaareport*.htm and noaareportyear*.htm, then the .zip I attached above will work fine with WD and Saratoga templates.  The 'WL' configuration is for WeatherLink which uses .TXT files (like Cumulus(1.x) and VWS).
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline spweather

  • Contributor
  • ***
  • Posts: 130
    • Sand Point Weather
Re: NOAA-style Reports never auto updating
« Reply #6 on: April 03, 2018, 02:19:59 PM »
Ken,

Thanks for including WD's reports as an option to the NOAA-Reports.

My WL data goes back a number of years before I purchased WD and is much more accurate/complete so I prefer using WL for the NOAA reports.

Just not sure why my page is unreliable when it comes to auto updating.

Dennis
Regards,
Dennis

- Davis Wireless Vantage Pro2 Plus w/24hr FARS
- Davis (Ultra)Sonic Anemometer
- Boltek/MicroLDN TOA Lightening Detection
- Porcupine Labs LR4/Fluke 414D Laser Rangefinder snow depth measuring sensor


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA-style Reports never auto updating
« Reply #7 on: April 03, 2018, 03:11:31 PM »
To try it with WD, you'll need to upload the attached version 2.07 in this post  Prior versions did not support WD.  It will also work with WeatherLink, VWS, Cumulus and wview.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline spweather

  • Contributor
  • ***
  • Posts: 130
    • Sand Point Weather
Re: NOAA-style Reports never auto updating
« Reply #8 on: April 03, 2018, 04:06:47 PM »
Sorry, I'm not explaining myself well.

Using WD as the primary source of weather data for my Saratoga Template pages and configured in Settings and Settings-weather.

I prefer to use WL to generate the reports on my NOAA reports template page. Only this page would be configured for WL. Wouldn't you consider this standalone?

Which of your (Ken) NOAA- Reports options would you recommend for this?
- NOAA-reports-test.php (v1.07) or
- include-NOAA-reports-V2.07.zip

Dennis
Regards,
Dennis

- Davis Wireless Vantage Pro2 Plus w/24hr FARS
- Davis (Ultra)Sonic Anemometer
- Boltek/MicroLDN TOA Lightening Detection
- Porcupine Labs LR4/Fluke 414D Laser Rangefinder snow depth measuring sensor


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA-style Reports never auto updating
« Reply #9 on: April 03, 2018, 04:16:07 PM »
Ahh.. thanks for the clarification.  The V2.07 is designed to work within the Saratoga template and uses the ONE weather software designated in Settings-weather.php.  The V1.07 (standalone) is the one to use for your specific instance -- it is not 'template aware' and so works with your existing WeatherLink NOAA report files.

IF you wanted to ALSO display the Weather-Display dailynoaareport/noaareportyear files then using the wxnoaaclimatereports.php and include-NOAA-reports.php (2.07) would work and not interfere with your existing WL displays using the NOAA-reports-test.php V1.07;
otherwise, no additional installation is needed.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline spweather

  • Contributor
  • ***
  • Posts: 130
    • Sand Point Weather
Re: NOAA-style Reports never auto updating
« Reply #10 on: April 03, 2018, 07:22:36 PM »
Ken,

Any notion why my NOAA-reports-test.php (v1.07) page usually fails to auto update? Once in a while it will work.

Note: I recently migrated to a PHP v7.1.14 provider, however the problem has existed for years under PHP 5xx also.

Dennis
Regards,
Dennis

- Davis Wireless Vantage Pro2 Plus w/24hr FARS
- Davis (Ultra)Sonic Anemometer
- Boltek/MicroLDN TOA Lightening Detection
- Porcupine Labs LR4/Fluke 414D Laser Rangefinder snow depth measuring sensor


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA-style Reports never auto updating
« Reply #11 on: April 03, 2018, 10:14:17 PM »
It likely has to do with the NOAA-reports-test.php V1.07 code
Code: [Select]
if ($Naming == 'WL') { // check for month/year rollover and update

  if(! file_exists("$NOAAdir/NOAA$prior_year-$prior_month.TXT") and
       file_exists($LastMonthFile) ) {
   print "<!-- copying $LastMonthFile to $NOAAdir/NOAA$prior_year-$prior_month.TXT -->\n";
   if (copy($LastMonthFile,"$NOAAdir/NOAA$prior_year-$prior_month.TXT")) {
     print "<!-- copy successful -->\n";
   } else {
     print "<!-- unable to copy -->\n";
   }
   }

  if(! file_exists("$NOAAdir/NOAA$last_year.TXT") and
       file_exists($LastYearFile) ) {
   print "<!-- copying $LastYearFile to $NOAAdir/NOAA$last_year.TXT -->\n";
   if (copy($LastYearFile,"$NOAAdir/NOAA$last_year.TXT")) {
     print "<!-- copy successful -->\n";
   } else {
     print "<!-- unable to copy -->\n";
   }

   }
}
which works, but relies on the local midnight time to have the current NOAAPRMO.TXT and NOAAPRYR.TXT files actually have contents of last month/last year when executed.

You should change the script from
Code: [Select]
$now_year = $now['year'];
$prior_month = $now['mon'] - 1;
to
Code: [Select]
$now_year = $now['year'];
$now_hour = $now['hours'];
$prior_month = $now['mon'] - 1;
and the big code above to
Code: [Select]
if ($Naming == 'WL') { // check for month/year rollover and update

  if(! file_exists("$NOAAdir/NOAA$prior_year-$prior_month.TXT") and
       file_exists($LastMonthFile) and
   $now_hour >= 6) {
   print "<!-- copying $LastMonthFile to $NOAAdir/NOAA$prior_year-$prior_month.TXT -->\n";
   if (copy($LastMonthFile,"$NOAAdir/NOAA$prior_year-$prior_month.TXT")) {
     print "<!-- copy successful -->\n";
   } else {
     print "<!-- unable to copy -->\n";
   }
   }

  if(! file_exists("$NOAAdir/NOAA$last_year.TXT") and
       file_exists($LastYearFile) and
   $now_hour >= 6 ) {
   print "<!-- copying $LastYearFile to $NOAAdir/NOAA$last_year.TXT -->\n";
   if (copy($LastYearFile,"$NOAAdir/NOAA$last_year.TXT")) {
     print "<!-- copy successful -->\n";
   } else {
     print "<!-- unable to copy -->\n";
   }

   }
}
so the auto-copy will only work at 06:xx local time or after on the 1st of each new month.  That's what the V2.07 code does (and what my site does) and that minimizes the exposure to getting stale data copied to last month's file.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline spweather

  • Contributor
  • ***
  • Posts: 130
    • Sand Point Weather
Re: NOAA-style Reports never auto updating
« Reply #12 on: April 04, 2018, 12:55:17 PM »
Thanks so much Ken.

I will apply your updates and keep my eye out next month.

When you get an opportunity, might you please update the NOAA-reports-test.php (v1.07) download available on your Saratoga-Weather.org website.

Dennis

Regards,
Dennis

- Davis Wireless Vantage Pro2 Plus w/24hr FARS
- Davis (Ultra)Sonic Anemometer
- Boltek/MicroLDN TOA Lightening Detection
- Porcupine Labs LR4/Fluke 414D Laser Rangefinder snow depth measuring sensor


Offline pimohdaimaoh

  • Forecaster
  • *****
  • Posts: 300
  • "Be aware to our nature"
    • PIMOHWEATHER
Re: NOAA-style Reports never auto updating
« Reply #13 on: April 04, 2018, 06:23:57 PM »
Oh Thank You for that Ken. Ok, I will try later since im out of town for today for some preventive mentainance of my client, th PAGASA's doppler radar. then later I will give this a try, a pleasure to have with this important script.

Offline pimohdaimaoh

  • Forecaster
  • *****
  • Posts: 300
  • "Be aware to our nature"
    • PIMOHWEATHER
Re: NOAA-style Reports never auto updating
« Reply #14 on: April 05, 2018, 12:35:41 PM »
I did to upload and it worked so far, now I realized my 2017 yearly data mostly missing. Im gonna update its csv from WU this time. . .


Thanks anyways sir ken, and Ill keep monitoring this for your official scripts for this.


Regards,


Mike