Author Topic: Current Conditions Calculator - additional rules anyone ?  (Read 10079 times)

testmatch

  • Gentle Breeze
  • **
  • Posts: 61
    • EW7347
    • IENGLAND665
    • Dunchurch Weather
  • Station Details: Davis Vantage Pro 2 Plus, Mac mini
Re: Current Conditions Calculator - additional rules anyone ?
« Reply #15 on: February 10, 2016, 09:20:55 AM »
That is a long explanation of how there is an honoured history of shamelessly "borrowing" the bits you like. That's why we have a forum.
So what you're saying is that we're a community of practice as defined by http://wenger-trayner.com/introduction-to-communities-of-practice/ and not merely a collection of plagiarists. Have I got that right?  ;D

And you've reminded me that I've got some student assignments to feed through the plagiarism checker...

John

dfw_pilot

  • Gale
  • ****
  • Posts: 345
    • GW3252
    • KTNWILLI1
    • WX Page
  • Station Details: Davis Pro2 Plus
Plagiarism vs Research
« Reply #16 on: February 10, 2016, 04:16:25 PM »
Just remember, John, that if a student copies off of one person, it's called plagiarism, but if a student copies off of a lot of people, it's called research.

Fine line :)

Edit: I forgot to say that I spent some time editing the CCC as well. I went a little more granular than my wife would have. All she would put in would be: (50F> Return 'Freezing')
A clear conscience is a great pillow.


dfw_pilot

  • Gale
  • ****
  • Posts: 345
    • GW3252
    • KTNWILLI1
    • WX Page
  • Station Details: Davis Pro2 Plus
Clear
« Reply #17 on: August 11, 2016, 10:14:11 PM »
I just wanted to bump this thread to ask again how the CCC works with a Davis unit.

My current condition is "Clear" but that isn't in any of the rules I've set up. Where is WXCat getting the "clear" condition from? I'd rather set up some more rules, like Sunny, or have it say HOT! but for now, I'm just getting clear. (For the record, it is currently clear).

Thanks.
A clear conscience is a great pillow.


xairbusdriver

  • Storm
  • *****
  • Posts: 3131
Re: Current Conditions Calculator - additional rules anyone ?
« Reply #18 on: August 11, 2016, 10:59:27 PM »
]I've only made very minor (I think( edits to the default rules. I'm pretty sure there was already a rule in my install. OTOH, I may have stolenborrowed these rules from others! [blush] Here is a list of the rules affecting 'clouds'. "CB" is "Cloud Base", of course. The rules are checked from the top down. The first one that returns 'true' is what gets used.
  • If CB > 4500 ft Then Return 'Clear'
  • If CB > 4000 ft Then Return 'Scattered Clouds'
  • If CB > 2000 ft Then Return 'Light Clouds'
  • If CB > 1500 ft Then Return 'Cloudy'
  • If CB > 600 ft Then Return 'Overcast'

Only 'work' I remember doing was an attempt to create a rule for "fog". Never found one that worked. Perhaps "If CB < 10 Then Return 'Fog'"? I think I was trying to use Humidity...
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system

dfw_pilot

  • Gale
  • ****
  • Posts: 345
    • GW3252
    • KTNWILLI1
    • WX Page
  • Station Details: Davis Pro2 Plus
Reading Comprehension
« Reply #19 on: August 11, 2016, 11:10:18 PM »
Ok, I'll check my reading comprehension next.

I see I had a rule of cloud base > 4500ft = Sunny. That was too high up the list and over-rode most everything else. Changed. Thanks!

Now I just wish we could have multiple, or at least, two, conditions active at the same time, i.e. Muggy & Hot, Cold & Damp, etc.

dfw
A clear conscience is a great pillow.


xairbusdriver

  • Storm
  • *****
  • Posts: 3131
Re: Current Conditions Calculator - additional rules anyone ?
« Reply #20 on: August 11, 2016, 11:18:11 PM »
I doubt you'd ever see "Cold & Damp" in Dallas (even on the north side). "Muggy & Hot" would probably burn into the monitor, even an LCD type! [removed link to the now castly photobucket.com site]
« Last Edit: December 30, 2017, 05:54:51 PM by xairbusdriver »
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system

Blicj11

  • Storm
  • *****
  • Posts: 4061
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Sonoma 14.8.3 | WeatherCat 3.3 | Supportive Wife
Re: Reading Comprehension
« Reply #21 on: August 11, 2016, 11:34:39 PM »
Now I just wish we could have multiple, or at least, two, conditions active at the same time, i.e. Muggy & Hot, Cold & Damp, etc.

You can just enter a rule that states If Ext Temp > 85 AND Ext Hum > 85 Current conditions are Hot & Muggy. If both condition are not met, it drops down to the next rule, which would just deal with temperature or humidity. It takes more rules to do it this way, but you can end up with exactly the multiple conditions you want. You just have to think through where they are placed in the rules order, because the first one that meets all the conditions wins.
Blick


elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6661
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Can you scroll to default rules? (Re: Clear)
« Reply #22 on: August 11, 2016, 11:52:16 PM »
Dear dfw and WeatherCat tinkerers,

I just wanted to bump this thread to ask again how the CCC works with a Davis unit.

My current condition is "Clear" but that isn't in any of the rules I've set up. Where is WXCat getting the "clear" condition from? I'd rather set up some more rules, like Sunny, or have it say HOT! but for now, I'm just getting clear. (For the record, it is currently clear).

Thanks.

The rule that generates clear is one of the default set.  Here is what they look like on my WeatherCat installation:



Can you scroll up to those rules?  The Current Conditions Calculator runs through all the rules from top to bottom and returns the first rule that is true.  So if you don't want the default rules (which generated the 'clear' in your case) you should either delete them or move them further down.

You can read up on how the Current Conditions Calculator works starting on page 85 of the WeatherCat manual.

Cheers, Edouard

dfw_pilot

  • Gale
  • ****
  • Posts: 345
    • GW3252
    • KTNWILLI1
    • WX Page
  • Station Details: Davis Pro2 Plus
Re: Current Conditions Calculator - additional rules anyone ?
« Reply #23 on: August 12, 2016, 12:59:59 AM »
Thanks Blicj11! I'll do that!
A clear conscience is a great pillow.


Blicj11

  • Storm
  • *****
  • Posts: 4061
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Sonoma 14.8.3 | WeatherCat 3.3 | Supportive Wife
Re: Current Conditions Calculator - additional rules anyone ?
« Reply #24 on: August 12, 2016, 01:03:41 AM »
Here is my current set of rules.
Blick


wurzelmac

  • Storm
  • *****
  • Posts: 1434
    • ITIROLPR2
    • Wetterstation Prägraten am Großvenediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini 2023 M2 8/256 | 1x Canon EOS 1100D | macOS Sonoma 15.0.1 | WC v330b300
Re: Current Conditions Calculator - additional rules anyone ?
« Reply #25 on: August 12, 2016, 06:52:59 AM »
It would be cool if there would be an option to >export< those rules into a text file. Another thing to be cool: Duplicate a rule so that there is no need to build every new rule from the scratch.

 ;)
Reinhard


The Grand Poohbah

  • Gale
  • ****
  • Posts: 396
  • Developer of WeatherCat for iOS, tvOS, and watchOS
    • EW6355 KCANEVAD43
    • Hopeful Hill Ranch
  • Station Details: Vantage Pro 2, aspirated, solar radiation, uv, soil temp and moisture
Re: Current Conditions Calculator - units
« Reply #26 on: August 12, 2016, 06:10:22 PM »
The "Current Conditions Calculator" is very useful and has a lot of power, but the more I look at the "Current Conditions Calculator", the User Guide, and the examples in this thread, the more questions I have.

What names can we use? Where are they listed? Are they the Channel names (User Guide page 84)?
Can we use the AppleScript tags in the Current Conditions Calculator?
What about "CB"? Where does that come from? Are there other hidden terms that we can use?
Does "Rain" really work or should it be "Precipitation per hour"? Or maybe "Niederschlag/Stunde"?
What about the units? Can they be metric or english or mixed? What is the syntax? EG "in/hr" or "in/h" or "inches/hour" or "mm/hr" etc?

Is the syntax "If <name> <symbol> <value> Then Return <string>?
How rigid is that? EG what if we drop the "Then"?

It's quite possible to write a complete set of rules in the Current Conditions Calculator and never know if they all work. Is there any way to test them?

xairbusdriver

  • Storm
  • *****
  • Posts: 3131
Re: Current Conditions Calculator - additional rules anyone ?
« Reply #27 on: August 12, 2016, 06:35:28 PM »
A bunch of questions! And no numbers! :P [lol]

However, most of them seem to be answered by just using the Edit or New button to get the CCC dialog window. There are up to three WC values you can use, whatever is in the pop-up menu next to the "If".

The "Then" looks to be pretty well hard coded. It's between the third (optional) condition and the "Current Conditions Are:" text box where you enter whatever you want the output to look like.

The values of the units will be whatever you have in the WC prefs.

As for 'testing', there is a "Current Result:" output on the main CCC window. Just below that is a text box where you can manually enter values that can then be tested by the rules. I'll have to assume The Manual has info about how to enter those values as I have never tried.

The most important question, to me, anyway, is how "CB" is calculated. I assume (I know, I know!) that it involves the Humidity and/or Dew Point and the Temperature. I further assume that the calculation assumes a standard rate of temperature with altitude and a "standard" rate of change in the humidity and/or dew point (is there is one). It's probably in The Manual? [banghead]

As is often the case, when all else fails, "Read the Manual"! To wit:
Quote from: The Manual, page 36
Calculated cloud base is derived from the air temperature and dew point and gives an approximate indication of the base of cumulus[emphasis added] clouds.
Further re-enforcing the Cumulonimbus term, "CB", rather than "Cloud Base" in general.
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system

Blicj11

  • Storm
  • *****
  • Posts: 4061
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Sonoma 14.8.3 | WeatherCat 3.3 | Supportive Wife
Re: Current Conditions Calculator - additional rules anyone ?
« Reply #28 on: August 13, 2016, 01:31:24 AM »
  • You can name your current condition result anything you want
  • You can select any weather variable that is included in the pull down list
  • You can include any synthetic channel you have defined
  • You can use either Daily Rain or Hourly Rain
  • Units are automatically based on the item you select from the pulldown menu
  • The examples posted in the forum are not the correct syntax for calculating the condition, they are just the name of the rule, which you can name anything you desire
You can also use WeatherCat's Apple Script interface to set current conditions.

The calculation for cloud base is derived from air temperature and the dew point and is a theoretical indication of the base of cumulus clouds. The most common formula is:
  • Calculate the difference between the external temperature and the dew point.
  • Divide the spread by 4.4 (if temperatures are in ?F) or 2.5 (if temperatures are in ?C), then multiply by 1000.
  • Add the result from step (2) to the Field Elevation to get cloud base ASL (Above Sea Level)
Blick