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

snapshot...

parent acbad66a
No related branches found
No related tags found
No related merge requests found
...@@ -69,7 +69,7 @@ def extract(mask_image, image_ts, clavrx_path): ...@@ -69,7 +69,7 @@ def extract(mask_image, image_ts, clavrx_path):
contrail_lats = contrail_lats[keep] contrail_lats = contrail_lats[keep]
# Indexes of contrail_press for individual bins # Indexes of contrail_press for individual bins
bins = np.arange(100, 1000, 100) bins = np.arange(100, 1000, 50)
binned_indexes = np.digitize(contrail_press, bins) binned_indexes = np.digitize(contrail_press, bins)
# Store the indexes in a dictionary where the key is the bin number and value is the list of indexes # Store the indexes in a dictionary where the key is the bin number and value is the list of indexes
...@@ -110,6 +110,14 @@ def extract(mask_image, image_ts, clavrx_path): ...@@ -110,6 +110,14 @@ def extract(mask_image, image_ts, clavrx_path):
horz_wind_spd_3d = wind_speed(uwind_3d, vwind_3d) horz_wind_spd_3d = wind_speed(uwind_3d, vwind_3d)
vert_shear_3d = first_derivative(horz_wind_spd_3d, axis=0, x=temp_3d.coords['Pressure'] * units.hPa) vert_shear_3d = first_derivative(horz_wind_spd_3d, axis=0, x=temp_3d.coords['Pressure'] * units.hPa)
voxel_dict = {key: [] for key in bins_dict.keys()}
for key in bins_dict.keys():
print('working on pressure level: ', bins[key])
for c_idx in bins_dict[key]:
lon = contrail_lons[c_idx]
lat = contrail_lats[c_idx]
press = contrail_press[c_idx]
xr_dataset.close() xr_dataset.close()
......
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