Relative humidity and dew point

Contributions to this software library are always welcome. Please ensure that you post program listings rather than .raw files. They give a reasonable idea of what your program does without having to load them into a DM42 and you can also include comments in your code. Check out the following link for a decoder/encoder: https://technical.swissmicros.com/decoders/dm42/

You can then copy/paste the listing and post it in "code" tags.
Post Reply
DA74254
Posts: 193
Joined: Tue Oct 03, 2017 11:20 pm
Location: Norway/Latvia

Relative humidity and dew point

Post by DA74254 »

My first post here and.
Based very loosely on Eddie Shores Dew point program in his blog http://edspi31415.blogspot.no/2016/07/h ... point.html I made a bit more elaborate program.

This one takes three arguments "Wet Bulb", "Dry Bulb" (thermometer) and the barometric pressure to calclulate the relative humidity in percent and the dew point in °C
Enter wet/dry temp in °C and the barometric pressure in mb.

Ex: Tw=22, Td=25, baro=1013, then R/S gives first the RH% (~76,97%), then Dew Point (~20,68°C)

Code: Select all

00 { 236-Byte Prgm }
01▸LBL "RelHum"
02 "WetBulb T"
03 PROMPT
04 STO "Tw"
05 "DryBulb T"
06 PROMPT
07 STO "Td"
08 "Barometer mb"
09 PROMPT
10 STO "P"
11 17.27
12 RCL× "Td"
13 237.3
14 RCL+ "Td"
15 ÷
16 E↑X
17 6.108
18 ×
19 STO "Es"
20 17.27
21 RCL× "Tw"
22 237.3
23 RCL+ "Tw"
24 ÷
25 E↑X
26 6.108
27 ×
28 STO "Ew"
29 115ᴇ-5
30 RCL× "Tw"
31 1
32 +
33 RCL "Td"
34 RCL- "Tw"
35 ×
36 RCL× "P"
37 66ᴇ-5
38 ×
39 +/-
40 RCL+ "Ew"
41 STO "E"
42 RCL "E"
43 RCL "Es"
44 ÷
45 100
46 ×
47 "RH %"
48 ARCL ST X
49 AVIEW
50 STOP
51 RCL "E"
52 6.108
53 ÷
54 LN
55 17.27
56 ÷
57 STO "B"
58 237.3
59 RCL× "B"
60 1
61 RCL- "B"
62 ÷
63 "Dew Point"
64 ARCL ST X
65 AVIEW
66 STOP
67 END
Last edited by DA74254 on Sat Dec 23, 2017 10:06 pm, edited 1 time in total.
Esben
DM42 SN: 00245, WP43 Pilot SN:00002, DM32 SN: 00045 (Listed in obtained order).
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: Relative humiditu and dew point

Post by Walter »

Thanks for the program! Some background information, however, would be appreciated: e.g. what's about the wet and dry bulbs? Not found in Eddies's blog. Please explain like to a four-year-old toddler. ;) Thanks in advance!
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
DA74254
Posts: 193
Joined: Tue Oct 03, 2017 11:20 pm
Location: Norway/Latvia

Re: Relative humiditu and dew point

Post by DA74254 »

Explanation here :)
No, Eddie's program does not include wet/dry thermometer, thus "very loosely based" as mentioned.
Eddie has taken the approach that you know the temperature and the RH (relative humidity), of which you can use to calculate the Dew Point. That is, how cold an object in the said environment has to be to form condensation (or dew) on itself. ref a cold beer taken from the fridge will condensate when brought in the hot humid summer.

The program I made takes the same source (https://cals.arizona.edu/azmet/dewpoint.html) but utilizes the formulæs in the lower part of the website.

"In the Olden Dayes" one used (actually, it's occationally still used today, at sea) a "Psychrometer", which is two bulb type (spirit loaded) thermometres where one covered one of them with a small piece of wet cloth over the bulb and the other one left dry. This was flung/waived in the air in order to obtain a temperature difference due to the evaporation of the water from the wet cloth. One then used a Mollière diagram to find the relative humidity in the air.

This program does that without the diagram at hand and in addition, the dew point is calculated, which is not in the Molliére diagram.
Esben
DM42 SN: 00245, WP43 Pilot SN:00002, DM32 SN: 00045 (Listed in obtained order).
toml_12953
Posts: 795
Joined: Wed May 03, 2017 7:46 pm
Location: Malone, NY USA

Re: Relative humiditu and dew point

Post by toml_12953 »

DA74254 wrote:
Sat Dec 23, 2017 3:43 pm
My first post here and.
Based very loosely on Eddie Shores Dew point program in his blog http://edspi31415.blogspot.no/2016/07/h ... point.html I made a bit more elaborate program.

This one takes three arguments "Wet Bulb", "Dry Bulb" (thermometer) and the barometric pressure to calclulate the relative humidity in percent and the dew point in °C

Wet bulb? Dry bulb? Please explain to me, who is a dim bulb! :?
Tom L

Some people call me inept but I'm as ept as anybody!
DM10L SN: 059/100
DM41X SN: 00023 (Beta)
DM41X SN: 00506 (Shipping)
DM42 SN: 00025 (Beta)
DM42 SN: 00221 (Shipping)
WP43 SN: 00025 (Prototype)
DA74254
Posts: 193
Joined: Tue Oct 03, 2017 11:20 pm
Location: Norway/Latvia

Re: Relative humiditu and dew point

Post by DA74254 »

toml_12953 wrote:
Sat Dec 23, 2017 5:44 pm
Wet bulb? Dry bulb? Please explain to me, who is a dim bulb! :?
As explained here:
DA74254 wrote:
Sat Dec 23, 2017 4:20 pm
"In the Olden Dayes" one used (actually, it's occationally still used today, at sea) a "Psychrometer", which is two bulb type (spirit loaded) thermometres where one covered one of them with a small piece of wet cloth over the bulb and the other one left dry. This was flung/waived in the air in order to obtain a temperature difference due to the evaporation of the water from the wet cloth. One then used a Mollière diagram to find the relative humidity in the air.
Esben
DM42 SN: 00245, WP43 Pilot SN:00002, DM32 SN: 00045 (Listed in obtained order).
DA74254
Posts: 193
Joined: Tue Oct 03, 2017 11:20 pm
Location: Norway/Latvia

Re: Relative humidity and dew point

Post by DA74254 »

Here's a Youtube link (not me) of how to use a Psychrometer to get the wet and dry temperatures:

https://www.youtube.com/watch?v=QbcaCxuA1LI
Esben
DM42 SN: 00245, WP43 Pilot SN:00002, DM32 SN: 00045 (Listed in obtained order).
Post Reply