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

snapshot...

parent bd45b70f
No related branches found
No related tags found
No related merge requests found
......@@ -35,8 +35,17 @@ def get_clavrx_datasource(timestamp):
def get_grid_values(h5f, grid_name, j_c, i_c, half_width, scale_factor_name='scale_factor', add_offset_name='add_offset'):
hfds = h5f[grid_name]
attrs = hfds.attrs
grd_vals = hfds[j_c-half_width:j_c+half_width+1, i_c-half_width:i_c+half_width+1]
ylen, xlen = hfds.shape
j_l = j_c-half_width
i_l = i_c-half_width
if j_l < 0 or i_l < 0:
return None
j_r = j_c+half_width+1
i_r = j_c+half_width+1
if j_r >= ylen or i_r >= xlen:
return None
grd_vals = hfds[j_l:j_r, i_l:i_r]
grd_vals = np.where(grd_vals == -999, np.nan, grd_vals)
grd_vals = np.where(grd_vals == -32768, np.nan, grd_vals)
......@@ -66,6 +75,8 @@ def run():
obs_times = []
obs_lons = []
obs_lats = []
temp_10_4um_nom = []
cld_height_acha = []
for idx, time in enumerate(time_keys):
reports = ice_dict[time]
......@@ -102,4 +113,5 @@ def run():
obs_lats.append(lat)
cc, ll = nav.earth_to_lc_s(lon_s, lat_s)
gvals = get_grid_values(h5f, 'temp_10_4um_nom', ll[0], cc[0], 20)
\ No newline at end of file
gvals = get_grid_values(h5f, 'temp_10_4um_nom', ll[0], cc[0], 20)
gvals = get_grid_values(h5f, 'cld_height_acha', ll[0], cc[0], 20)
\ No newline at end of file
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