From 7428e303371da87525d188ce4bfbcd4d6aea3fae Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Tue, 28 May 2024 15:09:50 -0500 Subject: [PATCH] snapshot... --- modules/contrail/util.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/contrail/util.py b/modules/contrail/util.py index a5c47e91..77cb685d 100644 --- a/modules/contrail/util.py +++ b/modules/contrail/util.py @@ -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 -- GitLab