Skip to content
Snippets Groups Projects
Commit 37830efa authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 2f40e77e
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
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