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

snapshot...

parent 4da7b951
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,8 @@ def run():
lon_s = np.zeros(1)
lat_s = np.zeros(1)
last_clvr_file = None
last_h5f = None
for idx, time in enumerate(time_keys):
if (idx % 4) != 0:
continue
......@@ -70,6 +72,7 @@ def run():
lat, lon, fl, rpt_str = tup
lat_s[0] = lat
lon_s[0] = lon
cc, ll = nav.earth_to_lc_s(lon_s, lat_s)
#images, _, _, idxs = get_images(lon_s, lat_s, time, ['14'], [10], [1])
#if images is not None:
......@@ -77,14 +80,21 @@ def run():
clvr_ds = get_clavrx_datasource(time)
clvr_file = clvr_ds.get_file(time)
cc, ll = nav.earth_to_lc_s(lon_s, lat_s)
try:
h5f = h5py.File(clvr_file, 'r')
except Exception:
h5f.close()
print('Problem with file: ', clvr_file)
if clvr_file is None:
continue
if last_clvr_file is None:
last_clvr_file = clvr_file
else:
if clvr_file == last_clvr_file:
hf5 = last_h5f
else:
last_h5f.close()
try:
h5f = h5py.File(clvr_file, 'r')
except Exception:
h5f.close()
print('Problem with file: ', clvr_file)
continue
last_h5f = hf5
gvals = get_grid_values(h5f, 'temp_11_0um_nom', ll[0], cc[0], 20)
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