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

snapshot...

parent abd2c65f
No related branches found
No related tags found
No related merge requests found
......@@ -114,7 +114,7 @@ def extract(mask_image, image_ts, clavrx_path):
# helper function to create a DataArray and units via metpy's pint support
vert_shear_3d = first_derivative(horz_wind_spd_3d, axis=0, x=temp_3d.coords['Pressure'])
vert_shear_3d = volume_np_to_xr(vert_shear_3d, ['Pressure', 'Latitude', 'Longitude'], lon_range=[lon_range[0], lon_range[1]], lat_range=[lat_range[0], lat_range[1]])
vert_shear_3d = vert_shear_3d * units.meter / (units.second * units.hPa)
vert_shear_3d = vert_shear_3d / units.hPa
voxel_dict = {key: [] for key in bins_dict.keys()}
for key in bins_dict.keys():
......@@ -134,7 +134,8 @@ def extract(mask_image, image_ts, clavrx_path):
# Create pandas DataFrame for each list of tuples in voxel_dict
voxel_dict_df = {}
for k, v in voxel_dict.items():
voxel_dict_df[k] = pd.DataFrame(v, columns=["press", "lat", "lon", "horz_shear_value", "static_value", "horz_wind_spd_value", "vert_shear_value"])
df = pd.DataFrame(v, columns=["press", "lat", "lon", "horz_shear_value", "static_value", "horz_wind_spd_value", "vert_shear_value"])
voxel_dict_df[k] = df
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