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

fix bug

parent 1ce6e532
No related branches found
No related tags found
No related merge requests found
......@@ -461,10 +461,14 @@ def get_subset(match_file, dt_str_0, dt_str_1):
p_hht_v = rootgrp['prof_hht']
dto = datetime.datetime.strptime(dt_str_0, '%Y-%m-%d_%H:%M').replace(tzinfo=timezone.utc)
dto.replace(tzinfo=timezone.utc)
t_0 = dto.timestamp()
dto = datetime.datetime.strptime(dt_str_1, '%Y-%m-%d_%H:%M').replace(tzinfo=timezone.utc)
dto.replace(tzinfo=timezone.utc)
t_1 = dto.timestamp()
print(t_0, t_1)
if t_1 < t_0:
t = t_0
t_1 = t_0
......@@ -479,16 +483,16 @@ def get_subset(match_file, dt_str_0, dt_str_1):
prf_idx_start = np.sum(n_levs_per_prof[0:time_idxs[0]])
amv_idx_start = np.sum(n_amvs_per_prof[0:time_idxs[0]])
mx_namvs = np.max(n_amvs_per_prof[amv_idx_start:amv_idx_start+n_times])
mx_nlevs = np.max(n_levs_per_prof[prf_idx_start:prf_idx_start+n_times])
mx_namvs = np.max(n_amvs_per_prof[time_idxs[0]:time_idxs[0]+n_times])
mx_nlevs = np.max(n_levs_per_prof[time_idxs[0]:time_idxs[0]+n_times])
amvs = np.zeros((n_times, mx_namvs, 4))
profs = np.zeros((n_times, mx_nlevs, 4))
amvs.fill(np.nan)
profs.fill(np.nan)
accum_prf = 0
accum_amv = 0
accum_prf = prf_idx_start
accum_amv = amv_idx_start
for idx, t_i in enumerate(time_idxs):
n_amvs = n_amvs_per_prof[t_i]
n_levs = n_levs_per_prof[t_i]
......
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