Author Topic: Keisan conversion to sea level pressure online calculator – just say no!  (Read 618 times)

0 Members and 1 Guest are viewing this topic.

Offline gszlag

  • Forecaster
  • *****
  • Posts: 431
  • ..have you calibrated your barometer today?
    • Michael's Bay - Manitoulin Island weather
In this forum, the keisan sea level pressure calculator was used to calculate the elevation offset required to calibrate the barometer for Fine Offset manufactured weather stations (Ambient Weather, Ecowitt and clones).

The advice was to leave the default temperature set at 15°C at your location and calculate the difference between the pressure at your elevation (Absolute pressure) and the pressure at sea level (Relative pressure). The difference between the two pressures was supposed to be your elevation offset.

But one day, I was looking at the cartoon graphic of the mountaineer (see below) accompanying the calculator and saw that temperature =T at present location.

 [ You are not allowed to view attachments ]

A question came to mind.  Why is the default temperature in the calculator said to be “fixed” at 15°C (at present location) up on the mountain?

In a standard atmosphere,  the default temperature is supposed to be 15°C at sea level elevation and temperature declines at the standard lapse rate of 0.0065°C/meter.

Although it looks like the 15°C is a fixed temperature in the keisan calculator -  it is not. The temperature can be changed in the calculator (it is a variable) so I suspect the keisan author used 15C just as an example or placeholder along with a sample altitude and a sample atmospheric pressure—not meaning for temperature to be fixed permanently at 15°C for all elevations.

Rather than assuming that local outside temperatures are fixed at 15C year-round, I would recommend using the current temperature at your elevation as the developer intended, For better results, you may want to use your 12 hour mean temperature at your location to calculate individual SLP values.

Fellow wxforum.net member, Dr. David Burch, author of the “Barometer Handbook” says the 12 hour temperature is very important for accuracy and recommends using the 12 hour average temperature rather than the current temperature for SLP calculations. I prefer using his starpath SLP calculator because it explicitly requires 12 hour mean temperatures as an input variable. Nice to see good notes and instructions to accompany his calculator.

Unfortunately, I suspect that the vast majority of keisan calculator users will leave the default 15°C as is - which unless you live at sea level, will produce an incorrect elevation offset. If you live at a relatively low elevation less than a few hundred meters, you may not notice (at least initially) that your calculations are out. Add in the effects of temperature and at higher elevations these errors become increasingly intolerable. But as they say, one should always use the proper tool for the job and that tool is a standard atmosphere calculator.
 
Do use the keisan calculator for what it was originally designed for – to do a manual SLP calculation based on the current temperature at your location. It is not meant to be an elevation offset calculator.

To calculate the fixed elevation offset for your specific location/elevation, use a standard atmosphere calculator. I like to use this one: digital dutch standard atmosphere calculator. https://www.digitaldutch.com/atmoscalc/table.htm

Needless to say, weather software like WeeWX does a far better job at calculating SLP in real-time using the proper algorithms and 12 hour mean temperatures and humidity measured by your weather station. And it does all this automatically.

No manual calculations/re-calibrations required!

Related articles:

Tips and hints to calibrate your barometer:
https://www.wxforum.net/index.php?topic=44099.msg448794#msg448794

Calibrate Relative pressure using a raspberry pi computer
https://www.wxforum.net/index.php?topic=41500.msg425120#msg425120


Ambient Weather WS-2000
Ecowitt GW1000/GW1100
Ecowitt WS68: Anemometer, UV/solar
Ecowitt WH40: Rain gauge
Ecowitt WH57 Lightning sensor
Ecowitt WH32E: Outside T & H sensor
Stratus Rain Gauge (manual)
Raspberry Pi 3B+ (WeeWX/CumulusMX)
Raspberry Pi Zero 2W (WeeWX/MQTT/Belchertown)
---
Barometer wiki: http://meshka.eu/Ecowitt/dokuwiki/doku.php?id=barometer#barometer
---
http://weather.glenns.ca (pwsdashboard - live)
http://weewx.glenns.ca
http://glenns.ca/cumulusmx2/index.htm
---
Uploading to: AWN, ecowitt.net, Weather Underground, PWSweather.com, AWEKAS, Windy.com, WOW

Offline DelChard

  • Senior Contributor
  • ****
  • Posts: 205
Re: Keisan conversion to sea level pressure online calculator – just say no!
« Reply #1 on: September 25, 2022, 08:18:58 AM »
Your post resurrected an early confusion I had, surrounding the incorrect use of statistical terms.
In the meteorological community the terms average, mean, and even median, are used as if they are interchangeable.
Statistically.
Average is defined as the sum of values in a dataset divided by the number of values in the dataset.
Mean is defined as the average of the minimum value and maximum value in a dataset.
Median requires sorting a dataset in order and picking the value in the middle.
So, the 3 terms give different results.
A simple analogy.
Take a 12 hour car journey, with a weewx 60 sec archive period.
You start at a standstill (0mph), you finish at a standstill (0mph), apart from acceleration and braking, we’ll assume the rest of the journey can be travelled at 50mph.
The average speed of our hypothetical journey is 49.86mph.
The mean speed of our hypothetical journey is 25mph.
The median speed of our hypothetical journey (in this case) is also 25mph.
However, if we use the meteorological/weewx method we get 0mph.
This is because it is the average of the value now, and the value from 12hrs ago (both are at a standstill).
Historically, I used the Keisan calculator, but, I changed the default temperature to 20C, as being more typical for my location.
Later, I became aware of the “12 hour average”, and later still, how it was actually derived.
However, I have not been able to find the reasoning behind, or a justification, for this statistically erroneous methodology?????
I’ve attached an extract of an excel analysis of my weewx database, showing the difference between the SLP average, true average and mean values.
Now, it has to be said, that at my lowly altitude, the difference equates to only 0.2Hpa, but increases for higher altitudes.

 [ You are not allowed to view attachments ]


Offline gszlag

  • Forecaster
  • *****
  • Posts: 431
  • ..have you calibrated your barometer today?
    • Michael's Bay - Manitoulin Island weather
Re: Keisan conversion to sea level pressure online calculator – just say no!
« Reply #2 on: September 25, 2022, 10:08:39 AM »
Difference between average and mean. Lots and lots of "hits" out there on the webs.

Allthough you already know this, for the sake of our readers, the calculation of MSLP ( "barometer" in WeeWX terms) requires the average/mean temperature 12 hours ago and the current temperature.

I guess I deferred to Dr. David Burch's explanation of why not to use current temperature for SLP calculations:

"Namely the proper air temperature to use is not what you read at the time you read the barometer, but rather we should use the average of the air temperature at the time of observation T(0h) and the value from 12 hours earlier T(-12h):

T (avg) = [ T(0h) + T(-12h) ]  ÷ 2

This 12-hr time average is not an obvious choice. It is also not the result of a mathematical theory, but we can expect that some average is called for. We know the virtual temperature of this virtual air column affects the pressure, and it is reasonable to assume that the the pressure at the base of this column cannot respond instantly to a change in temperature at the top, so we are led to averaging over some time period to reach equilibrium. In other words, the air temperature at the moment is not what we should use to project this pressure down to the sea level, but rather some average of what it has been in the recent past."


Going back to the usage of average vs mean, in a dataset of 2 values, I suspect the difference is largely semantical after reading all too many "hits" from searching "difference between average and mean".

Technically, depending on the context, one can argue that "mean" could be more appropriate in a statistical sense but "average" might be more appropriate in a mathematical sense.

Anyways, statistics was never my favourite course  :)

Ambient Weather WS-2000
Ecowitt GW1000/GW1100
Ecowitt WS68: Anemometer, UV/solar
Ecowitt WH40: Rain gauge
Ecowitt WH57 Lightning sensor
Ecowitt WH32E: Outside T & H sensor
Stratus Rain Gauge (manual)
Raspberry Pi 3B+ (WeeWX/CumulusMX)
Raspberry Pi Zero 2W (WeeWX/MQTT/Belchertown)
---
Barometer wiki: http://meshka.eu/Ecowitt/dokuwiki/doku.php?id=barometer#barometer
---
http://weather.glenns.ca (pwsdashboard - live)
http://weewx.glenns.ca
http://glenns.ca/cumulusmx2/index.htm
---
Uploading to: AWN, ecowitt.net, Weather Underground, PWSweather.com, AWEKAS, Windy.com, WOW

Offline DelChard

  • Senior Contributor
  • ****
  • Posts: 205
Re: Keisan conversion to sea level pressure online calculator – just say no!
« Reply #3 on: September 25, 2022, 10:15:46 AM »
 [tup]
Reason for my post was to highlight the T0 T-12 concept for those that would not be aware.
My pedantics re Average, Mean, and Median, stem from a mathmatics lecturer hammering the point home.

Offline kheller2

  • Forecaster
  • *****
  • Posts: 518
Re: Keisan conversion to sea level pressure online calculator – just say no!
« Reply #4 on: September 25, 2022, 01:26:41 PM »
Your post resurrected an early confusion I had, surrounding the incorrect use of statistical terms.
In the meteorological community the terms average, mean, and even median, are used as if they are interchangeable.
Statistically.
Average is defined as the sum of values in a dataset divided by the number of values in the dataset.
Mean is defined as the average of the minimum value and maximum value in a dataset.
Median requires sorting a dataset in order and picking the value in the middle.

Really?   Not to start a math war here but I’ve never heard average being different from mean, let alone mean being defined as the average if the high and low number. 

Most grade school math classes define them this way:

https://www.purplemath.com/modules/meanmode.htm

Even stats text define average is mean.



Ambient Consoles: WS-2000, WS-1900, WS-1200, WS-2902C, WS-3000-X3, WS-0900-IP(observerIP), WS-1001-WIFI
Ambient Arrays: WH65B
Ambient Sensors: WH31E(3), WH31B(2), WH32B, WH31SM(2), WH31PGW, AQIN, WH31LA(3)
Ambient Spares: WH24B(2), WH25B.
Ecowitt: HP2551BU, GW1000B(dead), GW1100B(2), GW2000B
Ecowitt Sensors: WH51, WN34BL, WN34(2), WH31, WH41, WH40

Offline CW2274

  • Forecaster
  • *****
  • Posts: 6731
    • Conditions @ CW2274 West Tucson-Painted Hills Ranch
Re: Keisan conversion to sea level pressure online calculator – just say no!
« Reply #5 on: September 25, 2022, 04:58:52 PM »
Your post resurrected an early confusion I had, surrounding the incorrect use of statistical terms.
In the meteorological community the terms average, mean, and even median, are used as if they are interchangeable.
Statistically.
Average is defined as the sum of values in a dataset divided by the number of values in the dataset.
Mean is defined as the average of the minimum value and maximum value in a dataset.
Median requires sorting a dataset in order and picking the value in the middle.
I’ve never heard average being different from mean
They are different. "Mean", means half way. Half higher, half lower. Average is just that. It can by coincidence be "mean", but the definition is not the same.

Offline kheller2

  • Forecaster
  • *****
  • Posts: 518
Re: Keisan conversion to sea level pressure online calculator – just say no!
« Reply #6 on: September 25, 2022, 05:17:18 PM »
Your post resurrected an early confusion I had, surrounding the incorrect use of statistical terms.
In the meteorological community the terms average, mean, and even median, are used as if they are interchangeable.
Statistically.
Average is defined as the sum of values in a dataset divided by the number of values in the dataset.
Mean is defined as the average of the minimum value and maximum value in a dataset.
Median requires sorting a dataset in order and picking the value in the middle.
I’ve never heard average being different from mean
They are different. "Mean", means half way. Half higher, half lower. Average is just that. It can by coincidence be "mean", but the definition is not the same.

I think you mean “median” which is the middle number in an ordered set.   And yes mean is the average hence half above and half lower. 

I’m happy to be proven incorrect if you can link me to some documentation that states how the terms are defined different by different sciences. 
Ambient Consoles: WS-2000, WS-1900, WS-1200, WS-2902C, WS-3000-X3, WS-0900-IP(observerIP), WS-1001-WIFI
Ambient Arrays: WH65B
Ambient Sensors: WH31E(3), WH31B(2), WH32B, WH31SM(2), WH31PGW, AQIN, WH31LA(3)
Ambient Spares: WH24B(2), WH25B.
Ecowitt: HP2551BU, GW1000B(dead), GW1100B(2), GW2000B
Ecowitt Sensors: WH51, WN34BL, WN34(2), WH31, WH41, WH40

Offline CW2274

  • Forecaster
  • *****
  • Posts: 6731
    • Conditions @ CW2274 West Tucson-Painted Hills Ranch
Re: Keisan conversion to sea level pressure online calculator – just say no!
« Reply #7 on: September 25, 2022, 05:31:50 PM »
Your post resurrected an early confusion I had, surrounding the incorrect use of statistical terms.
In the meteorological community the terms average, mean, and even median, are used as if they are interchangeable.
Statistically.
Average is defined as the sum of values in a dataset divided by the number of values in the dataset.
Mean is defined as the average of the minimum value and maximum value in a dataset.
Median requires sorting a dataset in order and picking the value in the middle.
I’ve never heard average being different from mean
They are different. "Mean", means half way. Half higher, half lower. Average is just that. It can by coincidence be "mean", but the definition is not the same.

I think you mean “median” which is the middle number in an ordered set. 
This is why I try to stay in my lane, but sometimes go astray.  :oops:

Offline kheller2

  • Forecaster
  • *****
  • Posts: 518
Re: Keisan conversion to sea level pressure online calculator – just say no!
« Reply #8 on: September 25, 2022, 05:37:24 PM »
Your post resurrected an early confusion I had, surrounding the incorrect use of statistical terms.
In the meteorological community the terms average, mean, and even median, are used as if they are interchangeable.
Statistically.
Average is defined as the sum of values in a dataset divided by the number of values in the dataset.
Mean is defined as the average of the minimum value and maximum value in a dataset.
Median requires sorting a dataset in order and picking the value in the middle.
I’ve never heard average being different from mean
They are different. "Mean", means half way. Half higher, half lower. Average is just that. It can by coincidence be "mean", but the definition is not the same.

I think you mean “median” which is the middle number in an ordered set. 
This is why I try to stay in my lane, but sometimes go astray.  :oops:

Well, there are several differences but nothing actually describing those differences.  Average is usually arithmetic mean, not to be confused with Geometric mean or Harmonic Mean (whatever the heck they are).  But points to you for bringing this up simply because there are many documents that say average and mean ARE different, yet the way they are calculated is identical.  I believe it has more to do with the set of data, are the values very close, or very dissimilar (statistics: mean) vs all over the place (average).  Average is typically just used in conversation, and mean is used in math/science.  Yet it was also stated that the mean can't help you find the mode or median but average can.  Which again, makes no sense to me.

I'm not much in my lane (anymore) either but please do not hesitate to bring up things outside your own lane.  It is educational for everyone.  But you do bring up a very good question... exactly what is the term to describe taking the sum of the highest and lowest number and divided by 2?

In this large example image, that I don't know how to resize on this message board, note that media could be a number not in the set.

 [ You are not allowed to view attachments ]
« Last Edit: September 25, 2022, 05:47:46 PM by kheller2 »
Ambient Consoles: WS-2000, WS-1900, WS-1200, WS-2902C, WS-3000-X3, WS-0900-IP(observerIP), WS-1001-WIFI
Ambient Arrays: WH65B
Ambient Sensors: WH31E(3), WH31B(2), WH32B, WH31SM(2), WH31PGW, AQIN, WH31LA(3)
Ambient Spares: WH24B(2), WH25B.
Ecowitt: HP2551BU, GW1000B(dead), GW1100B(2), GW2000B
Ecowitt Sensors: WH51, WN34BL, WN34(2), WH31, WH41, WH40

Offline gszlag

  • Forecaster
  • *****
  • Posts: 431
  • ..have you calibrated your barometer today?
    • Michael's Bay - Manitoulin Island weather
Re: Keisan conversion to sea level pressure online calculator – just say no!
« Reply #9 on: September 25, 2022, 07:29:13 PM »
.. exactly what is the term to describe taking the sum of the highest and lowest number and divided by 2?

FUN WITH MATH

Who said math is an exact science?

It took me a while to find it but it is called a mid-range average or mid-range mean ( if you prefer that term). It is the arithmetic mean of the min and max of a data set.

If the data set is 7,3,4,1,7,6 (as per the example graphic)

The mid-range average is: (1 +7)/2 = 4
The average is: (7+3+4+1+7+6)/6 =4.66

Best approach is to argue the point over a pint of beer (or two).

Source: Wikipedia
Ambient Weather WS-2000
Ecowitt GW1000/GW1100
Ecowitt WS68: Anemometer, UV/solar
Ecowitt WH40: Rain gauge
Ecowitt WH57 Lightning sensor
Ecowitt WH32E: Outside T & H sensor
Stratus Rain Gauge (manual)
Raspberry Pi 3B+ (WeeWX/CumulusMX)
Raspberry Pi Zero 2W (WeeWX/MQTT/Belchertown)
---
Barometer wiki: http://meshka.eu/Ecowitt/dokuwiki/doku.php?id=barometer#barometer
---
http://weather.glenns.ca (pwsdashboard - live)
http://weewx.glenns.ca
http://glenns.ca/cumulusmx2/index.htm
---
Uploading to: AWN, ecowitt.net, Weather Underground, PWSweather.com, AWEKAS, Windy.com, WOW

Offline kheller2

  • Forecaster
  • *****
  • Posts: 518
Re: Keisan conversion to sea level pressure online calculator – just say no!
« Reply #10 on: September 25, 2022, 09:10:41 PM »
Adjectives are important. 
Beer doubly so. 
Ambient Consoles: WS-2000, WS-1900, WS-1200, WS-2902C, WS-3000-X3, WS-0900-IP(observerIP), WS-1001-WIFI
Ambient Arrays: WH65B
Ambient Sensors: WH31E(3), WH31B(2), WH32B, WH31SM(2), WH31PGW, AQIN, WH31LA(3)
Ambient Spares: WH24B(2), WH25B.
Ecowitt: HP2551BU, GW1000B(dead), GW1100B(2), GW2000B
Ecowitt Sensors: WH51, WN34BL, WN34(2), WH31, WH41, WH40