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

remove dead code

parent 351860df
No related branches found
No related tags found
No related merge requests found
...@@ -391,78 +391,6 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct): ...@@ -391,78 +391,6 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct):
rootgrp.close() rootgrp.close()
# def create_file(filename, aeolus_to_amv_dct, aeolus_dct):
# keys = list(aeolus_to_amv_dct.keys())
#
# num_amvs = []
# num_levs = []
# times = []
#
# namvs = 0
# nlevs = 0
# for key in keys:
# lons, lats, pres, spd, dir = aeolus_to_amv_dct.get(key)
# num_amvs.append(len(lons))
# namvs += len(lons)
#
# prof_s = aeolus_dct.get(key)
# prof = prof_s[0]
# num_levs.append(prof.shape[0])
# nlevs += prof.shape[0]
#
# times.append(key)
#
# amv_per_alus = len(aeolus_to_amv_dct)
# rootgrp = Dataset(filename, 'w', format='NETCDF4')
# dim_amvs = rootgrp.createDimension('amvs', size=namvs)
# dim_alus = rootgrp.createDimension('profs', size=nlevs)
# dim_num_aeolus_prof = rootgrp.createDimension('num_aeolus_profs', size=len(aeolus_to_amv_dct))
#
# amv_lon = rootgrp.createVariable('amv_longitude', 'f4', ['amvs'])
# amv_lat = rootgrp.createVariable('amv_latitude', 'f4', ['amvs'])
# amv_spd = rootgrp.createVariable('amv_spd', 'f4', ['amvs'])
# amv_dir = rootgrp.createVariable('amv_dir', 'f4', ['amvs'])
# amv_pres = rootgrp.createVariable('amv_pres', 'f4', ['amvs'])
#
# 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'])
#
# prf_azm = rootgrp.createVariable('prof_azm', 'f4', ['profs'])
# prf_spd = rootgrp.createVariable('prof_spd', 'f4', ['profs'])
# prf_hht = rootgrp.createVariable('prof_hht', 'f4', ['profs'])
# prf_hhb = rootgrp.createVariable('prof_hhb', 'f4', ['profs'])
#
# i_a = 0
# i_c = 0
# for idx, key in enumerate(keys):
# namvs = num_amvs[idx]
# nlevs = num_levs[idx]
# i_b = i_a + namvs
# i_d = i_c + nlevs
#
# lons, lats, pres, spd, dir = aeolus_to_amv_dct.get(key)
# amv_lon[i_a:i_b] = lons[:]
# amv_lat[i_a:i_b] = lats[:]
# amv_spd[i_a:i_b] = spd[:]
# amv_dir[i_a:i_b] = dir[:]
# amv_pres[i_a:i_b] = pres[:]
# i_a += namvs
#
# prof_s = aeolus_dct.get(key)
# prof = prof_s[0]
# prf_hht[i_c:i_d] = prof[:, 2]
# prf_hhb[i_c:i_d] = prof[:, 3]
# prf_azm[i_c:i_d] = prof[:, 5]
# prf_spd[i_c:i_d] = prof[:, 6]
# i_c += nlevs
#
# num_amvs_per_prof[:] = num_amvs
# num_levs_per_prof[:] = num_levs
# prof_time[:] = times
#
# rootgrp.close()
# aeolus_file: S4 NOAA txt output # aeolus_file: S4 NOAA txt output
# amv_files_dir: G16/17 AMV product file # amv_files_dir: G16/17 AMV product file
......
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