You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to generate daily forecasts using the run_era5_forecast.sh over the first week of a year, it fails with the following error (Script run on 5th/6th of Jan 2025):
$ ./run_era5_forecast.sh atmos23
Traceback (most recent call last):
File "/data/hpcdata/users/username/miniconda3/envs/icenet0.2.9_dev/lib/python3.11/site-packages/xarray/backends/file_manager.py", line 209, in _acquire_with_cache_info
file = self._cache[self._key]
~~~~~~~~~~~^^^^^^^^^^^
File "/data/hpcdata/users/username/miniconda3/envs/icenet0.2.9_dev/lib/python3.11/site-packages/xarray/backends/lru_cache.py", line 55, in __getitem__
value = self._cache[key]
~~~~~~~~~~~^^^^^
KeyError: [<class 'netCDF4._netCDF4.Dataset'>, ('/data/hpcdata/users/username/icenet-daily-forecast-generation/data/era5/south/tas/2025.nc',), 'r', (('clobber', True), ('diskless', False), ('format', 'NETCDF4'), ('persist', False)), '569e43f1-2646-4b70-8b7b-4178558efa60']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in<module>
File "/data/hpcdata/users/username/miniconda3/envs/icenet0.2.9_dev/lib/python3.11/site-packages/xarray/backends/api.py", line 541, in open_dataset
backend_ds = backend.open_dataset(
^^^^^^^^^^^^^^^^^^^^^
File "/data/hpcdata/users/username/miniconda3/envs/icenet0.2.9_dev/lib/python3.11/site-packages/xarray/backends/netCDF4_.py", line 578, in open_dataset
store = NetCDF4DataStore.open(
^^^^^^^^^^^^^^^^^^^^^^
File "/data/hpcdata/users/username/miniconda3/envs/icenet0.2.9_dev/lib/python3.11/site-packages/xarray/backends/netCDF4_.py", line 382, in open
return cls(manager, group=group, mode=mode, lock=lock, autoclose=autoclose)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/hpcdata/users/username/miniconda3/envs/icenet0.2.9_dev/lib/python3.11/site-packages/xarray/backends/netCDF4_.py", line 329, in __init__
self.format = self.ds.data_model
^^^^^^^
File "/data/hpcdata/users/username/miniconda3/envs/icenet0.2.9_dev/lib/python3.11/site-packages/xarray/backends/netCDF4_.py", line 391, in ds
returnself._acquire()
^^^^^^^^^^^^^^^
File "/data/hpcdata/users/username/miniconda3/envs/icenet0.2.9_dev/lib/python3.11/site-packages/xarray/backends/netCDF4_.py", line 385, in _acquire
with self._manager.acquire_context(needs_lock) as root:
File "/data/hpcdata/users/username/miniconda3/envs/icenet0.2.9_dev/lib/python3.11/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/data/hpcdata/users/username/miniconda3/envs/icenet0.2.9_dev/lib/python3.11/site-packages/xarray/backends/file_manager.py", line 197, in acquire_context
file, cached = self._acquire_with_cache_info(needs_lock)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/hpcdata/users/username/miniconda3/envs/icenet0.2.9_dev/lib/python3.11/site-packages/xarray/backends/file_manager.py", line 215, in _acquire_with_cache_info
file = self._opener(*self._args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "src/netCDF4/_netCDF4.pyx", line 2353, in netCDF4._netCDF4.Dataset.__init__
File "src/netCDF4/_netCDF4.pyx", line 1963, in netCDF4._netCDF4._ensure_nc_success
FileNotFoundError: [Errno 2] No such file or directory: b'/data/hpcdata/users/username/icenet-daily-forecast-generation/data/era5/south/tas/2025.nc'
And, it tries to load: data/era5/south/tas/2025.nc, but due to the ~5 day lag in ERA5 data availability, this file does not yet exist, and so, shows this error.
If this happens, it should try to figure out the latest available date to initialise forecast from using the previous year's file instead.
The text was updated successfully, but these errors were encountered:
Issue
When attempting to generate daily forecasts using the
run_era5_forecast.sh
over the first week of a year, it fails with the following error (Script run on 5th/6th of Jan 2025):Solution
Problem caused by:
icenet-pipeline/run_era5_forecast.sh
Line 22 in 3db92a0
The
DATE_RANGE
here:icenet-pipeline/run_era5_forecast.sh
Line 16 in 3db92a0
resolves to
2025-1-1 2025-1-6
And, it tries to load:
data/era5/south/tas/2025.nc
, but due to the ~5 day lag in ERA5 data availability, this file does not yet exist, and so, shows this error.If this happens, it should try to figure out the latest available date to initialise forecast from using the previous year's file instead.
The text was updated successfully, but these errors were encountered: