I am running some scripts as PBS jobs to calculate and save as netCDF annual mean of passive_adelie_xflux_adv
from access-om2-01 01deg_jra55v140_iaf_cycle3_antarctic_tracers
experiment. I created my own database when the outputs were moved from /scratch
to g/data/ik11
. But the job fails and it seems like it is still trying to access /scratch
.
! I am trying to save data for 10 years 1985–1994. The script worked for 1985 and 1986 but failed for 1987 to 1994.
Since the outputs later had been saved to cosima_master db, I ran the job using master db but got the same error.
Here is the error:
2022-12-23 13:03:58,009 - distributed.worker - WARNING - Compute Failed
Key: open_dataset-4f39abe6-ca81-4889-bead-0c3bddfbda46
Function: execute_task
args: ((<function apply at 0x14746f0ff3a0>, <function open_dataset at 0x147468bf8310>, ['/scratch/v45/akm157/access-om2/archive/01deg_jra55v140_iaf_cycle3_antarctic_tracers/output607/ocean/ross_xflux_adv.nc'], (<class 'dict'>, [['engine', None], ['chunks', (<class 'dict'>, [['time', 1], ['st_ocean', 75], ['yt_ocean_sub01', 27], ['xu_ocean_sub01', 24]])]])))
kwargs: {}
Exception: "FileNotFoundError(2, 'No such file or directory')"
Traceback (most recent call last):
File "/g/data/x77/ps7863/python_scripts/01deg_jra55v140_iaf_cycle3_antarctic_tracers/save_ross_fluxes.py", line 41, in <module>
ross_xflux = cc.querying.getvar(expt,
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/cosima_cookbook/querying.py", line 368, in getvar
ds = xr.open_mfdataset(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/api.py", line 1004, in open_mfdataset
datasets, closers = dask.compute(datasets, closers)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/dask/base.py", line 600, in compute
results = schedule(dsk, keys, **kwargs)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/client.py", line 3122, in get
results = self.gather(packed, asynchronous=asynchronous, direct=direct)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/client.py", line 2291, in gather
return self.sync(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/utils.py", line 339, in sync
return sync(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/utils.py", line 406, in sync
raise exc.with_traceback(tb)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/utils.py", line 379, in f
result = yield future
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/tornado/gen.py", line 762, in run
value = future.result()
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/client.py", line 2154, in _gather
raise exception.with_traceback(traceback)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/dask/utils.py", line 71, in apply
return func(*args, **kwargs)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/api.py", line 539, in open_dataset
backend_ds = backend.open_dataset(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 572, in open_dataset
store = NetCDF4DataStore.open(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 376, in open
return cls(manager, group=group, mode=mode, lock=lock, autoclose=autoclose)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 323, in __init__
self.format = self.ds.data_model
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 385, in ds
return self._acquire()
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 379, in _acquire
with self._manager.acquire_context(needs_lock) as root:
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/contextlib.py", line 119, in __enter__
return next(self.gen)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/file_manager.py", line 197, in acquire_context
file, cached = self._acquire_with_cache_info(needs_lock)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/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'/scratch/v45/akm157/access-om2/archive/01deg_jra55v140_iaf_cycle3_antarctic_tracers/output607/ocean/ross_xflux_adv.nc'
2022-12-23 17:33:05,833 - distributed.worker - WARNING - Compute Failed
Key: open_dataset-0ee6fa3b-50ca-43d3-ac90-44ea11cfc974
Function: execute_task
args: ((<function apply at 0x1455d563e3a0>, <function open_dataset at 0x1455cb130310>, ['/scratch/v45/akm157/access-om2/archive/01deg_jra55v140_iaf_cycle3_antarctic_tracers/output607/ocean/ross_xflux_adv.nc'], (<class 'dict'>, [['engine', None], ['chunks', (<class 'dict'>, [['time', 1], ['st_ocean', 75], ['yt_ocean_sub01', 27], ['xu_ocean_sub01', 24]])]])))
kwargs: {}
Exception: "FileNotFoundError(2, 'No such file or directory')"
Traceback (most recent call last):
File "/g/data/x77/ps7863/python_scripts/01deg_jra55v140_iaf_cycle3_antarctic_tracers/save_ross_fluxes.py", line 41, in <module>
ross_xflux = cc.querying.getvar(expt,
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/cosima_cookbook/querying.py", line 368, in getvar
ds = xr.open_mfdataset(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/api.py", line 1004, in open_mfdataset
datasets, closers = dask.compute(datasets, closers)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/dask/base.py", line 600, in compute
results = schedule(dsk, keys, **kwargs)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/client.py", line 3122, in get
results = self.gather(packed, asynchronous=asynchronous, direct=direct)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/client.py", line 2291, in gather
return self.sync(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/utils.py", line 339, in sync
return sync(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/utils.py", line 406, in sync
raise exc.with_traceback(tb)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/utils.py", line 379, in f
result = yield future
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/tornado/gen.py", line 762, in run
value = future.result()
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/client.py", line 2154, in _gather
raise exception.with_traceback(traceback)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/dask/utils.py", line 71, in apply
return func(*args, **kwargs)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/api.py", line 539, in open_dataset
backend_ds = backend.open_dataset(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 572, in open_dataset
store = NetCDF4DataStore.open(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 376, in open
return cls(manager, group=group, mode=mode, lock=lock, autoclose=autoclose)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 323, in __init__
self.format = self.ds.data_model
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 385, in ds
return self._acquire()
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 379, in _acquire
with self._manager.acquire_context(needs_lock) as root:
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/contextlib.py", line 119, in __enter__
return next(self.gen)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/file_manager.py", line 197, in acquire_context
file, cached = self._acquire_with_cache_info(needs_lock)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/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'/scratch/v45/akm157/access-om2/archive/01deg_jra55v140_iaf_cycle3_antarctic_tracers/output607/ocean/ross_xflux_adv.nc'
File "/g/data/x77/ps7863/python_scripts/01deg_jra55v140_iaf_cycle3_antarctic_tracers/save_ross_fluxes.py", line 55
ross_xflux_mean = (ross_xflux.sel(time=time_slice)*month_length).sum('time')/365.load()
^
SyntaxError: invalid syntax
2023-01-10 11:39:08,658 - distributed.worker - WARNING - Compute Failed
Key: open_dataset-c3fa9279-6b8c-4617-a759-943c1b47daba
Function: execute_task
args: ((<function apply at 0x1480755143a0>, <function open_dataset at 0x14806b004310>, ['/scratch/v45/akm157/access-om2/archive/01deg_jra55v140_iaf_cycle3_antarctic_tracers/output607/ocean/ross_xflux_adv.nc'], (<class 'dict'>, [['engine', None], ['chunks', (<class 'dict'>, [['time', 1], ['st_ocean', 75], ['yt_ocean_sub01', 27], ['xu_ocean_sub01', 24]])]])))
kwargs: {}
Exception: "FileNotFoundError(2, 'No such file or directory')"
Traceback (most recent call last):
File "/g/data/x77/ps7863/python_scripts/01deg_jra55v140_iaf_cycle3_antarctic_tracers/save_ross_fluxes.py", line 42, in <module>
ross_xflux = cc.querying.getvar(expt,
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/cosima_cookbook/querying.py", line 368, in getvar
ds = xr.open_mfdataset(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/api.py", line 1004, in open_mfdataset
datasets, closers = dask.compute(datasets, closers)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/dask/base.py", line 600, in compute
results = schedule(dsk, keys, **kwargs)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/client.py", line 3122, in get
results = self.gather(packed, asynchronous=asynchronous, direct=direct)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/client.py", line 2291, in gather
return self.sync(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/utils.py", line 339, in sync
return sync(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/utils.py", line 406, in sync
raise exc.with_traceback(tb)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/utils.py", line 379, in f
result = yield future
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/tornado/gen.py", line 762, in run
value = future.result()
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/distributed/client.py", line 2154, in _gather
raise exception.with_traceback(traceback)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/dask/utils.py", line 71, in apply
return func(*args, **kwargs)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/api.py", line 539, in open_dataset
backend_ds = backend.open_dataset(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 572, in open_dataset
store = NetCDF4DataStore.open(
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 376, in open
return cls(manager, group=group, mode=mode, lock=lock, autoclose=autoclose)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 323, in __init__
self.format = self.ds.data_model
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 385, in ds
return self._acquire()
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 379, in _acquire
with self._manager.acquire_context(needs_lock) as root:
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/contextlib.py", line 119, in __enter__
return next(self.gen)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/site-packages/xarray/backends/file_manager.py", line 197, in acquire_context
file, cached = self._acquire_with_cache_info(needs_lock)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/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'/scratch/v45/akm157/access-om2/archive/01deg_jra55v140_iaf_cycle3_antarctic_tracers/output607/ocean/ross_xflux_adv.nc'
/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 168 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.07/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 168 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
Can anyone point out what’s wrong?