diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 4b04e188f818ba55673d0aa3a29a95bb75d41b71..cdaea490716e04608dfb1fe0557580eb696888f7 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -48,14 +48,13 @@ def get_goes_datasource(timestamp): yr_dir = str(dt_obj.timetuple().tm_year) date_dir = dt_obj.strftime(dir_fmt) - yr_date = yr_dir+date_dir files_path = goes16_directory + '/' + yr_dir + '/' + date_dir + '/abi' + '/L1b' + '/RadC/' - ds = goes_ds_dct.get(yr_date) + ds = goes_ds_dct.get(date_dir) if ds is None: - print(yr_date) + print(date_dir) ds = GOESL1B(files_path) - goes_ds_dct[yr_date] = ds + goes_ds_dct[date_dir] = ds return ds @@ -170,8 +169,11 @@ def analyze(ice_dct, no_ice_dct): print(np.sum(np.logical_and(hist_a > 0, hist_b > 0))) for ts in list(no_ice_dct.keys()): - ds = get_goes_datasource(ts) - goes_file = ds.get_file(ts)[0] + try: + ds = get_goes_datasource(ts) + goes_file = ds.get_file(ts)[0] + except Exception: + continue def create_file(filename, ds_list, ds_types):