[Bldg-sim] Sometimes things are easier than they seem re: merging raw data from two weather stations

Joe Huang yjhuang at whiteboxtechnologies.com
Fri Sep 4 13:24:49 PDT 2015


I've just had a mini "Eureka" moment that I wanted to share.

As I've been processing more weather data from the ISD, I've been countering more cases 
for smaller locations (mostly in the US) where there are two weather stations where the 
WMO numbers are the same for the first part but not for the smaller part. For example, for 
Socorro New Mexico there are two files:

     2014  NM_SOCORRO-MUNI-AP             723620 93040
     2014  NM_SOCORRO-MUNI                   723620 99999

I generally interpret these cases as where a station may be switching their 
instrumentation.  However, in this case the two stations seem to be reporting at 
alternating times (table below shows the number of observations by month for the 4 key 
climate parameters that I need):

NM_SOCORRO-MUNI-AP            723620         34.067 -106.900 1485 4 -7.0 NAM BSk
2014 dbt   464  302  151  538  697  155    0*   0* 511  710  244 0*   419
2014 dpt   462  297  148  535  696  154    0*   0* 505  710  244 0*   416
2014 cld   451  245  108* 477  646  153    0*   0* 413  652  217 0*   373
2014 wsp   464  302  151  538  697  155    0*   0* 510  710  244 0*   419
2014 all  1841 1146  558 2088 2736  617    0    0 1939 2782  949 0

NM_SOCORRO-MUNI               723620         34.022 -106.903 1485 4 -7.0 NAM BSk
2014 dbt   259  389  610  161   41* 549  689  698  224    0* 444 684    431
2014 dpt   256  385  607  159   38* 545  687  698  224    0* 443 684    429
2014 cld   259  312  550  144   41* 549  598  583  182    0* 435 625    388
2014 wsp   259  389  610  161   41* 549  689  698  224    0* 444 683    431
2014 all  1033 1475 2377  625  161 2192 2663 2677  854    0 1766 2676

I have software to merge data from two files but only at defined switchover dates, so this 
situation seemed at first quite hard to tackle.
Then, I thought, why not just take concatenate the two raw data files, and then sort the 
combined file to get the data in the right
chronological order?  That took me just a few seconds, and voila' , out comes a full 
weather file with quite high data completeness:

NM_SOCORRO-MUNI-AP2           723620         34.067 -106.900 1485 4 -7.0 NAM BSk
2014 dbt   713  643  714  690  710  690  689  698  688  710  687 691    693
2014 dpt   713  643  714  690  710  690  687  698  688  710  687 690    693
2014 cld   700  531  635  613  671  688  598  583  565  652  651 625    626
2014 wsp   713  643  714  690  710  690  689  698  687  710  687 690    693
2014 all  2839 2460 2777 2683 2801 2758 2663 2677 2628 2782 2712 2696

A quick look at the plots also showed a weather file of seemingly good quality:



Problem solved!

Joe

-- 
Joe Huang
White Box Technologies, Inc.
346 Rheem Blvd., Suite 205A
Moraga CA 94556
yjhuang at whiteboxtechnologies.com
http://weather.whiteboxtechnologies.com for simulation-ready weather data
(o) (925)388-0265
(c) (510)928-2683
"building energy simulations at your fingertips"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/bldg-sim-onebuilding.org/attachments/20150904/9835640e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jacgaibf.png
Type: image/png
Size: 12123 bytes
Desc: not available
URL: <http://lists.onebuilding.org/pipermail/bldg-sim-onebuilding.org/attachments/20150904/9835640e/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dibjebeh.png
Type: image/png
Size: 9910 bytes
Desc: not available
URL: <http://lists.onebuilding.org/pipermail/bldg-sim-onebuilding.org/attachments/20150904/9835640e/attachment-0003.png>


More information about the Bldg-sim mailing list