wmo-im / synop2bufr

Python package to transform SYNOP data into the WMO BUFR format.
https://synop2bufr.readthedocs.io
Apache License 2.0
6 stars 2 forks source link

synop2bufr v0.6.0 crashes without continuing when encountering a station not in metadata #36

Closed maaikelimper closed 11 months ago

maaikelimper commented 11 months ago

When running over congo-data sample I get :

root@788baf9d38e1:/home/wis2box# synop2bufr data transform /data/wis2box/observations/congo/synop_202308.txt --metadata /data/wis2box/metadata/station/station_list.csv --year 2023 --month 08 --verbosity DEBUG
2023-09-14 20:19:51 [WARNING] Duplicate entries found for station  in station list file
2023-09-14 20:19:51 [WARNING] Duplicate entries found for station  in station list file
2023-09-14 20:19:51 [WARNING] Duplicate entries found for station  in station list file
2023-09-14 20:19:51 [WARNING] Duplicate entries found for station  in station list file
2023-09-14 20:19:51 [WARNING] Duplicate entries found for station  in station list file
2023-09-14 20:19:51 [WARNING] Station 64400 not found in station file
Error: '_meta'

when I add Station 64400 and repeat it exits at the next station not in the metadata:

root@788baf9d38e1:/home/wis2box# synop2bufr data transform /data/wis2box/observations/congo/synop_202308.txt --metadata /data/wis2box/metadata/station/station_list.csv --year 2023 --month 08 --verbosity DEBUG
2023-09-14 20:20:04 [WARNING] Duplicate entries found for station  in station list file
2023-09-14 20:20:04 [WARNING] Duplicate entries found for station  in station list file
2023-09-14 20:20:04 [WARNING] Duplicate entries found for station  in station list file
2023-09-14 20:20:04 [WARNING] Duplicate entries found for station  in station list file
2023-09-14 20:20:04 [WARNING] Duplicate entries found for station  in station list file
2023-09-14 20:20:04 [INFO] Station 64400 report converted
2023-09-14 20:20:04 [WARNING] Station 64401 not found in station file
Error: '_meta'

synop_202308.txt