Skip to content
Snippets Groups Projects
Commit d9457cd6 authored by rink's avatar rink
Browse files

minor

parent 2533dbb2
No related branches found
No related tags found
No related merge requests found
......@@ -419,6 +419,9 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files):
var.units = u
nc4_vars.append(var)
dist = rootgrp.createVariable('dist_to_prof', 'f4', ['amvs'])
dist.units = 'km'
num_amvs_per_prof = rootgrp.createVariable('num_amvs_per_prof', 'i4', ['num_aeolus_profs'])
num_levs_per_prof = rootgrp.createVariable('num_levs_per_prof', 'i4', ['num_aeolus_profs'])
prof_time = rootgrp.createVariable('time', 'f4', ['num_aeolus_profs'])
......@@ -447,11 +450,6 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files):
i_b = i_a + namvs
i_d = i_c + nlevs
param_nd = aeolus_to_amv_dct.get(key)
for pidx, param in enumerate(out_params):
nc4_vars[pidx][i_a:i_b] = param_nd[pidx, :]
i_a += namvs
prof_s = aeolus_dct.get(key)
prof = prof_s[0]
prf_hht[i_c:i_d] = prof[:, 3]
......@@ -460,8 +458,27 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files):
prf_spd[i_c:i_d] = prof[:, 6]
i_c += nlevs
prf_lat[idx::] = prof[0, 0]
prf_lon[idx::] = prof[0, 1]
plat = prof[0, 0]
plon = prof[0, 1]
prf_lat[idx::] = plat
prf_lon[idx::] = plon
param_nd = aeolus_to_amv_dct.get(key)
for pidx, param in enumerate(out_params):
nc4_vars[pidx][i_a:i_b] = param_nd[pidx, :]
dist[i_a:i_b] = haversine_np(plon, plat, param_nd[0, :], param_nd[1, :])
i_a += namvs
# prof_s = aeolus_dct.get(key)
# prof = prof_s[0]
# prf_hht[i_c:i_d] = prof[:, 3]
# prf_hhb[i_c:i_d] = prof[:, 4]
# prf_azm[i_c:i_d] = prof[:, 5]
# prf_spd[i_c:i_d] = prof[:, 6]
# i_c += nlevs
#
# prf_lat[idx::] = prof[0, 0]
# prf_lon[idx::] = prof[0, 1]
num_amvs_per_prof[:] = num_amvs
num_levs_per_prof[:] = num_levs
......
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