glmtools icon indicating copy to clipboard operation
glmtools copied to clipboard

Error making grids from L2 GLM data

Open tlg7 opened this issue 2 years ago • 0 comments

I've been trying to make gridded data out of the L2 GLM data I have ( a summer's worth).

I've modified some example code, trying to run this:

python /home/tg/2021/GLM_2021/glmtools/examples/grid/make_GLM_grids.py -o /home/tg/2021/GLM_2021/glmdone/ --fixed_grid --split_events --float_output --goes_position=east --goes_sector=meso --ctr_lat=33.5 --ctr_lon=-101.5 --dx=2.0 --dy=2.0 --start=2018-07-02T04:30:00 --end=2018-07-02T04:35:00 /home/tg/2021/GLM_2021/data/noaa-goes16/GLM-L2-LCFA/2021/151/00/OR_GLM-L2-LCFA_G16_s20211510047200_e20211510047405_c20211510047430.nc /home/tg/2021/GLM_2021/data/noaa-goes16/GLM-L2-LCFA/2021/151/00/OR_GLM-L2-LCFA_G16_s20211510047400_e20211510048005_c20211510048027.nc /home/tg/2021/GLM_2021/data/noaa-goes16/GLM-L2-LCFA/2021/151/00/OR_GLM-L2-LCFA_G16_s20211510048000_e20211510048205_c20211510048222.nc I've had no luck trying to get this package to work and am running out of ideas. Any help would be greatly appreciated. The error I've received is this:

`Traceback (most recent call last): File "/home/tg/.conda/envs/glmval/lib/python3.6/site-packages/xarray/backends/file_manager.py", line 199, in _acquire_with_cache_info file = self._cache[self._key] File "/home/tg/.conda/envs/glmval/lib/python3.6/site-packages/xarray/backends/lru_cache.py", line 53, in getitem value = self._cache[key] KeyError: [<class 'netCDF4._netCDF4.Dataset'>, ('/home/tg/2021/GLM_2021/glmdone',), 'a', (('clobber', True), ('diskless', False), ('format', 'NETCDF4'), ('persist', False))]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/tg/2021/GLM_2021/glmtools/examples/grid/make_GLM_grids.py", line 329, in gridder(glm_filenames, start_time, end_time, **grid_kwargs) File "/home/tg/2021/GLM_2021/glmtools/glmtools/grid/make_grids.py", line 838, in grid_GLM_flashes outputs = list(map(this_proc_each_grid, subgrids)) File "/home/tg/2021/GLM_2021/glmtools/glmtools/grid/make_grids.py", line 922, in proc_each_grid output = gridder.write_grids(**out_kwargs_ij) File "/home/tg/2021/GLM_2021/glmtools/glmtools/grid/make_grids.py", line 608, in write_grids scale_and_offset=scale_and_offset) File "/home/tg/2021/GLM_2021/glmtools/glmtools/io/imagery.py", line 566, in write_goes_imagery dataset.to_netcdf(outfile) File "/home/tg/.conda/envs/glmval/lib/python3.6/site-packages/xarray/core/dataset.py", line 1809, in to_netcdf invalid_netcdf=invalid_netcdf, File "/home/tg/.conda/envs/glmval/lib/python3.6/site-packages/xarray/backends/api.py", line 1059, in to_netcdf store = store_open(target, mode, format, group, **kwargs) File "/home/tg/.conda/envs/glmval/lib/python3.6/site-packages/xarray/backends/netCDF4_.py", line 380, in open return cls(manager, group=group, mode=mode, lock=lock, autoclose=autoclose) File "/home/tg/.conda/envs/glmval/lib/python3.6/site-packages/xarray/backends/netCDF4_.py", line 328, in init self.format = self.ds.data_model File "/home/tg/.conda/envs/glmval/lib/python3.6/site-packages/xarray/backends/netCDF4_.py", line 389, in ds return self.acquire() File "/home/tg/.conda/envs/glmval/lib/python3.6/site-packages/xarray/backends/netCDF4.py", line 383, in _acquire with self._manager.acquire_context(needs_lock) as root: File "/home/tg.conda/envs/glmval/lib/python3.6/contextlib.py", line 81, in enter return next(self.gen) File "/home/tg/.conda/envs/glmval/lib/python3.6/site-packages/xarray/backends/file_manager.py", line 187, in acquire_context file, cached = self._acquire_with_cache_info(needs_lock) File "/home/tg/.conda/envs/glmval/lib/python3.6/site-packages/xarray/backends/file_manager.py", line 205, in _acquire_with_cache_info file = self._opener(*self._args, **kwargs) File "src/netCDF4/_netCDF4.pyx", line 2307, in netCDF4._netCDF4.Dataset.init File "src/netCDF4/_netCDF4.pyx", line 1925, in netCDF4._netCDF4._ensure_nc_success PermissionError: [Errno 13] Permission denied: b'/home/tg/2021/GLM_2021/glmdone'`

How can I interpret this? I have no idea how to solve this or what the issue is. Thanks for any help

tlg7 avatar Sep 20 '23 23:09 tlg7