zxdawn / S5P-LNO2

Core code for the TROPOMI lightning NO2 retrievals
GNU General Public License v3.0
2 stars 1 forks source link

Skip empty dataset for Plot function #23

Closed zxdawn closed 2 years ago

zxdawn commented 2 years ago
Traceback (most recent call last):
  File "/student/zhangxin/papers/Arctic/S5P_LNOx/main/s5p_lnox_plot_tracks.py", line 228, in <module>                                             
    main()         
  File "/student/zhangxin/papers/Arctic/S5P_LNOx/main/s5p_lnox_plot_tracks.py", line 212, in main                                                 
    pool.map(plot_data, filelist)
  File "/public/home/zhangxin/new/miniconda3/envs/knmi_arctic/lib/python3.9/multiprocessing/pool.py", line 364, in map                            
    return self._map_async(func, iterable, mapstar, chunksize).get()     
  File "/public/home/zhangxin/new/miniconda3/envs/knmi_arctic/lib/python3.9/multiprocessing/pool.py", line 771, in get                            
    raise self._value
  File "/public/home/zhangxin/new/miniconda3/envs/knmi_arctic/lib/python3.9/multiprocessing/pool.py", line 125, in worker                         
    result = (True, func(*args, **kwds))                                 
  File "/public/home/zhangxin/new/miniconda3/envs/knmi_arctic/lib/python3.9/multiprocessing/pool.py", line 48, in mapstar                         
    return list(map(*args))
  File "/student/zhangxin/papers/Arctic/S5P_LNOx/main/s5p_lnox_plot_tracks.py", line 200, in plot_data                                            
    plot_func(ds_tropomi, ds_lightning)                                  
  File "/student/zhangxin/papers/Arctic/S5P_LNOx/main/s5p_lnox_plot_tracks.py", line 173, in plot_func                                            
    lon_min = min([n for n in ds_lightning['longitude'] if n>0]).values  
ValueError: min() arg is an empty sequence