From 84da9cc2482ce326b39f760b1a3d57ad0c3081ce Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Tue, 28 May 2024 10:53:17 -0500 Subject: [PATCH] snapshot... --- modules/contrail/util.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/contrail/util.py b/modules/contrail/util.py index 368b7f17..20233e5a 100644 --- a/modules/contrail/util.py +++ b/modules/contrail/util.py @@ -69,7 +69,7 @@ def extract(mask_image, image_ts, clavrx_path): contrail_lats = contrail_lats[keep] # 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) # 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): 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) + 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() -- GitLab