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

snapshot...

parent 0c2000b0
Branches
No related tags found
No related merge requests found
......@@ -52,7 +52,6 @@ def extract(mask_image, image_ts, clavrx_path):
clvrx_lats = get_grid_values_all(clvrx_h5f, 'latitude').flatten()
contrail_idxs = (mask_image == 1).flatten()
print('number of contrail pixels: ', np.sum(contrail_idxs))
# Assuming GOES FD for now -------------------
# elems, lines = np.meshgrid(np.arange(5424), np.arange(5424))
......@@ -121,6 +120,8 @@ def extract(mask_image, image_ts, clavrx_path):
print('working on pressure level: ', bins[key])
for c_idx in bins_dict[key]:
lon = contrail_lons[c_idx]
if lon < 0: # Match GFS convention
lon += 360.0
lat = contrail_lats[c_idx]
press = contrail_press[c_idx]
......@@ -129,6 +130,9 @@ def extract(mask_image, image_ts, clavrx_path):
horz_wind_spd_value = horz_wind_spd_3d.interp(Pressure=press, Longitude=lon, Latitude=lat, method='nearest')
vert_shear_value = vert_shear_3d.interp(Pressure=press, Longitude=lon, Latitude=lat, method='nearest')
# tmp = horz_shear_3d.sel(Pressure=press, method='nearest')
# tmp = tmp.sel(Longitude=lon, Latitude=lat, method='nearest')
voxel_dict[key].append((press, lat, lon, horz_shear_value, static_value, horz_wind_spd_value, vert_shear_value))
# Create pandas DataFrame for each list of tuples in voxel_dict
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment