diff --git a/modules/amv/caliop_clavrx_amv.py b/modules/amv/caliop_clavrx_amv.py index 41ceb6003c103eff4d61cdc6185d802173e2116d..be266cd6dc9ed636e1712f20ccf3f828cd9c801f 100644 --- a/modules/amv/caliop_clavrx_amv.py +++ b/modules/amv/caliop_clavrx_amv.py @@ -380,8 +380,9 @@ def get_temp_prof_s_intrp(nom_time, amv_lons, amv_lats): gfs_press = gfs_xr_left['pressure levels'].values temp_prof = get_time_interpolated_vert_profile([gfs_xr_left, gfs_xr_rght], [nom_time_left, nom_time_rght], 'temperature', nom_time, amv_lons, amv_lats) + pt_s = get_time_interpolated_point_s([gfs_xr_left, gfs_xr_rght], [nom_time_left, nom_time_rght], ['surface pressure', 'surface temperature'], nom_time, amv_lons, amv_lats) - return temp_prof, gfs_press + return temp_prof, gfs_press, pt_s[0,], pt_s[1,] def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14', out_file=None): @@ -403,12 +404,13 @@ def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14', ou amv_lats = amvs_nd[:, amv_lat_idx] # temp_prof_s, gfs_press = get_temp_prof_s(gfs_ds, nom_time, amv_lons, amv_lats) - temp_prof_s, gfs_press = get_temp_prof_s_intrp(nom_time, amv_lons, amv_lats) + temp_prof_s, gfs_press, sfc_press, sfc_temp = get_temp_prof_s_intrp(nom_time, amv_lons, amv_lats) alt_f = [] for k in range(num_amvs): amv_press = amvs_nd[k, amv_pres_idx] - alt = pressure_to_altitude(amv_press, None, gfs_press, temp_prof_s[k, :]) + #alt = pressure_to_altitude(amv_press, None, gfs_press, temp_prof_s[k, :]) + alt = pressure_to_altitude(amv_press, None, gfs_press, temp_prof_s[k, :], sfc_pres=sfc_press[k], sfc_temp=sfc_temp[k]) alt_s.append(alt.magnitude) alt_f.append(alt.magnitude) prs_s.append(amv_press)