Closed maaikelimper closed 1 month ago
Reproduced locally via:
pyoscar station "0-76-0-3170206000000036" -s -f XML
Interestingly enough, pyoscar station "0-76-0-3170206000000036" -s
works fine (however we are explicitly asking for the WMDR XML output in wis2box). I've reached out to OSCAR/Surface and will report back on their response. cc @david-i-berry
WIS2box, via pyoscar, accesses the following link:
This works and returns the XML via the browser.
the following command also works:
pyoscar station "0-76-0-3170206000000036" --format=XML --env=prod
and returns the XML as expected.
A bit more investigation:
import json
from pyoscar import OSCARClient
client = OSCARClient(env='prod')
station = client.get_station_report("0-76-0-3170206000000036", format_='XML', summary=True)
print(json.dumps(station, indent = 4))
gives the following output:
{
"station_name": "UBERLANDIA",
"wigos_station_identifier": "0-76-0-3170206000000036",
"facility_type": "landFixed",
"wmo_region": "southAmerica",
"territory_name": "BRA",
"latitude": -18.916944,
"longitude": -48.255556,
"elevation": 874.8,
"barometer_height": 870.5
}
Using the WSI "0-76-0-5208707000000007" also works correctly.
This is the line from the wis2box-api where we fetch from OSCAR:
The error either occurs after here or there are network problems.
José reported that the problem fixed itself after one day. This was the second day station where Brazil updated the primary wigos-id during the training, failed to import it into wis2box, then repeat the import one day later and it works.
We suspect that there is something about the way that OSCAR/Surface works, whereby an update does not immediately translate into the station being available for import into the wis2box, but can be imported one day later ...
From OSCAR/Surface, for reference:
The OAI-PMH works with primary WIGOS IDs. For the station 0-76-0-3170206000000036 the primary WSI is 0-20000-0-86776 So if you try: https://oscardepl.wmo.int/oai/provider?verb=GetRecord&metadataPrefix=wmdr&identifier=0-20000-0-86776 you will get the file.
For the new system (OSCAR nextGen) we will make sure that WMDR XML files will be available also via non-primary WSI IDs.
I don't think this an issue we can fix in wis2box, closing
Hi Tom,
When getting metadata station 0-76-0-5208707000000007 we encounter an error originating in pyoscar, could you have look?
wis2box metadata station get 0-76-0-5208707000000007