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

snaphot...

parent 6d33b846
No related branches found
No related tags found
No related merge requests found
......@@ -352,6 +352,9 @@ def analyze(filename):
return cc_ctp, acha_ctp, amv_press_avg, lats
new_header = ' TARG LAT LON BOX SRCH SPD DIR PW LLCM SPDG DIRG TBALB MAXC TRKM PERR HAMD QINF QIWF QIC HGT'
def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14', out_file=None):
gfs_ds = get_datasource(path_to_gfs, 'GFS')
amv_ds = get_datasource(path_to_amvs, amv_source, file_time_span=20, band=band)
......@@ -361,7 +364,7 @@ def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14', ou
prs_s = []
for fname in amv_filenames:
print(fname)
print('Start: ', fname)
nom_time = amv_ds.get_datetime(fname).timestamp()
amvs_nd = get_amv_nd(fname, delimiter=',')
amvs_nd = filter_amvs(amvs_nd)
......@@ -391,7 +394,8 @@ def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14', ou
alt_f = np.array(alt_f)
alt_f = np.reshape(alt_f, [num_amvs, 1])
amvs_nd = np.hstack([amvs_nd, alt_f])
print(amvs_nd.shape)
new_amv_fname = os.path.split(fname)
np.savetxt(new_amv_fname, amvs_nd, header=new_header, delimiter=',')
print('Done...')
alt_s = np.array(alt_s)
......
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