Author Topic: WeatherCat Scripts *BETA* of 2012-06-04  (Read 6992 times)

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
WeatherCat Scripts *BETA* of 2012-06-04
« on: June 04, 2012, 09:19:13 PM »
Dear WeatherCat AppleScript fans,

I've gone ahead and incorporated the minor tweaks to the AppleScripts that take advantage of new shutdown action delay that Stu has provided for us in WeatherCat 1.01.  Basically there are no changes to the AppleScripts themselves.  I just shortened the delays in Stop WeatherCat Scripts.  I've also updated the documentation appropriately.  You can download the latest-greatest version here:

http://www.canebas.org/WeatherCat/AppleScripts/WeatherCat%20Scripts%202012-06-04.zip

Upgrading is almost unnecessary.  If you want to be chic, all you need to do is:
  • Copy the AppleScript application file: Stop WeatherCat Scripts onto the top of the WeatherCat Scripts folder.  All of the "top-level" AppleScripts applications could be copied over for convenience.
  • Replace the contents of the Documentation folder with the current version.

The documentation says you need to quit all the running AppleScripts but you don't have to do that since Stop WeatherCat Scripts isn't running.

So come'n'Git it!!  [biggrin]

P.S. I did some additional thinking about nightmare scenarios in trying to shutdown WeatherCat and the entourage of AppleScripts.  If you really want to run WeatherCat on a machine that has very little human attention, you might want to follow the instructions associated with the start and stop scripts.  Using Automator or some cron-based utility is still vulnerable in some ways.

Randall75

  • Storm
  • *****
  • Posts: 1332
  • CWOP-CW6734 WeatherUnderground-KOHNEWAR6
    • CW6734
    • KOHNEWAR6
    • Randy's Weather On The Hill
  • Station Details: Davis Vantage Pro 2 Plus.iMac i5 OS High Sierra 10.13.6 8GB Ram, WeatherCat 3,Logitech 9000 Pro Web Cam
Re: WeatherCat Scripts *BETA* of 2012-06-04
« Reply #1 on: June 07, 2012, 07:42:20 PM »
Hi Edouard and Stu
 Why does the Stop Apple Scripts also shuts down WeatherCat?
Thanks
 [cheers1]

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Why is the option is still there? (Re: WeatherCat Scripts - 2012-06-04)
« Reply #2 on: June 07, 2012, 10:41:29 PM »
Howdy Randall and WeatherCat fans,

Why does the Stop Apple Scripts also shuts down WeatherCat?

Uh, are you asking why it does - or why there is the option that can be turned on?  It is supposed not to be enabled.  Is it enabled for your copy?

The reason I left it commented out was mostly for folks wishing to making their own scripts, but also because I could imagine some "doomsday" scenarios where no amount of delay would be sufficient.  The disaster I was imagining was if the Internet fails just as an automated installation of WeatherCat started an automatic shutdown.  In that case, it could literally take several minutes for all the AppleScripts to shutdown.

For anyone who doesn't have their setup shutdown completely unattended - no worries.  However, some folks would like to have WeatherCat completely take care of itself and want the ability to restart WeatherCat completely on its own.  If you want to make that process as bullet-proof as possible, the best thing to do is write a custom AppleScript that does the shutting down of WeatherCat, does whatever needs to happen while WeatherCat is shutdown and then restarts WeatherCat only after everything before that has been completed.

Most of us would find having a weather station setup like that . . . . . absolutely boring!!!   However, I've provided instructions for the bold person who wants to automate where no one has automated before.

Cheers, Edouard  [cheers1]

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1558
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: WeatherCat Scripts *BETA* of 2012-06-04
« Reply #3 on: July 25, 2012, 03:18:13 PM »
Edouard,

A question on the VP2 ET calculation: Are you doing any calculation in your script to display and store the P-M ET results, or is it calculated in the Console? The reason I ask, is that over time I've found discrepancies in my comparison of the Davis VP2 ET from your script and that from the CoCoRaHS ET Gage.

My CoCoRaHS ET Gage is working just fine, giving good results with other stations across Ohio. I know the weather can vary a lot across the state, and that shows in comparisons. But we've had a lot of hot, cloudless days this month, and those are all about the same.

The comparison to the VP2 is interesting. Firstly, the VP2 is shaded later in the morning and earlier in the evening than the CoCoRaHS ET Gage, so the VP2 sees less direct sunlight. So on really sunny days, the CoCoRaHS gauge sees a little higher evapotranspiration. On other days it is a toss-up, but they will be close.

On any day we have rain, the numbers get weird, and significant rain leads to a zero ET on the VP2, even if the day was mostly sunny with a heavy shower during the day. I'm wondering if the VP2 calculation is not really displaying ET but instead is showing the day's water balance, or net ET (daily ET minus daily rainfall.)

Davis vs CoCoRaHS Precip/ET log:  https://docs.google.com/spreadsheet/ccc?key=0AhiOaCqzSbmedGtwSTdnbEpodTV3UDUzVFViRU8wa0E

My ET readings to date are on my work-in-progress soil page http://www.avon-weather.com/soil.html

Thanks,
Steve
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Coming straight from Davis (Re: WeatherCat Scripts)
« Reply #4 on: July 25, 2012, 10:35:04 PM »
Howdy Steve and WeatherCat gardeners,

A question on the VP2 ET calculation: Are you doing any calculation in your script to display and store the P-M ET results, or is it calculated in the Console?

Actually all I do is grab the value that Stu gives me and then I do things like keep track of it over multiple days.  I do grab the value at 11:59 instead of exactly midnight, but I can't imagine the value would change in the seconds around midnight.

You can get your console to display the running ET value that is it computing. Just do <2nd> <Bar> on the console and it will replace the daily rainfall value with the daily ET value.  That way you can check.

The reason I ask, is that over time I've found discrepancies in my comparison of the Davis VP2 ET from your script and that from the CoCoRaHS ET Gage.

My CoCoRaHS ET Gage is working just fine, giving good results with other stations across Ohio. I know the weather can vary a lot across the state, and that shows in comparisons. But we've had a lot of hot, cloudless days this month, and those are all about the same.

The comparison to the VP2 is interesting. Firstly, the VP2 is shaded later in the morning and earlier in the evening than the CoCoRaHS ET Gage, so the VP2 sees less direct sunlight. So on really sunny days, the CoCoRaHS gauge sees a little higher evapotranspiration. On other days it is a toss-up, but they will be close.

That seems reasonable to me though.  The Penman?Monteith is an estimate and certainly if the solar sensor is getting less sunlight than your CoCoRaHS ET Gauge then the estimate should be less.

On any day we have rain, the numbers get weird, and significant rain leads to a zero ET on the VP2, even if the day was mostly sunny with a heavy shower during the day. I'm wondering if the VP2 calculation is not really displaying ET but instead is showing the day's water balance, or net ET (daily ET minus daily rainfall.)

Hmm, the script does compute the "net" ET for what it displays in the Growls and Emails, but it is exporting the raw ET value into the spreadsheet.  Which value are you using for your graphs?  If you are transferring the values from the email or Growl - yes indeed it will have the rainfall subtracted from it.  The spreadsheet values won't have that though.

If you are using the spreadsheet data, then perhaps the rainfall is causing the CoCoRaHS ET Gauge to behave differently.  Isn't that gauge getting wet during a rainstorm?  I thought the principle of the gauge was some sort of wicking mechanism?  If the wick is getting wet from the rain, that certainly would change the results.

On the other hand, Penman?Monteith estimate doesn't take into account anything about falling rain.  You can look at the formula on Wikipedia.  So it could be that the CoCoRaHS ET Gauge is taking into account something about the rainfall that the Penman?Monteith doesn't deal with at all.

Does that seem like a possible explanation?

Cheers, Edouard  [cheers1]

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1558
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Coming straight from Davis (Re: WeatherCat Scripts)
« Reply #5 on: July 26, 2012, 12:27:56 AM »

Hmm, the script does compute the "net" ET for what it displays in the Growls and Emails, but it is exporting the raw ET value into the spreadsheet.  Which value are you using for your graphs?  If you are transferring the values from the email or Growl - yes indeed it will have the rainfall subtracted from it.  The spreadsheet values won't have that though.

Ah, therein lies my problem! To make it easy, I just leave the Growl notification onscreen until I enter my CoCoRaHS details in the morning, then dismiss them. I'll go back to my spreadsheet and edit the data based on the spreadsheet.

Yes, I had looked at the Wikipedia data and the notes for the script, and didn't see that precipitation was calculated in the P-M formula. I didn't notice it saying anything about the Growl notification displaying "net" ET.

Thanks for the clarification, Edouard!
Steve
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1558
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: WeatherCat Scripts *BETA* of 2012-06-04
« Reply #6 on: July 26, 2012, 06:30:23 PM »
I've updated the spreadsheet to reflect the actual daily ET and updated the thread discussion the CoCoRaHS ET gauge here and on MacWeather.

http://athena.trixology.com/index.php?topic=294.msg3470#msg3470

Thanks again, Edouard,
Steve
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Glad it was easy!! (Re: WeatherCat Scripts)
« Reply #7 on: July 26, 2012, 10:48:03 PM »
Howdy Steve and WeatherCat fans,

Ah, therein lies my problem! To make it easy, I just leave the Growl notification onscreen until I enter my CoCoRaHS details in the morning, then dismiss them. I'll go back to my spreadsheet and edit the data based on the spreadsheet.

Sorry for the surprise but glad it all worked out okay!

Yeah, I also check the Evapotranspiration Growls every morning as I get up and wake up the computer.  That's how I try to decide how much to water.  Unfortunately, it is anything but fool-proof.  Two weeks ago I found that I had so under-watered the lawn at the bottom of the house that the sprinklers will starting to wiggle because of the cracks in the ground!!

Cheers, Edouard  [cheers1]

embayweather

  • Strong Breeze
  • ***
  • Posts: 187
    • DW3656
    • lENGLAND128
    • Lancastrian Imaging
  • Station Details: Oregon WM928, Intel Mac 2.5Ghz, I5 Quad core, Met Office spec manual instruments, Cat, WD, 1-wire, Labjack, Lightning Radar
Zambretti Forecaster
« Reply #8 on: August 27, 2012, 10:11:50 PM »
As I have so little to do (yeah right) I thought I would monitor the accuracy of this script. Not Edouards coding but the rationale behind it. It runs for me at 0900 z every morning. So far it is above 90% accurate, possibly even approaching 95% if you allow for poetic licence. A useful piece of programming for me at least. Thanks once again Edouard, you are a star!!

Best wishes

Mike

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Wish there were "regional editions" (Re: Zambretti Forecaster)
« Reply #9 on: August 27, 2012, 11:03:39 PM »
Howdy Mike and Zambretti forecast fans,

As I have so little to do (yeah right) I thought I would monitor the accuracy of this script. Not Edouards coding but the rationale behind it. It runs for me at 0900 z every morning. So far it is above 90% accurate, possibly even approaching 95% if you allow for poetic licence. A useful piece of programming for me at least. Thanks once again Edouard, you are a star!!

Well, actually I deserve none of the credit.  The forecast mechanism truly dates from 1912 and I simply translated someone else's software implementation from JavaScript to AppleScript.

Nonetheless, I was reasonably certain it would produce a very accurate forecast for the British Isles and some parts of Northern Europe (although I don't know how far south you can go and still be accurate.)

I'm fairly certain the unique climatic features associated with the gulf stream were simply noticed after many decades of observation.  When you have the good fortune of having a combination of wind direction and barometric pressure being a very reliable indicator of upcoming weather, why not put it into a slide rule forecaster!

I have a feeling there are many places where similar forecasters could be perfected.  Tony for example seems to describe a similar situation where wind direction is a strong indicator of storms.  It would be interesting if some academics tried to create a few regional additions of the Negretti and Zambra forecaster that are just as accurate for those regions as the original is for the UK.

Oh well, daydreaming I guess . . . .  [sleep]

Cheers, Edouard  [cheers1]

embayweather

  • Strong Breeze
  • ***
  • Posts: 187
    • DW3656
    • lENGLAND128
    • Lancastrian Imaging
  • Station Details: Oregon WM928, Intel Mac 2.5Ghz, I5 Quad core, Met Office spec manual instruments, Cat, WD, 1-wire, Labjack, Lightning Radar
Re: WeatherCat Scripts *BETA* of 2012-06-04
« Reply #10 on: August 31, 2012, 10:16:17 PM »
Not a daydream, surely there are any number of Masters and Phd students who could find a useful project or two in there. And, with so many weather stations around no shortage of data when compared to 1912. Even with the wealth of data we collect there must be some way to identify similar patterns world wide. Chuck in Weather underground data and voila, but then again perhaps I AM daydreaming.
Thanks anyway.

Best wishes

Mike

HairyMcLeary

  • Strong Breeze
  • ***
  • Posts: 164
    • DW5912
    • INORTHOT6
  • Station Details: LaCrosse WS2355, iMac 2.66 Ghz Core 2 Duo, 8 GB RAM, Mountain Lion
Re: Wish there were "regional editions" (Re: Zambretti Forecaster)
« Reply #11 on: September 01, 2012, 12:11:45 AM »
Howdy Mike and Zambretti forecast fans,

I have a feeling there are many places where similar forecasters could be perfected.  Tony for example seems to describe a similar situation where wind direction is a strong indicator of storms. 
Cheers, Edouard  [cheers1]

It has never occurred to me that there could be places in the world where current wind direction didn't indicate storms etc. Something I've always taken for granted.

Interestingly I have found the Zambretti forecaster to be extremely unreliable, not sure why. I had often thought it could be made to work here down under... by somebody with a few more clues than me!

Though having said that, New Zealand is reputed to be be one of the most difficult places in the world to forecast for, due to its narrowness and lying in the middle of the roaring forties. A few degrees change in wind direction can mean a storm up one side of the Island, that misses the other, due to the Southern Alps running down the spine separating the two parts.

Tony