From 2faf1cbf292b2d28c0157499ab087c53fe7ce5d2 Mon Sep 17 00:00:00 2001 From: rink <rink@ssec.wisc.edu> Date: Sun, 27 Sep 2020 13:35:09 -0500 Subject: [PATCH] remove dead code --- modules/aeolus/aeolus_amv.py | 72 ------------------------------------ 1 file changed, 72 deletions(-) diff --git a/modules/aeolus/aeolus_amv.py b/modules/aeolus/aeolus_amv.py index a3a4b081..81e7fbe8 100644 --- a/modules/aeolus/aeolus_amv.py +++ b/modules/aeolus/aeolus_amv.py @@ -391,78 +391,6 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct): 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 # amv_files_dir: G16/17 AMV product file -- GitLab