LinkedEarth / Pyleoclim_util

Python Package for the Analysis of Paleoclimate Data. Documentation at
https://pyleoclim-util.readthedocs.io
GNU General Public License v3.0
88 stars 33 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'E:\\LMRt_project\\PAGES2k_CCSM4_GISTEMP\\data\\prior\\SST\\b.e11.BLMTRC5CN.f19_g16.001.pop.h.SST.085001-200512.96144.d3' #613

Closed rihpeach closed 1 month ago

rihpeach commented 1 month ago

Traceback (most recent call last): File "E:\LMRt_project\fuxian\li13b6_ch296_d20v3_dropCM1_year_da.py", line 93, in job.load_prior(verbose=True) File "E:\Anaconda\envs\lmrt\lib\site-packages\LMRt\reconjob.py", line 462, in load_prior ds.load_nc(self.configs['prior_path'], varname_dict=self.configs['prior_varname'], anom_period=anom_period, inplace=True) File "E:\Anaconda\envs\lmrt\lib\site-packages\LMRt\gridded.py", line 227, in load_nc with xr.open_dataset(path, engine='netcdf4') as ds: File "E:\Anaconda\envs\lmrt\lib\site-packages\xarray\backends\api.py", line 588, in open_dataset backend_ds = backend.opendataset( File "E:\Anaconda\envs\lmrt\lib\site-packages\xarray\backends\netCDF4.py", line 645, in opendataset store = NetCDF4DataStore.open( File "E:\Anaconda\envs\lmrt\lib\site-packages\xarray\backends\netCDF4.py", line 408, in open return cls(manager, group=group, mode=mode, lock=lock, autoclose=autoclose) File "E:\Anaconda\envs\lmrt\lib\site-packages\xarray\backends\netCDF4_.py", line 355, in init self.format = self.ds.datamodel File "E:\Anaconda\envs\lmrt\lib\site-packages\xarray\backends\netCDF4.py", line 417, in ds return self.acquire() File "E:\Anaconda\envs\lmrt\lib\site-packages\xarray\backends\netCDF4.py", line 411, in _acquire with self._manager.acquire_context(needs_lock) as root: File "E:\Anaconda\envs\lmrt\lib\contextlib.py", line 119, in enter return next(self.gen) File "E:\Anaconda\envs\lmrt\lib\site-packages\xarray\backends\file_manager.py", line 199, in acquire_context file, cached = self._acquire_with_cache_info(needs_lock) File "E:\Anaconda\envs\lmrt\lib\site-packages\xarray\backends\file_manager.py", line 217, in _acquire_with_cache_info file = self._opener(*self._args, **kwargs) File "src\netCDF4\_netCDF4.pyx", line 2470, in netCDF4._netCDF4.Dataset.init File "src\netCDF4\_netCDF4.pyx", line 2107, in netCDF4._netCDF4._ensure_nc_success FileNotFoundError: [Errno 2] No such file or directory: 'E:\LMRt_project\PAGES2k_CCSM4_GISTEMP\data\prior\SST\b.e11.BLMTRC5CN.f19_g16.001.pop.h.SST.085001-200512.96144.d3' 1727170162856 1727170195651

rihpeach commented 1 month ago

Hello, I encountered an issue loading files during data assimilation. My path, naming, and permissions are all fine, and I have also set up with xr.open_dataset (path, engine='netcdf4') as ds:, But it still reports an error, showing that the file cannot be found.

CommonClimate commented 1 month ago

Hello @rihpeach , sorry you are encountering this issue, but this is not the place to report it: it seems an issue with xarray, so I would ask for advice on the pangeo forum. However, the problem seems more elementary: it's just that the file cannot be found at the specified path.

I also note that you appear to be using the LMRt package, which has been discontinued. Please use cfr instead. It should simplify the downloading of necessary files, so it may solve the issue above.

CommonClimate commented 1 month ago

I am closing this as it is definitely not a Pyleoclim issue