Page 1 of 2
inHg > hPa in the USA
Posted: Fri 28 Dec 2012 6:26 am
by Buford T. Justice
I am a USA user of Cumulus with a Fine Offset weather station. I have had the display on hPa for a few months now and have come to like hPa more than inHg. After all, every 0.01" of inHg can have 3-4 hPa values. To me, that makes hPa more accurate.
I am thinking about starting 2013 using hPa. I have Cumulus set to use inHg. Would there be any disaster in switching to fully hPa? Would data using inHg get ruined?
Re: inHg > hPa in the USA
Posted: Fri 28 Dec 2012 11:53 am
by RayProudfoot
Unlike rainfall, pressure readings do not accumulate during the year so you should be able to switch without too many problems. Converting historical data is tricky though.
The obvious question is what to do with your historic data retained in the various files Cumulus writes to. According to the Wiki the files affected would be Alltime.ini, Dayfile.txt, Monthly log files, Today.ini and Yesterday.ini. Ideally you would use Excel to convert inches to hPa but the trickiest bit is saving the file whilst still making it readable by Cumulus.
You would probably need to manually edit Cumulus.ini (without Cumulus running) to set the preference for hPa over inches. I guess you have PressureUnit=2 currently set. That would have to be changed to PressureUnit=1 for hPa.
Of course the easiest way would be to start afresh on 1 January and delete all existing data but it depends how important that is to you. As Steve points out in the help it's important to decide on units of measurement when setting up because changing them afterwards can be tricky if not impossible.
Re: inHg > hPa in the USA
Posted: Fri 28 Dec 2012 4:55 pm
by Buford T. Justice
I just played around with the numbers after making (and restoring) a backup. The records are easy to convert manually, but I wish there was a way to make a script that could read the Dayfile.txt file and convert the numbers. I only started last September so it shouldn't be too bad to manually do it.
Re: inHg > hPa in the USA
Posted: Fri 28 Dec 2012 5:05 pm
by steve
Could you not do it quite quickly with Excel (or equivalent)? Put the conversion factor in an empty cell, right click, copy, select the cells in the pressure column, right click, paste special, multiply. Delete the temporary cell. You need to be careful to preserve the date format etc when saving it again.
Re: inHg > hPa in the USA
Posted: Fri 28 Dec 2012 5:26 pm
by sfws
(deleted - answered by Steve)
Re: inHg > hPa in the USA
Posted: Fri 28 Dec 2012 7:21 pm
by Buford T. Justice
It wasn't so bad going through Dayfile.txt. I loaded it in Cumulus then made a spreadsheet in OpenOffice Calc. All I did was:
- Enter the inHg number in A1.
- Make a formula in B1 using =A1*33.86389
- Make a formula in C1 to round the B1 number to the nearest tenth using =ROUND(B1;1)
After correcting Dayfile.txt:
- I clicked OK then saved a copy of Dayfile.txt outside of the Cumulus/Data folder.
- I changed Cumulus to do hPa then closed Cumulus.
- I reopened Cumulus again to let the data refresh then closed it again.
- I copied the modified Dayfile.txt file back into the Cumulus/Data folder.
- I reopened Cumulus and manually corrected the month, monthly, and yearly records.
It took me about 45 minutes or so.
Re: inHg > hPa in the USA
Posted: Fri 28 Dec 2012 7:35 pm
by RayProudfoot

Have you got a Cumulus presence on the web yet?
Re: inHg > hPa in the USA
Posted: Fri 28 Dec 2012 10:47 pm
by Buford T. Justice
RayProudfoot wrote:
Have you got a Cumulus presence on the web yet?
http://bit.ly/WaBcEN
Re: inHg > hPa in the USA
Posted: Fri 28 Dec 2012 10:58 pm
by RayProudfoot
Thanks. Your huge range of temps in the US never ceases to amaze me.

Re: inHg > hPa in the USA
Posted: Fri 28 Dec 2012 11:29 pm
by Buford T. Justice
RayProudfoot wrote:Thanks. Your huge range of temps in the US never ceases to amaze me.

LOL! That's just us being on Fahrenheit still. I never liked Celsius due to the small ranges in temperature. That's kind of the same reason I started to hate inHg; the ranges were too small. hPa has a larger range it seems and that is the preferred unit on the Fine Offset weather stations anyway.
Re: inHg > hPa in the USA
Posted: Sat 29 Dec 2012 2:26 am
by Buford T. Justice
Is it possible to insert a script of some kind that would generate an inHg number under the hPa number on the indexT page?
Re: inHg > hPa in the USA
Posted: Sat 29 Dec 2012 3:03 am
by beteljuice
Try (for 3 dec places)
Code: Select all
<script>
pressHg = <#press> * 0.029529983071;
document.write(pressHg.toFixed(3));
</script>
Don't forget to 'hard write' your pressure unit in your template page(s)
Re: inHg > hPa in the USA
Posted: Sat 29 Dec 2012 3:27 am
by Buford T. Justice
beteljuice wrote:Try (for 3 dec places)
Code: Select all
<script>
pressHg = <#press> * 0.029529983071;
document.write(pressHg.toFixed(3));
</script>
Don't forget to 'hard write' your pressure unit in your template page(s)
That did the trick! Thank you! I did 'hard write' my pressure unit by doing this in the barometer section of "indexT.htm"...
Code: Select all
<tr>
<td colspan="4" class="tableseparator_pressure">Pressure (MSL)</td>
</tr>
<tr class="td_pressure_data">
<td>Barometer </td>
<td><#press> <#pressunit></td>
<td><#presstrend></td>
<td><#presstrendval> <#pressunit>/hr</td>
</tr>
<tr class="td_pressure_data">
<td> </td>
<td><script>pressinHg = <#press> * 0.02953;document.write(pressinHg.toFixed(2));</script> inHg</td>
<td> </td>
<td> </td>
</tr>
Re: inHg > hPa in the USA
Posted: Sat 29 Dec 2012 3:52 am
by beteljuice
... but you have pressure trend (and unit) in (now native) hPa
Re: inHg > hPa in the USA
Posted: Sat 29 Dec 2012 8:04 am
by Buford T. Justice
beteljuice wrote:... but you have pressure trend (and unit) in (now native) hPa
Yup and I am absolutely fine with that. I just thought having inHg would help other users learn hPa. In my opinion, hPa is superior to inHg.