conrad-blucher-institute / semaphore

Creative Commons Zero v1.0 Universal
1 stars 0 forks source link

Logging NDBC Error #429

Closed lovelysandlonelys closed 1 month ago

lovelysandlonelys commented 1 month ago

Background: For a period of time from late July to mid August semaphore experienced an 'index out of range' error. Because the error has only been observed within that time frame no further investigation was done, however it seemed like a good idea to add a small logging statement for when NDBC returns no data in order to provide future debuggers with more information/context.

I just did a simple statement and added a comment about why it's likely an error on NDBC's side. Very open to changes that align the log more with what is appropriate to log.

To Test: Run a model that uses NDBC to make sure the statement doesn't trigger when data is returned: docker exec semaphore-core python3 src/semaphoreRunner.py -d Inundation/August/ar_inundation_aug_12h.json

Run a model from the time period the error was observed to ensure log statement executes: docker exec semaphore-core python3 src/semaphoreRunner.py -d Inundation/August/ar_inundation_aug_12h.json -p '202408220101'