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: http://www.swissmicros.com/dm42/decoder/

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

Relative humidity and dew point

Post by DA74254 » Sat Dec 23, 2017 2: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
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 9:06 pm, edited 1 time in total.
Esben
DM42 SN: 00245

User avatar
Walter
Posts: 776
Joined: Tue May 02, 2017 9:13 am
Location: Close to FRA, Germany

Re: Relative humiditu and dew point

Post by Walter » Sat Dec 23, 2017 2:54 pm

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!
DM42 SN: 00041 --- Follower of Platon.

HP-35, HP-45, ..., HP-50, WP 34S, WP 31S, DM16L

DA74254
Posts: 38
Joined: Tue Oct 03, 2017 9:20 pm
Location: Norway/Latvia

Re: Relative humiditu and dew point

Post by DA74254 » Sat Dec 23, 2017 3:20 pm

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

toml_12953
Posts: 442
Joined: Wed May 03, 2017 5:46 pm
Location: Malone, NY USA

Re: Relative humiditu and dew point

Post by toml_12953 » Sat Dec 23, 2017 4:44 pm

DA74254 wrote:
Sat Dec 23, 2017 2: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

¡spuǝıɹɟ uɐılɐɹʇsnɐ ʎɯ llɐ oʇ ıH
DM42 SN: 00025 (Beta)
SN: 00221 (Shipping)

DA74254
Posts: 38
Joined: Tue Oct 03, 2017 9:20 pm
Location: Norway/Latvia

Re: Relative humiditu and dew point

Post by DA74254 » Sat Dec 23, 2017 5:29 pm

toml_12953 wrote:
Sat Dec 23, 2017 4:44 pm
Wet bulb? Dry bulb? Please explain to me, who is a dim bulb! :?
As explained here:
DA74254 wrote:
Sat Dec 23, 2017 3: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

DA74254
Posts: 38
Joined: Tue Oct 03, 2017 9:20 pm
Location: Norway/Latvia

Re: Relative humidity and dew point

Post by DA74254 » Sat Dec 23, 2017 9:08 pm

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

Post Reply