ropensci-archive / bomrang

:warning: ARCHIVED :warning: Australian government Bureau of Meteorology (BOM) data client for R
Other
109 stars 26 forks source link

BOM rainfall station list empty, leading to get_historical error #119

Closed jimjam-slam closed 3 years ago

jimjam-slam commented 4 years ago
> get_historical(stationid = "023000", type = "max")
Error in x[i] : only 0's may be mixed with negative subscripts

Running debug(.get_ncc), it looks like this is a problem with lines 263-4 of get_historical.R: the list of rainfall stations published by the BOM is currently empty (I assume erroneously, because the temperature ones look fine), and because the resulting table parse attempt (starting line 230) ends up with less than 7 rows, line 264 crashes due to a subscripting error.

Bureau of Meteorology product IDCJMC0014.                                       Produced: 19 Aug 2020
Australian stations measuring rainfall

0 stations

(c) Copyright Commonwealth of Australia 2020, Bureau of Meteorology (ABN 92 637 533 532) 
Please note Copyright, Disclaimer and Privacy Notice, accessible at <http://www.bom.gov.au/other/copyright.shtml>

I daresay this will fix itself once things settle on the BOM's end, but I'll try to work on a PR to make the function more robust (particularly since this crash happens even if someone isn't looking for rainfall data) in the morning!

jimjam-slam commented 4 years ago

The rainfall station list for 20 August 2020 is also empty, so maybe this isn't going to dix itself πŸ˜”

adamhsparks commented 4 years ago

Are we sure it’s not just the drought? πŸ€·β€β™€οΈ

On 21 Aug 2020, at 11:31, James Goldie notifications@github.com wrote:

The rainfall station list for 20 August 2020 is also empty, so maybe this isn't going to dix itself πŸ˜”

β€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ropensci/bomrang/issues/119#issuecomment-677988230, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYMIAXFBJGNPIDY6PFSM2TSBXE53ANCNFSM4QETU2QA.