From 32cd80a150c6cfcd0bdc5b66e6dd9754b15d206f Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Wed, 5 Oct 2022 12:25:38 -0500 Subject: [PATCH] snapshot... --- modules/amv/caliop_clavrx_amv.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/modules/amv/caliop_clavrx_amv.py b/modules/amv/caliop_clavrx_amv.py index c0cacff8..b7b227d8 100644 --- a/modules/amv/caliop_clavrx_amv.py +++ b/modules/amv/caliop_clavrx_amv.py @@ -80,10 +80,6 @@ def match_calipso_clavrx_to_amvs(nom_time, calipso_clavrx_nc4, amv_files, calips for p_idx, p in enumerate(amv_params): param_s.append(amvs_nd[:, p_idx]) - # param_s.append(amvs_nd[:, amv_pres_idx]) - # param_s.append(amvs_nd[:, amv_spd_idx]) - # param_s.append(amvs_nd[:, amv_dir_idx]) - coords_a = {'num_calipso_clavrx_params': calipso_clavrx_params} dims_a = ['num_calipso_clavrx_params'] @@ -127,10 +123,8 @@ def match_calipso_clavrx_to_amvs(nom_time, calipso_clavrx_nc4, amv_files, calips data_nd = np.vstack(calipso_clavrx_data) data_da = xr.DataArray(data_nd[:, idx], coords=coords_a, dims=dims_a) - #lons = param_nd[0, :] - #lats = param_nd[1, :] - lons = amvs_da[amv_files.lon_name, :] - lats = amvs_da[amv_files.lat_name, :] + lons = amvs_da.loc[amv_files.lon_name, :].data + lats = amvs_da.loc[amv_files.lat_name, :].data temp_prof = get_vert_profile_s(gfs_xr, ['temperature'], lons, lats, method='linear') temp_prof = temp_prof.values temp_prof_s = temp_prof[0, :, :] @@ -138,7 +132,7 @@ def match_calipso_clavrx_to_amvs(nom_time, calipso_clavrx_nc4, amv_files, calips alt_s = [] for k in range(num_amvs): #alt = pressure_to_altitude(param_nd[4, k], None, gfs_press, temp_prof_s[k, :]) - alt = pressure_to_altitude(amvs_da[amv_files.press_name, k], None, gfs_press, temp_prof_s[k, :]) + alt = pressure_to_altitude(amvs_da.loc[amv_files.press_name, k].data, None, gfs_press, temp_prof_s[k, :]) alt_s.append(alt) alt_s = np.array(alt_s) -- GitLab