diff --git a/modules/amv/caliop_clavrx_amv.py b/modules/amv/caliop_clavrx_amv.py index e52c1ddd992224e03379a7ca6c52d13b2c917bd0..8759de27d3d1a1b73f50feb7da71a2ea630cd268 100644 --- a/modules/amv/caliop_clavrx_amv.py +++ b/modules/amv/caliop_clavrx_amv.py @@ -357,6 +357,9 @@ def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14'): amv_ds = get_datasource(path_to_amvs, amv_source, file_time_span=20, band=band) amv_filenames = amv_ds.flist + alt_s = [] + prs_s = [] + for fname in amv_filenames: print(fname) nom_time = amv_ds.get_datetime(fname).timestamp() @@ -378,8 +381,13 @@ def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14'): temp_prof = temp_prof.values temp_prof_s = temp_prof[0, :, :] - alt_s = [] for k in range(num_amvs): - alt = pressure_to_altitude(amvs_nd[k, amv_pres_idx], None, gfs_press, temp_prof_s[k, :]) + amv_press = amvs_nd[k, amv_pres_idx] + alt = pressure_to_altitude(amv_press, None, gfs_press, temp_prof_s[k, :]) alt_s.append(alt.magnitude) - alt_s = np.array(alt_s) \ No newline at end of file + prs_s.append(amv_press) + alt_s = np.array(alt_s) + prs_s = np.array(prs_s) + print('Done...') + + return prs_s, alt_s