Skip to content

KeyError with single HRRR hourly run #795

@williamhobbs

Description

@williamhobbs

Issue:

I just started fetching the HRRR hourly (using the update in #794 to get 48 hours ahead [edit: turns out I'm using an earlier test version where I'm only grabbing 47 hours ahead]) and I get an error I haven't seen on the .grib2 files for a single run, 2022-09-21 06Z: KeyError: 'ASNOW_surface' (full output is below).

I'm not sure if this should be a common issue, but more robust error handling might be needed. I think this would have jammed up my fetch process for 1-2 days until the old files rolled off of NOMADS.

Details:

I manually removed the folder of .grib2 files and restarted the fetch, getting the same error, but noticed that the downloaded .grib2 files had different sizes the second time. The files downloaded the second time are attached here:
06_error2.zip.

The files from the first download were larger and the full folder is too large to upload to GitHub, so here's a partial set (first 24 of 48 .grib2 files):
06_error_partial.zip.

I tried downloading the files a third time and they appeared to be the same as the second time.

There was a reported data outage on NOMADS at 0605Z on 2022-09-21, so maybe that is related. See mailing list email screenshot below.

Again, note that I'm using #794 to get 48 hours ahead [edit: I'm not using that exact version, instead grabbing 47 hours ahead], and I'm using a custom reduced DOMAIN (see #686), but I think (hope?) that those changes are not relevant.

Extra details:

Full error output:

2022-09-21 14:04:22,871 INFO Fetching NWP forecasts for hrrr_hourly
2022-09-21 14:04:23,482 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf00.grib2
2022-09-21 14:04:23,588 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf01.grib2
2022-09-21 14:04:23,728 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf02.grib2
2022-09-21 14:04:23,801 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf03.grib2
2022-09-21 14:04:23,862 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf04.grib2
2022-09-21 14:04:23,927 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf05.grib2
2022-09-21 14:04:23,987 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf06.grib2
2022-09-21 14:04:24,047 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf07.grib2
2022-09-21 14:04:24,111 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf08.grib2
2022-09-21 14:04:24,175 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf09.grib2
2022-09-21 14:04:24,240 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf10.grib2
2022-09-21 14:04:24,383 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf11.grib2
2022-09-21 14:04:24,639 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf12.grib2
2022-09-21 14:04:28,547 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf13.grib2
2022-09-21 14:04:28,611 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf14.grib2
2022-09-21 14:04:28,720 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf15.grib2
2022-09-21 14:04:28,856 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf16.grib2
2022-09-21 14:04:28,916 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf17.grib2
2022-09-21 14:04:28,983 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf18.grib2
2022-09-21 14:04:29,042 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf19.grib2
2022-09-21 14:04:29,105 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf20.grib2
2022-09-21 14:04:29,332 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf21.grib2
2022-09-21 14:04:29,400 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf22.grib2
2022-09-21 14:04:29,466 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf23.grib2
2022-09-21 14:04:29,544 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf24.grib2
2022-09-21 14:04:29,635 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf25.grib2
2022-09-21 14:04:29,747 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf26.grib2
2022-09-21 14:04:29,880 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf27.grib2
2022-09-21 14:04:30,061 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf28.grib2
2022-09-21 14:04:30,131 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf29.grib2
2022-09-21 14:04:30,279 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf30.grib2
2022-09-21 14:04:30,368 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf31.grib2
2022-09-21 14:04:30,620 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf32.grib2
2022-09-21 14:04:30,694 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf33.grib2
2022-09-21 14:04:30,768 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf34.grib2
2022-09-21 14:04:30,832 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf35.grib2
2022-09-21 14:04:30,901 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf36.grib2
2022-09-21 14:04:31,139 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf37.grib2
2022-09-21 14:04:31,200 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf38.grib2
2022-09-21 14:04:31,297 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf39.grib2
2022-09-21 14:04:31,412 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf40.grib2
2022-09-21 14:04:31,534 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf41.grib2
2022-09-21 14:04:31,645 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf42.grib2
2022-09-21 14:04:31,984 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf43.grib2
2022-09-21 14:04:32,114 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf44.grib2
2022-09-21 14:04:32,186 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf45.grib2
2022-09-21 14:04:32,248 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf46.grib2
2022-09-21 14:04:32,312 INFO Getting file /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr.t06z.wrfsfcf47.grib2
2022-09-21 14:04:33,757 INFO Converting GRIB files to NetCDF with wgrib2 
2022-09-21 14:04:43,184 INFO Optimizing NetCDF file to save at /home/pi/Downloads/sfa/hrrr_hourly/2022/09/21/06/hrrr_hourly.nc
2022-09-21 14:04:43,701 ERROR Uncaught exception
loky.process_executor._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/home/pi/test_venv/lib/python3.7/site-packages/loky/process_executor.py", line 431, in _process_worker
    r = call_item()
  File "/home/pi/test_venv/lib/python3.7/site-packages/loky/process_executor.py", line 285, in __call__
    return self.fn(*self.args, **self.kwargs)
  File "/home/pi/test_venv/lib/python3.7/site-packages/solarforecastarbiter/io/fetch/nwp.py", line 562, in _optimize_netcdf
    for key in ds.keys()})
  File "/home/pi/test_venv/lib/python3.7/site-packages/solarforecastarbiter/io/fetch/nwp.py", line 562, in <dictcomp>
    for key in ds.keys()})
KeyError: 'ASNOW_surface'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/pi/test_venv/bin/solararbiter", line 10, in <module>
    sys.exit(cli())
  File "/home/pi/test_venv/lib/python3.7/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/test_venv/lib/python3.7/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/home/pi/test_venv/lib/python3.7/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/pi/test_venv/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/test_venv/lib/python3.7/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/home/pi/test_venv/lib/python3.7/site-packages/solarforecastarbiter/cli.py", line 293, in fetchnwp
    loop.run_until_complete(fut)
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/home/pi/test_venv/lib/python3.7/site-packages/solarforecastarbiter/io/fetch/nwp.py", line 699, in run
    await _run_loop(session, model, modelpath, chunksize, once, use_tmp)
  File "/home/pi/test_venv/lib/python3.7/site-packages/solarforecastarbiter/io/fetch/nwp.py", line 678, in _run_loop
    await optimize_netcdf(nctmpfile, finalpath)
  File "/home/pi/test_venv/lib/python3.7/site-packages/solarforecastarbiter/io/fetch/nwp.py", line 582, in optimize_netcdf
    await run_in_executor(_optimize_netcdf, nctmpfile, tmp_path)
  File "/home/pi/test_venv/lib/python3.7/site-packages/solarforecastarbiter/io/fetch/__init__.py", line 28, in run_in_executor
    exc, partial(func, *args, **kwargs))
KeyError: 'ASNOW_surface'

Mailing list email screenshot about NOMADS data outage:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions