Skip to content
Snippets Groups Projects
Commit 7662eb10 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 5ed75ef8
No related branches found
No related tags found
No related merge requests found
...@@ -48,14 +48,13 @@ def get_goes_datasource(timestamp): ...@@ -48,14 +48,13 @@ def get_goes_datasource(timestamp):
yr_dir = str(dt_obj.timetuple().tm_year) yr_dir = str(dt_obj.timetuple().tm_year)
date_dir = dt_obj.strftime(dir_fmt) date_dir = dt_obj.strftime(dir_fmt)
yr_date = yr_dir+date_dir
files_path = goes16_directory + '/' + yr_dir + '/' + date_dir + '/abi' + '/L1b' + '/RadC/' 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: if ds is None:
print(yr_date) print(date_dir)
ds = GOESL1B(files_path) ds = GOESL1B(files_path)
goes_ds_dct[yr_date] = ds goes_ds_dct[date_dir] = ds
return ds return ds
...@@ -170,8 +169,11 @@ def analyze(ice_dct, no_ice_dct): ...@@ -170,8 +169,11 @@ def analyze(ice_dct, no_ice_dct):
print(np.sum(np.logical_and(hist_a > 0, hist_b > 0))) print(np.sum(np.logical_and(hist_a > 0, hist_b > 0)))
for ts in list(no_ice_dct.keys()): for ts in list(no_ice_dct.keys()):
ds = get_goes_datasource(ts) try:
goes_file = ds.get_file(ts)[0] ds = get_goes_datasource(ts)
goes_file = ds.get_file(ts)[0]
except Exception:
continue
def create_file(filename, ds_list, ds_types): def create_file(filename, ds_list, ds_types):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment