I got this error when extract TM5 profiles to products generated by s5p_lnox_main.py
Adding NO2 and Temperature profiles to /student/zhangxin/papers/Arctic/S5P_LNOx/main/output_gld360/clean_lightning/202107/S5P_PAL__L2__NO2____20210712T000148_20210712T014317_19403_02_020301.nc
Traceback (most recent call last):
File "/public/home/zhangxin/new/miniconda3/envs/knmi_arctic/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 180, in _nc4_require_group
ds = ds.groups[key]
KeyError: 'S5P'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/student/zhangxin/papers/Arctic/S5P_LNOx/main/s5p_lnox_tm5_extract.py", line 48, in <module>
with xr.open_dataset(file, group='S5P') as ds:
File "/public/home/zhangxin/new/miniconda3/envs/knmi_arctic/lib/python3.9/site-packages/xarray/backends/api.py", line 495, in open_dataset
backend_ds = backend.open_dataset(
File "/public/home/zhangxin/new/miniconda3/envs/knmi_arctic/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 553, in open_dataset
store = NetCDF4DataStore.open(
File "/public/home/zhangxin/new/miniconda3/envs/knmi_arctic/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 382, in open
return cls(manager, group=group, mode=mode, lock=lock, autoclose=autoclose)
File "/public/home/zhangxin/new/miniconda3/envs/knmi_arctic/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 330, in __init__
self.format = self.ds.data_model
File "/public/home/zhangxin/new/miniconda3/envs/knmi_arctic/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 391, in ds
return self._acquire()
File "/public/home/zhangxin/new/miniconda3/envs/knmi_arctic/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 386, in _acquire
ds = _nc4_require_group(root, self._group, self._mode)
File "/public/home/zhangxin/new/miniconda3/envs/knmi_arctic/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 186, in _nc4_require_group
raise OSError(f"group not found: {key}", e)
OSError: [Errno group not found: S5P] 'S5P'
I got this error when extract TM5 profiles to products generated by
s5p_lnox_main.py
Two solutions: