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

snapshot...

parent b569628e
Branches
No related tags found
No related merge requests found
...@@ -417,6 +417,15 @@ def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14', ou ...@@ -417,6 +417,15 @@ def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14', ou
alt_f = np.reshape(alt_f, [num_amvs, 1]) alt_f = np.reshape(alt_f, [num_amvs, 1])
amvs_nd = np.hstack([amvs_nd, alt_f]) amvs_nd = np.hstack([amvs_nd, alt_f])
amv_params = amv_ds.get_parameters()
all_params = [amv_ds.lon_name, amv_ds.lat_name, amv_ds.elem_name, amv_ds.line_name] + amv_params
coords = {'num_params': all_params}
dims = ['num_amvs', 'num_params']
amvs_da = xr.DataArray(amvs_nd, coords=coords, dims=dims)
new_amv_fname = os.path.split(fname)[1]
new_amv_fname = os.path.splitext(new_amv_fname)[0] + 'nc4'
amvs_da.to_netcdf(new_amv_fname, format='NETCDF4')
new_amv_fname = os.path.split(fname)[1] new_amv_fname = os.path.split(fname)[1]
np.savetxt(new_amv_fname, amvs_nd, fmt=num_fmts, header=new_header, delimiter=',') np.savetxt(new_amv_fname, amvs_nd, fmt=num_fmts, header=new_header, delimiter=',')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment